Input Interface Example - Switch Input Example (Sinking Input); Figure 2.4.6: Sinking Input Example Using A Push Button Switch - IMS Mforce micro drive Reference

Motion control
Table of Contents

Advertisement

NOTE: On the
Standard MForce
MicroDrive, power
ground is used to ground the
I/O interface.
NOTE: Advanced
I/O interface
circuit diagrams
and application
examples are available in
the I/O Applications Guide
Appendix.
2-26
I/O Usage Examples — MForce MicroDrive Standard I/O Set
The circuit examples below illustrate possible interface examples for using the MForce MicroDrive Digital
I/O. Additional diagrams and code snippets are available in Appendix D: I/O Application Guide.
The code samples included with these examples will also serve to introduce the user to MForce MicroDrive
programming. Please reference the MForce software manual for more information on the Instructions, Vari-
ables and Flags that make up the MForce MicroDrive command set as well as material on setting up and using
the IMS Terminal.

Input Interface Example - Switch Input Example (Sinking Input)

The following circuit example shows a switch connected between an I/O point and power ground.
Vih = 2.31 V
Vil = 0.99 V
Threshold (nom) = 1.5 V
Iil
Switch Input, Sinking

Figure 2.4.6: Sinking Input Example using a Push Button Switch

Code Sample
For the code sample, this switch will be set up as a G0 sinking input, active when low. When pressed, the
switch will launch the program beginning at address1 in MForce memory:
***Setup Variables***
Sx=4,0,0
****Program***
PG1
MR 20000
H
MR -20000
H
E
PG
= 100 µA
65 - 160 uA
IOx
Iil
GND
'set IO point x to be a G0 input, active when LOW, sinking
'Move +20000 steps relative to current position
'Hold program execution until motion completes
'Move -20000 steps
'Hold program execution until motion completes
'End program, exit program mode
Motion Control MForce MicroDrive Hardware Manual Revision R112706
Internal
pull-up
voltage
3.3 V
100k ohms
detect
logic
24.9k ohms
MForce Plus Sinking Input
Equivalent Circuit

Advertisement

Table of Contents
loading

Table of Contents