n NTMPRI i, i, i, i
Network Server #
Range:
#of
#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
•Use the 6K’s integer variables
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:
#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:
•
•In the PLC’s binary data file 3, use data elements
•Use the 6K’s binary variables
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:
#of
#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:
•
•The PLC’s integer data file 9 has 30 elements. Use data elements
•Use the 6K’s integer variables
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 | |||
| 5NTMPWB11,3,4,100 | ; the 6K's | integer variables | ||
| ; File 11, | elements | the AB PLC are mapped to | ||
| 5NTMPWI20,3,2,120 | ; the 6K's | binary variables |
| |
| ; File 20, | elements | the AB PLC are mapped to | ||
| 5NTPOLL50 | ; the 6K's | integer variables | ||
| ; 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
;The PLC's File 11, elements
;The PLC's File 20, elements
;*********************************************************************
page 13