47
3]
Insert Analog Input/Joystick Module into Slot 1 (C), Slot 2
(D) or Slot 3 (E).
4]
Press firmly until expansion board is securely seated and
locked into place by retaining clips (F).
5]
Reassemble MicroLYNX case in accordance with Figure
9.9.
6]
Affix labels as shown. Use a highlighter or marker pen to
highlight slot used.
T h e A D S V a r i a b l e ( A t o D S e t u p )
The ADS variable is the heart of the MicroLYNX Analog Input/Joystick
Interface Module. There are three parameters that control how the module will
respond to input. It is used as follows:
ADS <chan>=<aunit>,<mode>,<law>
<chan>: Is the analog input channel that will be used, either 1 or 2.
<aunit>: This parameter sets the relationship between the analog input and
units that are convenient to the user. In analog (User) mode the aunits param-
eter is the number of user units corresponding to the Analog Module full scale.
In Joystick (Velocity) mode the aunits parameter is the number of munits/
second corresponding to the Joystick Full Scale (JSFS) parameter.
<mode>: The mode parameter controls whether or not the input is used for
velocity control; 1 = analog input, 2 = velocity or joystick mode.
<law>: Controls the sensitivity of the velocity with respect to the analog
input. The effect of the analog input can be linear, square or cube. <law>
applies to velocity mode only.
Here are two examples that illustrate the ADS variable:
E x a m p l e 1
A pressure transducer is connected to input 1. The transducer output is 10 psi/
volt. Vref represents the voltage at the Input to the Analog Joystick Module
corresponding to full scale. Vref as measured at pin 1 on the Analog Joystick
Module is 5.05 volts. Thus aunits for channel 1 is 10 psi/volt x 5.05 volts or
50.5. The value returned by an analog read of Channel 1 will be in psi. Note
that the full scale output of the transducer does not have to equal the Analog
Module full scale. This setup would be expressed thus:
ADS 1=50.5, 1
E x a m p l e 2
A 1.8 degree (per full step) motor connected to a lead screw with a lead of .1
inches/rev. The step motor drive is set for 32 usteps per full step. A joystick is
connected to channel 1. To program speed and motion in inches set munits to
(32 pulses/1.8 degrees) x (360 degrees/1 rev ) x (1 rev/.1 inches). If a maximum
speed of 3 inches/second is desired while in Joystick operation set aunits for
channel 1 to 3. For linear Joystick operation the setup command is ADS 1 =
3,2,1
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from