NTMPRB Network Map Binary Variables for Reading from PLC
Type: | Network | Product | Rev |
Syntax: | <!><n>NTMPRB<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 binary (VARB) variable in the 6K to map to |
|
|
Range: | n = |
|
|
| 1st i = |
|
|
| 2nd i = |
|
|
| 3rd i = 0 or |
|
|
| 4th i = |
|
|
Default: | 1NTMPRB0,0,0,0 (no mapping) |
|
|
Response: | 1NTMPRB: *1NTMPRB1,5,15,23 |
|
|
See Also: | NTCONN, NTIP, NTMPWB, NTMPWI, NTMPRI, NTPOLL, [ NTS ], TNTS, |
|
|
| TNTSF, VARB |
|
|
<n> NTMPRB <i>,<i>,<i>,<i>
Network Server #
Range:
#of
#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:
•
•The PLC’s binary data file 3 has 30 elements. Use data elements
•Use the 6K’s binary variables
from the PLC.
The required mapping command is: 2NTMPRB3,15,15,35
The NTMPRB command maps a range of binary data elements from the AB PLC to a range of binary (VARB) variables in the
6K. There are 125 VARB variables available in the 6K for storing binary data. To perform a binary 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 binary elements in the AB PLC to a range of binary (VARB) variables in the 6K (NTMPRB command).
4.Start polling the AB device at a specific polling interval (NTPOLL command). This updates the 6K binary (VARB) variables with the binary element data from the AB PLC. You can then use the PLC binary data (via the VARB variables) in conditional expressions, command value substitutions and variable assignments.
Saved in Non-Volatile Memory
This command is saved in the controller’s
Potential Error Conditions:
•You are not allowed to map the same 6K VARB variables for read and write functions. Nor are you allowed to map the same 6K VARB variables to another PLC. If you attempt either of these conditions, the 6K will not accept the NTMPRB 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
Control over Polling: If you want to stop the 6K from reading binary data from the PLC, but continue to exchange NTMPRI, NTMPWI and NTMPWB data, use the NTMPRBi,i,0,i command. If you need to stop polling all mapped variables, use the nNTPOLL0 command.
Example: | ; Identify network server #2 as an |
2NTIP1,172,54,125,34 |
page 22