Support

MDrive/MForce – Move on an input

The following program will perform different moves based upon the state of inputs 1, 2 and 3.

Enter "EX 1" into the terminal to run the program. When you toggle switches 1, 2 and 3 you will see the motor perform the programmed moves and the text display indicating completion!

Move on an input diagram

S1=0,0,0  'I/O setup GP,LOW Active Sinking
S2=0,0,0
S3=0,0,0

PG 1           'Call subs based on input
LB aa
CL zx, I1=1
CL zy, I2=1
CL zz, I3=1
BR aa

LB zx          'perform move on input 1=true
MR 51200
H
MR -51200
H
PR "Been there"
RT

LB zy          'perform series of moves: input 2=true
MR 20000
H
MR 50000
H
MR 70000
H
PR "Done that"
RT

LB zz          'perform series of moves: input 3=true
MR -20000
H
MR -50000
H
MR -70000
H
PR "Don't Need Tshirt..GOT MOD!"
RT

E
PG

Download Move on an Input .mxt file
(color-coded in IMS Terminal)

 

> Motion Control Code Index