2021/07/14
How to Make an SS Recorder (4/4)
Step 5: Create Test Data
-
5-1. Union
-
To create 16 bits of bit data for the test data, create a WORD union and split it into bits
Name Data type uWORD UNION W
WORD B
BOOL[16]
-
5-2. Add a program
-
Add a program to create test data
Create an angle in variable R that rotates 0.8 degrees every scan
Put sine curve data of angle R into DummyInputLReal
Convert this DummyInputLReal to INT, DINT, LINT, WORD, BOOL and String types to create test data
Step 6: Test
-
6-1. Create trace data
-
1. Turning ON the record start flag (Rec) accumulates record data in the ring buffer
2. The number of records can be checked in RecBuffer.Count; when it reaches 65535, the newest data overwrites the oldest, leaving the most recent 65535 records in the ring buffer
3. Turn the record start flag (Rec) OFF to stop recording for now
4. Turning ON the record write flag (RecWrite) to write the ring buffer data to files starts writing, and the RecBuffer.Count decreases
5. When RecBuffer.Count reaches zero, all data has been written to files, so turn the record write flag (RecWrite) OFF
6. The Rec folder on the memory card now contains 65535 records split into six files of 10,000 records and one file with the remaining 5535 records
This completes how to make the SS recorder
It could be used, for example, by stopping the trace when a fault occurs and displaying it in Sysmac Studio
Download
By downloading, you are deemed to have agreed to the Terms of Use




