'MDrive Motion Control Sample Program 'If THEN Sample 'CODE DESCRIPTION PG 100 'Enter program mode at address 100 LB SU 'Label using SU to start program 'upon power up S1=0,1 'Sets I/O 1 as a general purpose 'input, active high LB M1 'Label to begin motion profile 1 MR 200000 'Move relative 200000 steps H 'Hold until motion is complete BR M1, I1=1 'If input is true then branch to 'label M1 LB M2 'Label to begin motion profile 2 MR -100000 'Move relative 100000 steps H 'Hold until motion is complete BR M1, I1=1 'If input is true then brance to 'label M1 BR M2 'Unconditional branch to label M2 E 'End program PG 'Exit program mode