Continuous Output in Sysmac Studio Data Trace File Format
Overview
A program creates files that can be imported into Sysmac Studio data trace
Furthermore, it continuously outputs files while changing file names
Program flow
FastTask adds the data to trace to the ring buffer
SlowTask creates files matching the format of Sysmac Studio trace export files
Each file holds 10,000 records; after writing 10,000 records it switches to the next file, appending a sequence number 000 to 199 to the file name, and repeats
File write
Each file has a header followed by the data, so data is read from the ring buffer and written
For writing to the file, data is converted to strings and stored comma-separated in the write buffer (byte array)
Multiple records are gathered in the write buffer before writing to the file
NOTE
File writing is faster when data is combined into large chunks than when small pieces are written repeatedly, so multiple records are gathered before writing
Trace data (example)
Record size
| RecTime | DATE_AND_TIME | Trace date/time (required) |
| SamplingNo | UINT | Any number for identification |
| Idx | UINT | Index |
| B | BOOL[16] | Trace data 16 bits |
| INT16 | INT | Trace data INT |
| INT32 | DINT | Trace data DINT |
| INT64 | LINT | Trace data LINT |
| R | REAL | Trace data REAL |
| LR | LREAL | Trace data LREAL |
Structures

Trace files
Files are output repeatedly with sequence numbers 0 to 199

Sysmac Studio data trace screen

Files that can be imported in the Sysmac Studio data trace screen were created
FAQ
Which PLCs can it be used with?
It can be used with the OMRON NX series and NJ series.
Can the generated files be read in Sysmac Studio?
Yes, they can be loaded with the data trace import function.
Is continuous recording possible?
Yes, continuous recording is possible by cycling file names.
Does it support high-speed sampling?
It is configured to collect in the primary task and output files in a periodic task.
