[ NTS ]
Network Status
Type:
Network; Assignment/Comparison
Product Rev
Syntax:
nTNTS<.i>
Units:
n = server #
i = bit number of status register (see table below)
Range:
n = 1-6
i = 1-8
Default:
n/a
Response:
n/a
See Also:
NTCONN, NTIP, NTPOLL, TNTSF
6K 5.3
Use the
NTS
operand to assign the Network Status bits to a binary variable, or to make a comparison against a binary or
hexadecimal value.
Syntax:
VARBx=nNTS
where “
n
” is the network server number (e.g.,
VARB16=2NTS
). The
NTS
operand can also be used
in an expression such as
IF(2NTS=b11Ø1)
, or
IF(2NTS=h7F)
. To make a comparison against a binary value,
place the letter b (b or B) in front of the value. The binary value itself must only contain ones, zeros, or Xs (1, Ø,
X, x). To make a comparison against a hexadecimal value, place the letter h (h or H) in front of the value. The
hexadecimal value itself must only contain the letters A through F, or the numbers Ø through 9.
Bit Select Operation: Use the bit select operator (.) in conjunction with the bit number to specify a specific
Network Status bit. Examples:
VARB1=2NTS.3
assigns Network Status bit 3 for network server 2 to binary
variable 1;
IF(2NTS.3=b1)
is a conditional statement that is true if Network Status bit 3 for network server 2 is
set to 1 (polling is enabled).
Bit #
(left to right)
Function (1 = yes, 0 = no)
1 Connection Open.
2 Client Connection Error. This bit is set when a connection attempt with a server times out. This will
also set Error Status bit #23 (see ER, TER, TERF).
3
Polling Enabled. This bit is set when polling is enabled with NTPOLL.
4 Error during polling. This bit is set when an error during polling occurs. This will also set Error Status
bit #24 (see ER, TER, TERF).
5-8
Reserved
NTSELP
Network Program Select Enable
Type:
Network
Product Rev
Syntax:
<!>NTSELP<b>,<i>
Units:
b = enable bit
i = number of the integer variable (VARI) used for program
select
Range:
b = 0 (disable) or 1 (enable)
i = 1-225
Default:
b = 0 (disabled)
i = 1
Response:
NTSELP: *NTSELP0,1
See Also:
COMEXS, NTCONN, NTIP, NTMPRI, NTMPWI, NTPOLL, [ NTS ], TDIR,
TNTS, TNTSF
6K 5.3
The
NTSELP
command allows you to enable/disable the Network Program Select Mode, where, through the process of
exchanging integer data, an Allen-Bradley PLC can execute a 6K/Gem6K program by its number. Use the following
procedure as a guideline for implementing the Network Program Select mode:
1. Setup up Ethernet Networking with the Allen-Bradley PLC. This includes assigning the server connection (
NTIP
)
and connecting (
NTCONN
).
2. Use the
NTMPRI
command to map at least one 6K variable to an Element in an integer data file in the PLC.
page 28