D1 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, user can use Sync function in figure 6.4.1.1 to have more flexible
and real-time Data collection than event trigger. User needs to add a program fragment with title label
“_RecordSync” and set trigger condition. Data collection starts as trigger condition 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 I4 in the
parentheses. The default setting of I4 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 I4 is ON, Data collection starts. If I4 is ON for
more than once, only the last data will be collected.
Example:
#task/1;
_RecordSync:
till(I4); // I4 is ON.
rtrs_act=1; // Start to record.
ret;