Parker Hannifin GEM6K manual NTFEN2 Reset, 5NTCONN1, VARB100-VARB103, 5NTPOLL50

Page 17

n NTMPRI i, i, i, i

Network Server #

Range: 1-6

#of Allen-Bradley data file

#of first element in AB data file (beginning of range)

#of elements in range

#of first integer variable (VARI) in 6K (beginning of range, max value is 225)

EXAMPLE:

IF:

Allen-Bradley PLC is server #5

The PLC’s integer data file 9 has 30 elements. Use data elements 15-29 (15 elements total) for integer data that is to be shared with the 6K.

Use the 6K’s integer variables 35-49 (15 variables total) to store the data

from the PLC.

The required mapping command is:

5NTMPRI9,15,15,35

Use the NTMPWB command to write up to 50 binary values from VARB variables in the 6K to binary elements in a PLC’s binary file.

n NTMPWB i, i, i, i

Network Server #

Range: 1-6

#of Allen-Bradley data file

#of first element in AB data file (beginning of range)

#of elements in range

#of first binary variable (VARB) in 6K (beginning of range, max value is 125)

EXAMPLE:

IF:

Allen-Bradley PLC is server #5

In the PLC’s binary data file 3, use data elements 0-14 (15 elements total) for binary data that is to be transmitted from the 6K.

Use the 6K’s binary variables 20-34 (15 variables total) to store the data

to be transmitted to the PLC. The required mapping command is:

5NTMPWB3,0,15,20

Use the NTMPWI command to write up to 50 integer values from VARI variables in the 6K to a integer elements in a PLC’s integer file.

n NTMPWI i, i, i, i

Network Server #

Range: 1-6

#of Allen-Bradley data file

#of first element in AB data file (beginning of range)

#of elements in range

#of first integer variable (VARI) in 6K (beginning of range, max value is 225)

EXAMPLE:

IF:

Allen-Bradley PLC is server #5

The PLC’s integer data file 9 has 30 elements. Use data elements 0-14 (15 elements total) for integer data to be transmitted from the 6K.

Use the 6K’s integer variables 20-34 (15 variables total) to store the data

to be transmitted to the PLC. The required mapping command is:

5NTMPWI9,0,15,20

7.Set the polling rate with the NTPOLL command. 50 milliseconds is recommended. For example, to set the polling rate to 50 ms on Server #5, use the 5NTPOLL50 command. If there is an error during polling, Error Status bit #24 will be set (see ER, TER or TERF).

Example

NTADDR172,34,54,123

; Set the IP address of the

6K

Fieldbus units only)

 

OPTEN0

; Disable the option card (for

 

RESET

; Enable network function on 6K

 

 

NTFEN2

 

 

RESET

 

network server #5 as an Allen Bradley PLC

 

5NTIP1,172,34,54,124 ; Identify

 

5NTCONN1

; at IP address 172.34.54.124

 

 

; Connect to network server

#5

PLC is mapped to the 6K's

 

5NTMPRB11,7,1,106

; File 11,

element 7 in the

AB

 

5NTMPRI20,5,2,128

; binary variable VARB106

 

AB PLC are mapped to

 

; File 20,

elements 5-6 in the

 

5NTMPWB11,3,4,100

; the 6K's

integer variables VARI128-VARI129, respectively

 

; File 11,

elements 3-6, in

the AB PLC are mapped to

 

5NTMPWI20,3,2,120

; the 6K's

binary variables

VARB100-VARB103

 

; File 20,

elements 3-4, in

the AB PLC are mapped to

 

5NTPOLL50

; the 6K's

integer variables VARI120-VARB121

 

; Start polling network server

#5, set interval to 50 ms.

;*********************************************************************

;The 6K's VARB106 will read from the PLC's File 11, element 7.

;The 6K's VARI128-VARI129 will read from the PLC's File 20, elements 5-6.

;The PLC's File 11, elements 3-6 will read from the 6K's VARB100-VARB103.

;The PLC's File 20, elements 3-4 will read from the 6K's VARI120-VARB121.

;*********************************************************************

page 13

Image 17
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