
403
Appendix
20. Output of Coordinate Values
Description
Read the current coordinates of the actuator in real time and output BCD data via an output port.
Example of Use
Use a PRDQ command to read the current coordinate position of axis 1.
Output the current coordinate data of axis 1 as a BCD every 0.2 second.
The output range is 0.00 to 999.99 mm.
Assignment of BCD output
Output port No.
Description
Output port No.
Description
324 0.01
336 10
325 0.02
337 20
326 0.04
338 40
327 0.08
339 80
328 0.1
340 100
329 0.2
341 200
330 0.4
342 400
331 0.8
343 800
332 1
333 2
334 4
335 8
Unit: mm
Application Program
* Use a PRDQ command to write the current position coordinates to variable 101.
Since the value read to the variable is in the format of “XXX.XXX,” the digits not used in the BCD output
are moved to decimal places.
In this example, the third and subsequent decimal places are not used, and thus the value is multiplied by
100 to be converted to data in the format of “XXXXX.X.”
Next, the aforementioned variable is copied to a dedicated variable for BCD output, or variable 99.
At this point, all decimal digits are rounded off.
Thereafter, the remaining part of data is output to an external device using an OUTB command.
This program is used as a subprogram in the multi-tasking mode.
Assign the current position of axis 1 to variable 101.
Round off the third and subsequent decimal places.
Copy to an integer variable.
Output 5 BCD digits.
Sampling time
404
Appendix
21. Conditional Jump
Description
Select the destination of jump specified by GOTO, using the state of an external input, output or internal
flag as each condition. The actuator waits for one of multiple inputs and performs a different process
according to the input received.
Example of Use 1
If input 10 is ON, the actuator jumps to TAG 1. If input 10 is OFF, the actuator performs the subsequent
processes.
Example of Use 2
The actuator waits for an input from either input 10 or 11, and performs process a if an input is received
from 10, or process b if an input is received from 11.
If both inputs 10 and 11 are ON, process a is performed.
Input 10
Process a
If input 10 is ON, GOTO 1
* If input 10 is ON, process a is skipped and process b is performed.
If input 10 is OFF, process a is performed and then process b is
performed.
Process a
Process b
Input 10
Process a
Input 11
Process b
Process a
Process b
No input
Input 10 is ON
Input 11 is ON
407
Summary of Contents for X-SEL PX
Page 1: ...Operation ManualSeventh Edition X SEL Controller PX QX Type Tenth Edition ...
Page 2: ......
Page 8: ......
Page 14: ......
Page 410: ...383 Appendix 386 ...
Page 452: ...425 Appendix 5 428 ...
Page 559: ......