2021/07/14
How to Make an SS Recorder (1/4)
Overview
-
We create a recorder that outputs files that can be imported into Sysmac Studio data trace
The traced data is kept in a ring buffer (in memory) and output to a file at any time
Use it for debugging, analysis when faults occur and so on
Related page → Continuous output in Sysmac Studio data trace file format
Preparation
- Output file format
-
Output matches the file format exported by Sysmac Studio data trace (it may change in future versions)
- Trace data
-
Set the data to trace in structure sData
*1 In Sysmac Studio data trace, the number of variables is 192 for NJ501 and NX701 and 48 for others,sData STRUCT RecTime
DATE_AND_TIME Variable 1
INT etc. ...
Max. 191 (*1)
but files made here, even with data traced on an NX102 etc., can be imported by changing the project model to NJ501 or NX701 RecTime (DATE_AND_TIME) is required to create a data trace file, so always include it
Set the other members freely to the variables you want to traceTraceable data types Basic data types (except strings)
Arrays (with number of elements specified)
Enumerations
Structures/unions (with members specified)
In this navigator, the following data is traced

- Ring buffer capacity
-
Trace data is recorded in a ring buffer
The ring buffer is constantly updated and old data is overwritten, so the period that can be recorded depends on its capacity
You want it as large as possible, but the PLC system has the following limits, so decide the ring buffer capacity within them -
Item Limit Relationship with the ring buffer Variables 4MByte(4,194,304byte) Total ring buffer capacity Number of buffers 65535 Number of sData records Reference
The ring buffer capacity when multiple INT values are set as trace data, by number of buffers, is as follows
-
Setting the trace data made in this navigator in a ring buffer with 65535 array elements gives a capacity of about 3.25 MB
(check in Memory Usage)
- Trace period
-
The trace period can be anything
Data is added to the ring buffer at the period you want to trace
In this navigator, tracing uses the primary task period (2 ms) - Trace duration
-
The duration that can be saved is determined by the trace period and the number of buffers (array elements) in the ring buffer
Trace period × number of buffers = trace duration
(Example) 2 ms × 65534 = 131068 ms = approx. 2 m 11 sReference
Relationship between trace period and trace duration by number of buffers
From the next page,
Download
By downloading, you are deemed to have agreed to the Terms of Use


