Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 798 of 909
EXAMPLE: (Shows use of SLEEP, SLEEP1, WAKE and WAKE1)
'The following commands can be sent from the SMI software Terminal
'window to address three SmartMotors:
'0SADDR1
'1ECHO
'1SLEEP
'0SADDR2
'2ECHO
'2SLEEP
'0SADDR3
'3ECHO
'0WAKE
'A host program other than SMI can send the same commands, but the
'prefixed addressing is different. The 0, 1, 2 and 3 are actually
'0x80, 0x81, 0x82 and 0x83, respectively.
'The decimal equivalent of the hex values are 128, 129, 130 and 131.
'The following commands can be sent from a program in motor 1 to
'Motor 2:
PRINT(#130,"SLEEP",#13) 'Cause channel 0 (RS-232) of motor 2 to SLEEP.
PRINT(#130,"WAKE",#13) 'Cause channel 0 (RS-232) of motor 2 to WAKE.
PRINT(#130,"SLEEP1",#13) 'Cause channel 1 (RS-485) of motor 2 to SLEEP.
'through channel 0 (RS-232).
PRINT(#130,"WAKE1",#13) 'Cause channel 1 (RS-485) of motor 2 to WAKE
'through channel 0 (RS-232).
'Assuming channel 1 (RS-485) is open on all motors with the
'OCHN command, the same commands can be sent with the PRINT1
'command:
OCHN(RS4,1,N,9600,1,8,C) 'Open ports 4 and 5 as RS-485 channel 1.
PRINT1(#130,"SLEEP",#13) 'Cause channel 0 (RS-232) of motor 2 to SLEEP.
PRINT1(#130,"WAKE",#13) 'Cause channel 0 (RS-232) of motor 2 to WAKE.
PRINT1(#130,"SLEEP1",#13) 'Cause channel 1 (RS-485) of motor 2 to SLEEP.
PRINT1(#130,"WAKE1",#13) 'Cause channel 1 (RS-485) of motor 2 to WAKE.
END
RELATED COMMANDS:
SLEEP Ignore Incoming Commands on Communications Port 0 (see page 706)
SLEEP1 Ignore Incoming Commands on Communications Port 1 (see page 708)
WAKE1 Wake Communications Port 1 (see page 799)
Part 2: Commands: WAKE