日本語 English

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

Type

Log format

Recorded data looks like this

Type

Type

Trace-based logging

The simplest logging

Logs using the AddDelimiter and FilePut instructions
Logging with AddDelimiter and FilePut

Logging with a ring buffer

Adds buffering to the simplest logging
Logging with a Ring Buffer

Logging with a ring buffer and byte arrays

Logs byte arrays using buffering and the FileWrite instruction
Fast logging with a ring buffer and FileWrite

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

Creates CSV files on an event basis
Event-based CSV logging

Event-based binary file

Creates CSV files on an event basis and sends them via FTP
Event-based binary logging

About performance

Records per second (measured on NJ501)

CSV file 8,000 records
Binary file 80,000 records

Bonus

Ultra-fast whole-structure logging

Saves whole structures with FileWriteVar
FileWriteVar

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

Logging with Insert

Inserts log data one record at a time with the Insert instruction
Database Insert logging

Logging with BatchInsert

Batch-inserts log data with the BatchInsert instruction
Database BatchInsert logging

About performance

Time taken by Insert (NX102)

Logging with Insert 30 ms per record
Logging with BatchInsert 3 ms per record

Related pages

Comments