How to Log PLC Process Data to a CSV File Using OPC

Logging process data from a PLC to a CSV file through OPC does not require custom scripting, a dedicated historian, or any software installation that modifies your system. OPC Expert connects to your PLC’s OPC server, subscribes to the data items you want to capture, and writes records to CSV with a right-click. The resulting file is immediately readable in Excel or any text editor and can be used as input to reporting tools, databases, or other applications.

How the Connection Works

OPC Expert communicates with the PLC through the OPC server that is already installed in your environment, whether that is an OPC DA server such as a Kepware or Matrikon configuration, or an OPC UA server embedded in the PLC firmware or running on a companion device. OPC Expert does not replace the OPC server; it acts as the OPC client that subscribes to items from that server and manages the archiving destination. Once you open OPC Expert and browse the available OPC servers on your network, you can navigate the server’s address space to locate the tags you want to log, select them, and create a new archive pointing to a CSV file.

Event-Based vs. Time-Based Logging to CSV

OPC Expert supports both event-based and time-based data capture when writing to CSV. With event-based logging, a new row is appended to the file only when a value changes. This keeps the file size manageable and ensures every row contains a meaningful data point rather than repeated identical values. With time-based logging, a row is written at a fixed interval regardless of change, giving you equally spaced samples that some analysis tools require. You choose the mode during archive setup, and you can run multiple archive configurations simultaneously if different tag groups need different strategies.

Running Continuously Without User Intervention

For production environments where logging must run overnight or across shift changes, OPC Expert can be configured to run as a Windows service. Once set up as a service, it starts automatically when the computer boots and continues logging to CSV without requiring any user to be logged in. If the OPC server restarts or the network briefly drops, OPC Expert reconnects automatically and resumes logging. The store-and-forward capability means that if the CSV file location is temporarily unavailable, data is buffered locally and written once access is restored.

No Installation and No Registry Changes

OPC Expert runs from a single executable and does not require a traditional installation process. It does not write to the Windows registry and does not alter system settings. This makes it safe to use on production computers where change control procedures restrict software installation. You can run OPC Expert directly from a USB drive if needed, configure your CSV archive, and leave it running without having introduced any persistent changes to the host system other than the OPC Expert service entry if you choose to install it as a service.

Relevant Tools

Archive OPC Data from OPC Expert is the module that handles CSV logging from OPC DA and OPC UA sources. It supports bulk tag configuration via CSV import, allowing large tag lists to be configured quickly without manual entry for each item. OPC to Excel from OPC Expert extends the CSV use case by making real-time and historical OPC data available directly inside Microsoft Excel, enabling live monitoring and report generation in a familiar environment alongside the archived CSV records.

Conclusion

Logging PLC process data to CSV through OPC is a practical, low-overhead solution that requires no scripting and no historian. OPC Expert handles the OPC subscription, the archive configuration, the file writing, and the automatic reconnection in one application. The resulting CSV files are immediately accessible in Excel and other standard tools, making this approach well suited to facilities that need reliable process data logging without a large infrastructure investment.