11-10Fibre-Optic Network
Network Programming
Trio Motion Technology
As there are now two Motion Coordinators in the network it is necessary to have
a program on each.
For the purposes of this example the three axis node will act as the master and
issue instructions to the two axis node. The three axis node will also receive all
input from the keypad.
The program for the three axis node could be as follows:
init: SEND(11,2,10)' Set offset on keypad
PRINT #11,CHR(12);CHR(14);"INITIALISING......."
PRINT #10,"I";' Send command to two axis node to
initialise
GOSUB initax' Initialisation routine
WAIT UNTIL VR(200)=99'Two axis node signals ready by
setting variable 200
PRINT #11,CHR(12);CHR(14);"MACHINE READY"
'Get required parameters
setlen:
PRINT #11,"FEED LENGTH:";VR(0)[6.1];
GET #3,VR(100)
IF VR(100)=13 THEN GOTO setsp
IF (VR(100)=10)AND(VR(0)<1000000) THEN VR(0)=VR(0)+0.1
IF (VR(100)=11)AND(VR(0)>0.1) THEN VR(0)=VR(0)-0.1
PRINT#11,CHR(27);CHR(72);CHR(32);VR(0)[6.1];
GOTO setlen
setsp:
PRINT #11,"SPEED:";VR(1)[2];
GET #3,VR(100)
IF VR(100)=13 THEN GOTO initnet
IF (VR(100)=10)AND(VR(1)<100) THEN VR(1)=VR(1)+0.01
IF (VR(100)=11)AND(VR(1)>0.01) THEN VR(1)=VR(1)-0.01
PRINT #11,CHR(27);CHR(72);CHR(46);VR(1)[2];
GOTO setsp
initnet:
'Update variable values on two axis node
SEND(10,1,0,VR(0))
SEND(10,1,1,VR(1))
start:
PRINT #11,CHR(12);CHR(14);"PRESS START TO RUN"