
417
Appendix
[4] Definition of transmission format
In the sample application program provided here, only three types of transmission formats, or namely
home return command, movement command and movement complete, are required. These formats
are defined as follows.
Take note that these definitions are only examples and the user can define each format freely.
A. Format for home return command
This format is used to issue a home return command from the PC to the controller.
B. Format for movement command
This format is used to issue an axis movement command from the PC to the controller.
C. Format for movement complete
This format is sent from the controller to the PC upon completion of home return or movement.
Speed
Position of axis 1
Position of axis 2
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
Variable 10
Set a speed.
Clear position 1.
Position of axis 1
Variable
199
Set data for axis 1.
Position of axis 2
Variable
199
Set data for axis 2.
Movement
Send OK.
Subroutine for sending OK
Set OK.
Set CR.
Set LF.
Send.
421
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: ......