Interfacing The Analog Input; Sample Usage; Figure 2.4.16: Analog Input - Voltage Mode - IMS Mforce micro drive Reference

Motion control
Table of Contents

Advertisement

Interfacing the Analog Input

The analog input of the MForce MicroDrive is configured from the factory as a 0 to 5V, 10 bit resolution
input (S5=9). This offers the user the ability to receive input from temperature, pressure, or other forms of sen-
sors, 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 MForce MicroDrive 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
PG 100
LB A1
CL A2, I5<500
CL A3, I5>524
BR A1
'***********Subroutines**************
LB A2
MA 2000 'Move Absolute 2000 steps
H
RT
LB A3
MA -2000
H
RT
E
PG
+V (0-5VDC/0-10VDC)
Voltage Mode
S5=9,0
'set input +VDC range to 0 - +5 VDC
S5=9,1
'set input +VDC range to 0 - +10 VDC
Part 2: Connections and Interface
'set analog input to read variable voltage (0 to +5VDC)
'start prog. address 100
'label program A1
'Call Sub A2, If I5 is less than 500
'Call Sub A3, If I5 is greater than 524
'loop to A1
'label subroutine A2
'Hold program execution until motion ceases
'return from subroutine
'label subroutine A3
'Move Absolute -2000 steps
'Hold program execution until motion ceases
'return from subroutine
'End
'Exit program
Analog Input
10 k Ohm Potentiometer

Figure 2.4.16: Analog Input - Voltage Mode

Ground
MForce Plus Motion Control
2-35

Advertisement

Table of Contents
loading

Table of Contents