D2 Drive User Guide v1.8 6. Drive Tuning
HIWIN Mikrosystem Corp. 156
is on standby. When the motor speed is greater than 0, it will start to collect the data;
while when the motor speed is less than 0, it will stop to collect the data. After the data
collection is completed, click the “Graph” button to draw the graph of one speed cycle.
Example 3: To capture the graph of drive from enable to disable
Check “Start event” and set it to “I3”. Also, check “Stop event” and set it to “~I3”. Click the
“Start” button after the setting is completed. Now, this function will recognize the status of
I3. When the drive is enabled (I3 = 1), it will start to collect the data; while when the drive
is disabled (I3 = 0), it will stop to collect the data.
Note. When “Upd vars” in ○1 is unchecked, the Lightening HMI stops updating variables. This
can improve the bandwidth of data collection. However, if “Start event” is triggered by I3
(as in Example 3), the I/O pin of hardware is triggered via the external signal.
6.4.2. Data collection via PDL
In order to improve the accuracy of data collection, “Sync” (trigger the auto collection
instantaneously) in Fig. 6-8 ○5 provides more flexible and more real-time data capture than
the conditional auto collection. The program fragment with the title labeled by “_RecordSync”
should be added in the PDL program. Set the start event of data collection. Once this event is
triggered, “Data collection” starts to collect the data. Operation steps are given as follows.
Step 1. An empty task is required to execute “_RecordSync”. Make sure that the task in PDL
is less than four, i.e, whether one of task 0 to task 3 is available.
Step 2. Add the following content in the PDL program:
_RecordSync:
till( ); // Add to wait for the trigger event or status.
rtrs_act=1; // Start to record.
ret; // If this line is not added, the data collection cannot be triggered repeatly.
Step 3. Add the interrupted condition or status in the parentheses of “till()” on the
“_RecordSync” function. For example, it could be I4 (default for the right limit state)
in the I/O center.
Step 4. Check “Sync” in Fig. 6-8
○
5
.
Step 5. Click the “Start” button in
○
3
. The program starts to execute the “_RecordSync”
function and waits for that the trigger event is satisfied. For example, when the
status of I4 is changed from False to True, the data collection starts to capture the
data. If I4 is triggered repeatedly, it will collect the record data of last trigger.
Exmaple:
#task/1;
_RecordSync:
till(I4); // Wait for the status of I4 changing from False to True.
rtrs_act=1; // Start to collect.
ret;