User Manual

Table Of Contents
Connecting Multiple Similar Sensors
Advanced Digital Motor Controller User Manual 75
Accessing Multiple Sensor Information Sequentially
Two methods are available for accessing each sensors data when multiple sensors are
connected.
The first method is to only have one sensor enabled at any one time. This is done by en-
abling and disabling pulse inputs via serial commands or MicroBasic scripting. Examples:
^PMOD 1 0 : Serial command to Disable Sensor on pulse input 1
Setconfig(_PMOD, 1, 0) : Microbasic instruction to disable sensor on Pulse input 1
^PMOD 2 4 : Enable Sensor on Pulse input 2
Setconfig(_PMOD, 2, 4) : Microbasic instruction to enable sensor on Pulse input 2
The sensor information can then be accessed with the respective queries as discussed
above (?MGD, ?MGT, ?MGM, ?FLW).
Accessing Multiple Sensor Information Simultaneously
It is possible to have all sensors enabled at the same time by having their respective pulse
input configured accordingly.
When more than one pulse input is configured that way, the sensor data is accessible
using the ?MGD, ?MGT, ?MGM, ?MGY or ?FLW queries as follows, where x is the pulse
input number (1, 2, 3 etc.).
Reading Tape Detect
?MGD x or GetValue(_MGD, x)
Returns the Tape Detect state of Sensor at Pulse input x
Example:
?MGD 2 : Returns the Tape Detect state of Sensor 2
Reading Marker Detect
?MGM 2*(x-1)+1 or GetValue(_MGM, 2*(x-1)+1)
Returns the state of the Left Marker Detect state of Sensor at Pulse input x
?MGM 2*(x-1)+2 or GetValue(_MGM, 2*(x-1)+2)
Returns the state of the Right Marker Detect state of Sensor at Pulse input x
Examples:
?MGM 1 : Returns the Left Marker Detect state of Sensor at input 1
?MGM 2 : Returns the Right Marker Detect state of Sensor at input 1