Intelligent Motion Systems Modular LYNX System User Manual

Page 30

Advertising
background image

1 - 30

Modular LYNX System 12.05.2003

R e a d / W r i t e a n I / O G r o u p

When using the IO variable to read the state of a group of
inputs/outputs, or write to a group of outputs you would first
want to configure the entire I/O group to be general purpose
inputs or outputs using the IOS variable. In this case the
response or input won’t be a logic state of 1 or 0, but rather the
decimal equivalent (0 to 63) of the 6 bit binary number repre-
sented by the entire group.

When addressing the I/O as a group the LSB (Least Significant
Bit
) will be line 1 of the group, (e.g. 21, 31, 41, 51). The MSB
(Most Significant Bit) will be line 6 of the group (e.g. 26, 36, 46,
56
).

The table on the left shows the bit weight of each I/O line in the
group. It also illustrates the state should 6 LED’s be connected
to I/O group 20 when entering the IO variables in this exercise.

Configure the IOS variable such that group 20 is all general
purpose outputs, active low or:

IOS 20 = 0,1,0

Enter the following in the terminal:

IO 20 = 35

As shown in the table I/O lines 26, 22 and 21 should be illumi-
nated, 25, 24 and 23 should be off.

Enter this next:

IO 20 = 7

Now I/O 21, 22 and 23 should be illuminated.

IO 20 = 49

I/O 26, 25, and 21 are illuminated.

1

1

1

0

0

0

BINARY STATE OF I/O GROUP 20

IO 20 = 35

I/O 21

LSB

I/O 26

MSB

I/O 22

I/O 23

I/O 24

I/O 25

32

2

1

16

8

4

BIT WEIGHT DISTRIBUTION TABLE

FOR GROUP 20 I/O

I/O 21

LSB

I/O 26

MSB

I/O 22

I/O 23

I/O 24

I/O 25

0

1

1

0

0

1

BINARY STATE OF I/O GROUP 20

IO 20 = 7

I/O 21

LSB

I/O 26

MSB

I/O 22

I/O 23

I/O 24

I/O 25

1

0

1

1

0

0

BINARY STATE OF I/O GROUP 20

IO 20 = 49

I/O 21

LSB

I/O 26

MSB

I/O 22

I/O 23

I/O 24

I/O 25

NOTE:

You can only write to General Purpose Outputs. If you

attempt to write to and input or dedicated output type an error
will occur!

N

Table 6.4: Binary State of Outputs

Advertising