5-64 WORKING WITH THE CONTROL UNIT
SB1391 Hardware and Setup Guide - Document revision no. 1.14
Command
mnemonic
Meaning Effect of command
3.
let XLV=50000
Let X axis Linear
Velocity be 01
Set the velocity.
4.
exec BX
Execute Begin X
axis movement
Begin moving.
5.
V0=XIX
Assign variable V0
the value of the X
axis index
Dummy reading of the index to
clear the buffer.
6.
Loop:
Start loop Loop label.
7.
till X_INDEX
Continue loop till
the X axis index flag
is true
Wait till the index flag is true.
8.
Disp XIX
Display X axis
index
Display the index position.
9.
Goto loop
Go to start of loop
End of loop.
10.
Stop
End of program
5.5.4.2. Working With I/O
The following program reads the status of inputs 1 to 4 and sets outputs 1 to 4 accordingly.
Command
mnemonic
Meaning Effect of command
1.
I_O:
Label.
2.
V0=IP&15
Variable V0 assigned
the result of the Input
Ports parameter & the
binary representation
of 15 (decimal).
Read the input port and ignore
the values of inputs 5 to 16.
3.
let OP=V0
Let the Output Port
parameter be assigned
the value of V0
Set the outputs to the value of
the inputs.
4.
disp "IP = ",IP
disp "OP =",OP
Display the values of
the Input Ports and the
Output Ports.
Display the values of the I/O
ports
5.
Stop
End of program
To close ACS Debugger, on the ACSPL menu, click Exit.