beautypg.com

Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual

Page 60

background image

Chapter 6

Discrete I/O

6-5

getbyte

Use this routine to get an 8-bit byte from the input or output image table.

Calling sequence:

value = getbyte(

inout, rack, group, hilow

);

Arguments:

inout:

the constant IN (1) for input image or OUT (0) for output

image.

rack:

an integer 0 to 7, the logical rack number.

group:

an integer 0 to 7, the module group number.

hilow:

the logical constant HI (1) or LO (0) to select the high or low

byte. The high byte corresponds to slot 1 within a module group
(terminals 017-010), and the low byte to slot 0 (terminals 07-00).

Returned values

a character, the value of the byte.

getword

Use this routine to get a 16-bit word from the input or output image table.

Calling sequence:

value = getword(

inout, rack, group

);

Arguments:

inout:

the constant IN (1) for input image or OUT (0) for output

image.

rack:

an integer 0 to 7, the logical rack number.

group:

an integer 0 to 7, the module group number.

Returned values:

an unsigned integer word, the value in the image table for that module

group.