366
INTELLIGENT ACTUATOR
Appendix
20. Outputting Coordinates
Description
Read the current actuator coordinate in real time and output the reading from an output port as BCD data.
Example of Use
Use a PRDQ command to load the current coordinate position of axis 1.
The current coordinate data of axis 1 is output as BCD data at 0.2-second intervals.
The output range is 0.00 to 999.99 mm.
BCD output assignment
Output port No. Description Output port No. Description
Unit: mm
Application program
* With a PRDQ command, the current position coordinate is written to variable 101.
Since the coordinate is read by the variable in the “XXX.XXX” format, the unused digits are moved to
decimal place to enable BCD output.
In the above example, the third and subsequent decimal places are not required, so the read value is
multiplied by 100 to obtain data in the “XXXXX.X” format.
Next, this value is copied to variable 99 used exclusively for BCD output.
During this conversion, the decimal place is rounded off.
Then, the copied value is output to an external device using an OUTB command.
This program is used as a subprogram in the multi-tasking mode.