2021/07/14
How to Make an SS Recorder (2/4)
Record settings
-
Here the following data is traced, output to files and then imported into Sysmac Studio data trace
Data to trace 16 bits, plus one each of INT, DINT, LINT, REAL and LREAL Ring buffer capacity 65,535 Trace period 2ms -
The record start flag accumulates data in the ring buffer
If left as is, the latest data keeps overwriting the ring buffer
At any time, turn the record write flag ON to write the accumulated data to a file
Step 1: Create the Ring Buffer
-
1-1. Create the ring buffer structure
Click the image to enlarge
-
Create the sData structure to hold the data you want to trace
Put the Data structure into the ring buffer structure and set the array to the size needed for buffering
The number of array elements is the buffer size
Name Data type Description sRingBuffer Top
UINT Add position Bottom
UINT Read position Count
UINT Number of stored records Data
sData[65535] Buffer RecTime
DATE_AND_TIME SamplingNo
UINT Idx
UINT B
BOOL[16] INT16
INT INT32
DINT INT64
LINT R
REAL LR
LREAL
-
1-2. Copy functions from the sample
-
Copy the RingBufPut and RingbufGet functions into Functions from the ring buffer sample

