MDrive/MForce – Motion sample
This is a very basic demonstration of how to control a move from inside a program. To run this program, type "EX M1" in the IMS Terminal window and press Enter.
'CODE DESCRIPTION
PG 100 'Enter program mode at address 100
LB M1 'Label program M1
P=0 'Set position counter to 0
MR 200000 'Set motion mode to relative,
'move relative 200000
H 'Hold until motion is complete
PR P 'Print position to terminal
E 'End program
PG 'Exit program mode