IAI America XSEL-QX User Manual

Page 442

Advertising
background image

418

Appendix

[5] Processing

procedure

The processing procedure to be followed to program this sample application is explained.
A. Set “LF” as a character to indicate the end of a string (terminator character).
B. Open channel 1 so that channel 1 of the RS232 unit can be used.
C. If data is sent to channel 1, the data is received in columns starting from local string column 1.
D. If the received data is “MOVE,” the speed data is converted to binary data and set in variable 10,

while the position data is converted to binary data and set in position No. 1, and the actuator is
moved accordingly. When the movement is completed, “OK” is sent.

[6] Application

program

Comment

Set LF as a terminator
character.
Open SIO channel 1.

Read from SIO1 column 1.

Home return command
Home return
Send OK.

In the case of a movement
command:
Length: 3 digits
Speed

o Variable 10

Set a speed.

Clear position 1.

Position of axis 1

o Variable

199
Set data for axis 1.

Position of axis 2

o Variable

199
Set data for axis 2.
Movement
Send OK.

Subroutine for sending OK

Set OK.

Set CR.

Set LF.

Send.

Advertising
This manual is related to the following products: