2-24
MDrive34Plus Motion Control Hardware Revision R080106
Interfacing the Analog Input
The analog input of the MDrivePlus Motion Control is configured from the factory as a 0 to 5V, 10 bit resolu-
tion input (S5=9). This offers the user the ability to receive input from temperature, pressure, or other forms of
sensors, and then control events based upon the input.
The value of this input will be read using the I5 instruction, which has a range of 0 to 1023, where 0 = 0 volts
and 1024 = 5.0 volts. The MDrivePlus Motion Control may also be configured for a 4 to 20 mA or 0 to 20
mA Analog Input (S5 = 10).
Sample Usage
‘***********Main Program**************
S5=9,0
‘set analog input to read variable voltage (0 to +5VDC)
PG 100
‘start prog. address 100
LB A1
‘label program A1
CL A2, I5<500 ‘Call Sub A2, If I5 is less than 500
CL A3, I5>524 ‘Call Sub A3, If I5 is greater than 524
BR A1
‘loop to A1
‘***********Subroutines**************
LB A2
‘label subroutine A2
MA 2000 ‘Move Absolute 2000 steps
H
‘Hold program execution until motion ceases
RT
‘return from subroutine
LB A3
‘label subroutine A3
MA -2000
‘Move Absolute -2000 steps
H
‘Hold program execution until motion ceases
RT
‘return from subroutine
E
‘End
PG
‘Exit program
Figure 2.3.13: Analog Input - Voltage Mode
+V (0-5VDC/0-10VDC)
10 k Ohm Potentiometer
Voltage Mode
trol
ePlus Motion Con
MDrive
n
e
l
M
M
Analog Input
Ground
S5=9,0 'set input +VDC range to 0 - +5 VDC
S5=9,1 'set input +VDC range to 0 - +10 VDC
Summary of Contents for MDrive 34 Plus Series
Page 12: ...1 6 MDrive34Plus Motion Control Hardware Revision R080106 Page Intentionally Left Blank ...
Page 24: ...1 18 MDrive34Plus Motion Control Hardware Revision R080106 Page Intentionally Left Blank ...
Page 26: ...2 2 MDrive34Plus Motion Control Hardware Revision R080106 ...
Page 50: ...2 26 MDrive34Plus Motion Control Hardware Revision R080106 Page Intentionally Left Blank ...