'MDrive Motion Control Sample Program 'Use of I/O Sample 'CODE DESCRIPTION PG 100 'Enter program mode at address 100 LB SU 'Label using SU to start program upon power up A=1000000 'Sets acceleration to '1000000 steps/second square S1=0,1 'Sets I/O 1 as a general purpose input, 'active high S5=9 'Sets I/O 5 as a 0-5V analog input LB Wa 'Label Wa for setting up wait loop BR M1,I1=1 'If input is active then branch to label M1 SL=0 'Sets slew speed to 0 BR Wa,I1=0 'If input is inactive then branch to label Wa LB M1 'Label for motion profile 1 SL=15*100 'Slew the axis at the rate of 0-1024 times 100 BR Wa 'Unconditional branch to wait loop 'to scan input E 'End program PG 'Exit program mode