beautypg.com

Coordinate value output – IAI America XSEL-KET User Manual

Page 330

background image

311

Appendix

INTELLIGENT ACTUATOR

20. Coordinate Value Output


[Description]

Read the current coordinate of the actuator in real time and output BCD data from an output port.

[Use example]

Use a PRDQ command to read the current coordinate position of axis 1.
The current coordinate data of axis 1 is output as a BCD every 0.2 second.
The output range is 0.00 to 999.99 mm.

BCD output assignment

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 coordinate to variable 101.
The value that has been read to the variable is “xxx.xxx,” so the digits not used for BCD output are moved
to below the decimal digits.
In this example, the third and subsequent decimal digits are not necessary, and thus the value is
multiplied by 100 to obtain the data “xxxxx.x.”
Next, the data is copied to variable 99 used exclusively for BCD output.
At this point, the decimal digit is rounded off.
Next, the data is output to an external device via an OUTB command.
This program is used as a sub-program in the multi-tasking mode.

Comment

Assign current position of axis 1 to variable 101.

Round off at third decimal digit.

Copy to integer variable.
Output 5-digit BCD.

Sampling time

This manual is related to the following products: