Parker Hannifin GEM6K manual Network Digital Input Status, NTIO, \TIN, \TIO, Varb

Page 41

[ \IN ]

Type:

Syntax:

Units:

Range:

Default:

Response:

See Also:

Network Digital Input Status

Network; Assignment

or Comparison

Product

Rev

n\mIN<=Bbbbb>

(see

example below)

6K

5.3

n\iIN.i

(see

example below)

 

 

n = network server #

 

 

 

m = module #

 

 

 

 

i = digital input #

on module “m” (for bit-select operation)

 

 

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

NTIO, \TIN, \TIO, VARB

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.

EXAMPLE: OPTO22 is Network Server #2

0

1

2

3

4

5

6

7

Digital

Digital

Digital

Digital

Analog

Analog

Analog

Analog

Input

Input

Output

Output

Output

Output

Input

Input

Module

Module

Module

Module

Module

Module

Module

Module

Input

Input

Output

Output

Output

Output

Input

Input

1

1

1

1

1

1

1

1

Input

Input

Output

Output

Output

Output

Input

Input

2

2

2

2

2

2

2

2

Input

Input

Output

Output

 

 

 

 

3

3

3

3

 

 

 

 

Input

Input

Output

Output

 

 

 

 

4

4

4

4

 

 

 

 

 

2\0IN.3

 

 

2\3OUT.2

 

 

2\5ANO.1

 

 

2\7ANI.2

 

 

 

 

 

 

Example:

; Identify network server #2

as an OPTO22 unit at IP address

2NTIP2,172,54,125,34

2NTCONN1

; 172.54.125.34

 

 

 

 

 

 

 

 

 

; 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

Image 41
Contents Ethernet Networking for 6K and Gem6K User Information Ethernet Networking Page Example Direct Connect to One Server Setup Wizard AvailableOverview Example Direct Connect to PC Device Networking GuidelinesPing Setting TCP/IP Properties and Static Mapping Configuring the 6K for Ethernet CommunicationPreparing the Controller over RS-232 Changing the 6K’s IP Address or Subnet MaskPage Arp -s 192.168.10.30 0-90-55-0-0-1 Connecting the 6K to the PC through EthernetMilliseconds Networking with Other 6K or Gem6K Products Peer-to-PeerThen the command would be 3NTIP2,172,20,34,170 Communication according to the procedures onNetworking with OPTO22 Snap I/O Set see ER, TER, TerfNetwork Server # Ntio command to specify the type of module in that positionInputs Module # on Server n Range Networking with a DVT Vision SystemIs set see ER, TER, Terf Networking with an Allen-Bradley SLC 5/05 PLC Command would be 3NTIP1,172,20,34,124OPTO22 Ethernet I/O rack Provided below5NTCONN1 NTFEN2 ResetVARB100-VARB103 5NTPOLL50HAB79 Exchanging data automatically with the PLC. Here is how toVARB106 PLCError Response Possible Cause Error ConditionsError messages related to Ethernet networking Related Error Status register bits are noted below ER, TER, and Terf NtconnNetwork Connect Ntid Type Syntax Units Range Default Response See AlsoNetwork Sharing Unit ID for Peer-to-Peer Communication ProductNtio Network I/O OPTO22 Configuration\OUT , \TANI, \TANO, \TIN, \TIO, \TOUT Ntip Type Syntax Units Range Default ResponseNetwork IP Address Server TypeExample Ntmprb Network Map Binary Variables for Reading from PLCNetwork Map Binary Variables for Writing to PLC NtmpwbTNTS, TNTSF, Vari Ntmpri Network Map Integer Variables for Reading from PLCNetwork Map Integer Variables for Writing to PLC NtmpwiVARI35-VARI49 WAITVARI40=22Range n = NtpollNetwork Polling Rate Network Sharing Rate for Peer-to-Peer Communication NtrateNtrate *NTRATE50 NTFEN, NTID, SYSPER, VARSHO, VarshiNTS Network Program Select EnableNtselp Network StatusNetwork Write Ascii String to DVT Camera Default Response See AlsoNtwrit Tntsf TntsTransfer Network Status Transfer Network Status full-text reportShared Input Variable for Peer-to-Peer Data Exchange Default n/aVarshi Shared Output Variable for Peer-to-Peer Data Exchange Range i = Default n/aVarsho Output variable #1 This code is executed on unit #2 NTIO, \TANI, \TIO, VAR \ANINetwork Analog Input Voltage Status \ANO , NTIO, \TANO, \TIO \ANONetwork Analog Output Network Analog Output Status \ANONTIO, \TIN, \TIO, Varb \INNetwork Digital Input Status \OUT , NTIO, \TIO, \TOUT \OUTNetwork Digital Output VARB9=2\3OUT \OUTNetwork Digital Output Status Transfer Network Analog Input Status \TANITransfer Network Analog Output Status \TANO\TIN Range n = Default n/a\TIO Transfer Network Digital Input StatusTransfer Network Digital Output Status \TOUTDigital Outputs Analog Outputs