beautypg.com

In ]network digital input status, Network digital input status – Parker Hannifin GEM6K User Manual

Page 41

background image

[ \IN ]

Network Digital Input Status

Type:

Network; Assignment or Comparison

Product Rev

Syntax:

n\mIN<=Bbbbb> (see example below)
n\iIN.i (see example below)

Units:

n = network server #
m = module #
i = digital input # on module “m” (for bit-select operation)

Range:

n = 1-6
m = 0-7
j = 1-4

Default:

n/a

Response:

n/a

See Also:

NTIO, \TIN, \TIO, VARB

6K 5.3

Use the

\IN

operand to assign an OPTO22 digital input value to a binary variable (

VARB

), or to make a comparison against a

binary or hexadecimal value.

Syntax:

VARBx=

n\mIN

where “

n

” is the network server number of the OPTO22 unit and “

m

” is the I/O module number

(e.g.,

VARB16=2\0IN

). The

\IN

operand can also be used in an expression such as

IF(2\3IN=b11Ø1)

, or

IF(2\3IN=h7F)

. To make a comparison against a binary value, place the letter b (b or B) in front of the value.

The binary value itself must only contain ones, zeros, or Xs (1, Ø, X, x). To make a comparison against a
hexadecimal value, place the letter h (h or H) in front of the value. The hexadecimal value itself must only
contain the letters A-F, or the numbers Ø-9.
Bit Select Operation: To address only one input value, instead of all the inputs, use the bit select (

.

) operator.

For example,

VARB1=2\3IN.3

assigns the binary state of input 3 on module 3 of OPTO22 server 2 to binary

variable 1. In another example,

WAIT(2\3IN.1=b1)

tells the 6K to wait until input 1 on module 3 of OPTO22

server 2 is active.

The controller addresses the OPTO22 I/O locations as follows:

Each I/O bit is addressed by its location on a specific module. (NOTE: I/O points are not addressed by an absolute
32-bit location on the OPTO22.) Digital input and output modules have four I/O points, or channels, and are numbered
1-4. Analog input and output modules have two I/O points, or channels, and are numbered 1-2.

Digital

Input

Module

Input

1

0

Input

2

Input

3

Input

4

Digital

Input

Module

Input

1

1

Input

2

Input

3

Input

4

Digital

Output

Module

Output

1

2

Output

2

Output

3

Output

4

Digital

Output

Module

Output

1

3

Output

2

Output

3

Output

4

Analog

Output

Module

Output

1

4

Output

2

Analog

Output

Module

Output

1

5

Output

2

Analog

Input

Module

Input

1

6

Input

2

Analog

Input

Module

Input

1

7

Input

2

EXAMPLE: OPTO22 is Network Server #2

2\0IN.3

2\3OUT.2

2\5ANO.1

2\7ANI.2

Example:
2NTIP2,172,54,125,34 ; Identify network server #2 as an OPTO22 unit at IP address

; 172.54.125.34

2NTCONN1

; Attempt a connection to network server #2 (OPTO22 unit)

2\0NTIO1

; Server #2 (OPTO22), module #0 is a digital input module

2\1NTIO1

; Server #2 (OPTO22), module #1 is a digital input module

WAIT(2\1IN.2=b1)

; Wait until input #2 of module #1 on Server #2 (OPTO22) is active

IF(2\0IN=bxx1)

; If input #3 of module 0 on Server #2 (OPTO22) is active ...

page 37

This manual is related to the following products: