Logging
This page explains PLC logging implemented in Sysmac Studio for the OMRON NX/NJ series.
It introduces CSV file saving, binary saving, fast logging using a ring buffer and recording to a database.
Types of logging
Timing
Methods of logging PLC memory (bit states, numbers, etc.) can be divided into event-based and trace-based
The recording timing of each differs as shown below

Log format
Recorded data looks like this


Trace-based logging
The simplest logging
Logging with a ring buffer
Logging with a ring buffer and byte arrays
About performance
Fastest collection period when logging about 100 BOOLs + about 100 DINTs (measured on NJ501)
| The Simplest Logging | 100ms |
| Logging with a Ring Buffer | 30ms |
| Logging with a Ring Buffer and Byte Arrays | 1ms |
Event-based logging
Event-based CSV file
Event-based binary file
About performance
Records per second (measured on NJ501)
| CSV file | 8,000 records |
| Binary file | 80,000 records |
Bonus
Ultra-fast whole-structure logging
About performance
Fastest collection period when logging about 100 BOOLs + about 100 DINTs (measured on NJ501)
| Whole-structure logging | 0.2 ms or less per record |
As a guide
Writing a 1 MB structure (500,000 INTs) takes 250 to 350 ms
Writing a 500 KB structure takes 100 to 200 ms
Database logging
Trace-based
About performance
Time taken by Insert (NX102)
| Logging with Insert | 30 ms per record |
| Logging with BatchInsert | 3 ms per record |
