Parker Hannifin GEM6K manual Ntmpwi, Network Map Integer Variables for Writing to PLC

Models: GEM6K 6K

1 47
Download 47 pages 8.21 Kb
Page 29
Image 29
NTMPWI

Potential Error Conditions:

You are not allowed to map the same 6K VARI variables for read and write functions. Nor are you allowed to map the same 6K VARI variables to another PLC. If you attempt either of these conditions, the 6K will not accept the NTMPRI command and will transmit the error message “VARIABLE MAPPING CONFLICT…”.

If you attempt to read from an AB data file of the wrong type, or read from a non-existent data element, the 6K will not accept the NTMPRI command, it will transmit the error message “ERROR, INVALID FILE TYPE, NUMBER OR SIZE…” and it will automatically stop polling all mapped binary and integer variables (equivalent to executing the NTMPRBi,i,0,i, NTMPWBi,i,0,i, NTMPRIi,i,0,i, and NTMPWIi,i,0,i, commands).

Control over Polling: If you want to stop the 6K from reading integer data from the PLC, but continue to exchange NTMPWI, NTMPRB and NTMPWB data, use the NTMPRIi,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

2NTMPRI9,15,15,35

; File 9, elements 15-29,

in

the AB PLC are mapped to

2NTPOLL50

; the 6K's integer variables

VARI35-VARI49

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

WAIT(VARI40=22)

; Wait until the value of

VARI40 (mapped to file 9,

 

; element 20, in the PLC)

is

22

NTMPWI

Network Map Integer Variables for Writing to PLC

 

 

Type:

Network

Product

Rev

Syntax:

<!><n>NTMPWI<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:

1NTMPWI0,0,0,0 (no mapping)

 

 

Response:

1NTMPWI: *1NTMPWI1,5,15,23

 

 

See Also:

NTCONN, NTIP, NTMPRB, NTMPRI, NTMPWB, NTPOLL, [ NTS ], TNTS,

 

 

 

TNTSF, VARI

 

 

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

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:

2NTMPWI9,0,15,20

The NTMPWI 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 exchanging integer data. To perform a integer write to 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).

page 25

Page 29
Image 29
Parker Hannifin GEM6K manual Ntmpwi, Network Map Integer Variables for Writing to PLC, Potential Error Conditions