D1-N Series Servo Drive User Manual Tuning
HIWIN MIKROSYSTEM Corp. 6-11
6.4.2 Data collection via PDL program
To be more precise on Data collection, users can use Sync function in figure 6.4.1.1 to have more flexible
and real-time Data collection then event trigger. Users need to add a program fragment with title label
“_RecordSync” and set trigger condition or status. Data collection starts as trigger condition or status is
satisfied. The setting instructions are as below.
Step 1: An empty task is required for executing _RecordSync. Check if any task is available among task
0 to task 3.
Step 2: Add the contents below into PDL program.
_RecordSync:
till( ); // Add trigger condition or status.
rtrs_act=1; // Start to record.
ret; // Add this line to repeat Data collection each time when trigger condition or status
occurs.
Step 3: In the parentheses of till(), add trigger condition or status. For instance, input I3 in the
parentheses. The default setting of I3 is right software limit.
Step 4: Check the checkbox of Sync.
Step 5: Click on Start button, the program will start to execute function _RecordSync and wait for the
trigger condition or status. For instance, when I3 is ON, Data collection starts. If I3 is ON for
more than once, only the last data will be collected.
Example:
#task/1;
_RecordSync:
till(I3); // I3 is ON.
rtrs_act=1; // Start to record.
ret;