Parker Hannifin 6K Ntmpri Network Map Integer Variables for Reading from PLC, TNTS, TNTSF, Vari

Page 28

Control over Polling: If you want to stop the 6K from writing binary data to the PLC, but continue to exchange NTMPRI, NTMPWI and NTMPRB data, use the NTMPWBi,i,0,i command. If you need to stop polling all mapped variables, use the

nNTPOLL0 command.

Example:

; Identify network server #2 as an Allen-Bradley PLC at

2NTIP1,172,54,125,34

2NTCONN1

; IP address 172.54.125.34

; Attempt connection to network server #2

2NTMPWB3,0,15,20

; File 3, elements 0-14, in the AB PLC are mapped to

2NTPOLL50

; the 6K's binary variables VARB20-VARB34

; Start polling network server #2, set interval to 50 ms

VARB25 = b1111000011110000

; The value of AB file 3, element 5, will be set to

 

; 111000111000, because it is mapped to VARB25

NTMPRI Network Map Integer Variables for Reading from PLC

Type:

Network

Product

Rev

Syntax:

<!><n>NTMPRI<i>,<i>,<i>,<i>

6K

5.3

Units:

n = network server #

 

 

 

1st i = Allen Bradley data file #

 

 

 

2nd i = # of the 1st element in data file (beginning of range)

 

 

 

3rd i = # of the elements to include in range

 

 

 

4th i = # of the 1st integer (VARI) variable in the 6K to map to

 

 

Range:

n = 1-6

 

 

 

1st i = 0-n (n depends on size of file)

 

 

 

2nd i = 0-n (n depends on size of file)

 

 

 

3rd i = 0 or 1-50 (0 disables polling for this mapping only)

 

 

 

4th i = 1-225

 

 

Default:

1NTMPRI0,0,0,0 (no mapping)

 

 

Response:

1NTMPRI: *1NTMPRI1,5,15,23

 

 

See Also:

NTCONN, NTIP, NTMPRB, NTMPWB, NTMPWI, NTPOLL, [ NTS ], NTSELP,

 

 

 

TNTS, TNTSF, VARI

 

 

<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 #2

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: 2NTMPRI9,15,15,35

The NTMPRI command maps a range of integer data elements from the AB PLC to a range of integer (VARI) variables in the 6K. There are 225 VARI variables available in the 6K for storing integer data. To perform an integer data read from the PLC:

1.Assign the AB PLC a server number, according to its IP address (NTIP command).

2.Connect to the AB PLC, according to its server number (NTCONN command).

3.Map a range of integer elements in the AB PLC to a range of integer (VARI) variables in the 6K (NTMPRI command).

4.Start polling the AB device at a specific polling interval (NTPOLL command). This updates the 6K integer (VARI) variables with the integer element data from the AB PLC. You can then use the PLC integer data (via the VARI variables) in conditional expressions, command value substitutions and variable assignments.

Saved in Non-Volatile Memory

This command is saved in the controller’s non-volatile memory, and is remembered on power-up and RESET.

page 24

Image 28
Contents Ethernet Networking for 6K and Gem6K User Information Ethernet Networking Page Overview Setup Wizard AvailableExample Direct Connect to One Server Example Direct Connect to PC Networking Guidelines DevicePing Configuring the 6K for Ethernet Communication Setting TCP/IP Properties and Static MappingPreparing the Controller over RS-232 Changing the 6K’s IP Address or Subnet MaskPage Connecting the 6K to the PC through Ethernet Arp -s 192.168.10.30 0-90-55-0-0-1Networking with Other 6K or Gem6K Products Peer-to-Peer MillisecondsCommunication according to the procedures on Then the command would be 3NTIP2,172,20,34,170Networking with OPTO22 Snap I/O Set see ER, TER, TerfInputs Ntio command to specify the type of module in that positionNetwork Server # Is set see ER, TER, Terf Networking with a DVT Vision SystemModule # on Server n Range Command would be 3NTIP1,172,20,34,124 Networking with an Allen-Bradley SLC 5/05 PLCOPTO22 Ethernet I/O rack Provided belowNTFEN2 Reset 5NTCONN1VARB100-VARB103 5NTPOLL50Exchanging data automatically with the PLC. Here is how to HAB79VARB106 PLCError messages related to Ethernet networking Error ConditionsError Response Possible Cause Related Error Status register bits are noted below Network Connect NtconnER, TER, and Terf Type Syntax Units Range Default Response See Also NtidNetwork Sharing Unit ID for Peer-to-Peer Communication ProductNetwork I/O OPTO22 Configuration Ntio\OUT , \TANI, \TANO, \TIN, \TIO, \TOUT Type Syntax Units Range Default Response NtipNetwork IP Address Server TypeNtmprb Network Map Binary Variables for Reading from PLC ExampleNtmpwb Network Map Binary Variables for Writing to PLCNtmpri Network Map Integer Variables for Reading from PLC TNTS, TNTSF, VariNtmpwi Network Map Integer Variables for Writing to PLCVARI35-VARI49 WAITVARI40=22Network Polling Rate NtpollRange n = Ntrate Network Sharing Rate for Peer-to-Peer CommunicationNtrate *NTRATE50 NTFEN, NTID, SYSPER, VARSHO, VarshiNetwork Program Select Enable NTSNtselp Network StatusNtwrit Default Response See AlsoNetwork Write Ascii String to DVT Camera Tnts TntsfTransfer Network Status Transfer Network Status full-text reportVarshi Default n/aShared Input Variable for Peer-to-Peer Data Exchange Varsho Range i = Default n/aShared Output Variable for Peer-to-Peer Data Exchange Output variable #1 This code is executed on unit #2 Network Analog Input Voltage Status \ANINTIO, \TANI, \TIO, VAR Network Analog Output \ANO\ANO , NTIO, \TANO, \TIO \ANO Network Analog Output StatusNetwork Digital Input Status \INNTIO, \TIN, \TIO, Varb Network Digital Output \OUT\OUT , NTIO, \TIO, \TOUT Network Digital Output Status \OUTVARB9=2\3OUT \TANI Transfer Network Analog Input Status\TANO Transfer Network Analog Output StatusRange n = Default n/a \TIN\TIO Transfer Network Digital Input Status\TOUT Transfer Network Digital Output StatusDigital Outputs Analog Outputs