Intelligent Motion Systems Modular LYNX System User Manual

Page 34

Advertising
background image

1 - 34

Modular LYNX System 12.05.2003

T y p i c a l F u n c t i o n s o f t h e D i f f e r e n t i a l I / O

C o n n e c t i n g a n d U s i n g a n E n c o d e r

The differential I/O module can be set up to receive encoder feedback using either a differential or a single
ended output encoder. A differential output encoder would typically be connected to differential input pairs
13 and 14 (P1, pins 1 – 4) as the default setting for I/O 13 and 14 is set up to accept a quadrature encoder
input. Channel A of the encoder would be connected to input pair 13 (P1, pins 1 & 2) and channel B would
be connected to input pair 14 (P1, pins 3 & 4). A single ended output encoder would be connected to the
positive inputs of the input pair. Whether you use a differential encoder or single ended encoder the same
software commands and settings will be used.

In setting up your system to run with an encoder you will be using the following variables, flags, and
instructions. The variables used with an encoder will be

MUNIT, EUNIT,

CTR2

, and

POS.

The Encoder

Enable Flag

EE

, and the instruction

MOVR

will be used. The block diagram to the left illustrates a LYNX

system with the encoder and drive connections that will be used in this example.

The sequence of commands (in bold) used to make this setup function would be as follows:

‘Set the MUNIT Variable to 51,200 steps/rev

MUNIT = 51200

‘Set encoder enable to TRUE (1), default value = FALSE (0)

EE = 1

‘Set the EUNIT (Encoder Units) variable to 800 (200 [Encoder Resolution] X 4 [Quadrature Input])
This means that 1 unit of motion, or 1 POS, is equal to 800 encoder counts. In this instance it will be
1 rotation of the motor.

EUNIT = 800

‘Save the above flag and variable settings

SAVE

Now you may begin to use the motion command MOVR, as well as PRINT POS and PRINT CTR2 to see the
number of encoder counts fed back to the system.

‘Set the motor position to 0

POS = 0

‘Move the motor 2 units (2 X EUNIT) relative to current position.

MOVR 2

‘Print the value of CTR2. This value will indicate the number of encoder counts that the motor has

moved. Your terminal should echo back the number “1600”.

In the Equivalent Circuit in Figure 6.7 an Output is being used as Step or Direction on a driver.

For the configuration example, use I/O line 13 for the output. Since by default the line is a quadrature input
we must configure it to be a Step/Direction Output by setting the IOS Variable to the following:
IOS 13 = 3, 1, 0, 1, 2, 0
This breaks down as:

IOS 13 - Identifies the line being configured as 13.
3 - Sets the I/O Type to Clock 2A (default).
1 - Sets it as an output.
0 - Sets Logic at Low True.
1 - Edge Triggered.
2 - Sets the Clock Type to Step/Direction.
0 - No Ratio.

Advertising