Parker Hannifin GEM6K Ntwrit, Network Write Ascii String to DVT Camera, Default Response See Also

Page 33

3.Start polling the PLC for integer data (NTPOLL). When the 6K polls the PLC, it will read the value of the mapped Element into the associated 6K integer variable (VARI).

4.Use the NTSELP command to enable the Network Program Select mode and identify the 6K integer variable (VARI) to supply the program selection number. Once enabled, the 6K will poll the PLC (at the NTPOLL rate), read the integer data from the PLC into the mapped VARI variable, and execute the program (by number) according to the value of the mapped VARI variable. After executing and completing the selected program, the controller will resume polling the inputs again. To disable the Network Program Select mode, place the NTSELPØ command in a program that can be selected.

5.Program the PLC to set the Element value to select the program (by its number) in the 6K. For example, suppose Element #4 of File #2 is mapped to the 6K’s integer variable #9. If the value of Element #4 is 8 when it is polled, the 6K will execute program #8.

WHAT IS THE PROGRAM NUMBER?

A program’s number is determined by the order in which the program was downloaded to the controller. The first program downloaded is program #1, the second downloaded is program #2, etc. The number of each program stored in the controller's memory can be obtained through the TDIR report — refer to the number reported in front of each program name. When selecting programs with an integer variable (mapped to an Element in the PLC data file), the 6K will execute the program number that matches the value of the variable at the time the associated Element was polled from the PLC.

Multi-Tasking: If you are using multi-tasking, be aware that each Task has its own Network Program Select Mode. If you wish to enable variable-initiated program selection in an external task (a task other than the task that is executing the NTSELP command), then you must prefix the NTSELP command to address the targeted task. For example 3%NTSELP1,40 enables Network Program Select Mode in Task #3, and uses the value of VARI40 to program the number of the program to execute.

What conditions can disable the Network Program Select Mode?

Executing the Kill (!K) command

Executing the Stop (!S) command, or activating an input defined as a stop input (see INFNC or LIMFNC). This disables Program Select Mode only if the Task is operating in the COMEXS2 mode.

Example:

; Network

server #2 is an Allen-Bradley PLC at IP address

2NTIP1,172,54,125,34

2NTCONN1

; 172.54.125.34

 

; Attempt

connection to network server #2

2NTMPRI20,5,2,128

; VARI128

and VARI129 (in the 6K) are mapped to File 20, Elements

 

; 5 and 6

in the AB PLC. The values of VARI128 and VARI129 will be

2NTPOLL50

; derived

from the values of File 20, elements 5 and 6 in the PLC.

; Start polling

the AB PLC, set polling interval to 50 ms

3%NTSELP1,128

; VARI128

is the network program select variable, which is mapped

 

; with File 20,

Element 5, in the AB PLC. When the 6K polls

 

; Element

5, it

will execute the program according to the value

 

; of Element 5.

The program will be executed in Task 3.

NTWRIT

Network Write ASCII String to DVT Camera

 

 

Type:

Network

Product

Rev

Syntax:

<!><n>NTWRIT"<message>"

6K

5.3

Units:

n = network server #

 

 

 

message = ASCII string

 

 

Range:

n = 1-6

 

 

 

message = up to 69 characters (cannot use ", ; or :)

 

 

Default:

n/a

 

 

 

Response:

n/a

 

 

 

See Also:

NTIP

 

 

 

Use the NTWRIT command to write ASCII strings to the DVT camera. If you address the NTWRIT command to a non-DVT connection (see NTIP), the 6K transmits the error message “INVALID SERVER TYPE”.

Example:

page 29

Image 33
Contents Ethernet Networking for 6K and Gem6K User Information Ethernet Networking Page Setup Wizard Available OverviewExample Direct Connect to One Server Example Direct Connect to PC Device Networking GuidelinesPing Setting TCP/IP Properties and Static Mapping Configuring the 6K for Ethernet CommunicationPreparing the Controller over RS-232 Changing the 6K’s IP Address or Subnet MaskPage Arp -s 192.168.10.30 0-90-55-0-0-1 Connecting the 6K to the PC through EthernetMilliseconds Networking with Other 6K or Gem6K Products Peer-to-PeerThen the command would be 3NTIP2,172,20,34,170 Communication according to the procedures onNetworking with OPTO22 Snap I/O Set see ER, TER, TerfNtio command to specify the type of module in that position InputsNetwork Server # Networking with a DVT Vision System Is set see ER, TER, TerfModule # on Server n Range Networking with an Allen-Bradley SLC 5/05 PLC Command would be 3NTIP1,172,20,34,124OPTO22 Ethernet I/O rack Provided below5NTCONN1 NTFEN2 ResetVARB100-VARB103 5NTPOLL50HAB79 Exchanging data automatically with the PLC. Here is how toVARB106 PLCError Conditions Error messages related to Ethernet networkingError Response Possible Cause Related Error Status register bits are noted below Ntconn Network ConnectER, TER, and Terf Ntid Type Syntax Units Range Default Response See AlsoNetwork Sharing Unit ID for Peer-to-Peer Communication ProductNtio Network I/O OPTO22 Configuration\OUT , \TANI, \TANO, \TIN, \TIO, \TOUT Ntip Type Syntax Units Range Default ResponseNetwork IP Address Server TypeExample Ntmprb Network Map Binary Variables for Reading from PLCNetwork Map Binary Variables for Writing to PLC NtmpwbTNTS, TNTSF, Vari Ntmpri Network Map Integer Variables for Reading from PLCNetwork Map Integer Variables for Writing to PLC NtmpwiVARI35-VARI49 WAITVARI40=22Ntpoll Network Polling RateRange n = Network Sharing Rate for Peer-to-Peer Communication NtrateNtrate *NTRATE50 NTFEN, NTID, SYSPER, VARSHO, VarshiNTS Network Program Select EnableNtselp Network StatusDefault Response See Also NtwritNetwork Write Ascii String to DVT Camera Tntsf TntsTransfer Network Status Transfer Network Status full-text reportDefault n/a VarshiShared Input Variable for Peer-to-Peer Data Exchange Range i = Default n/a VarshoShared Output Variable for Peer-to-Peer Data Exchange Output variable #1 This code is executed on unit #2 \ANI Network Analog Input Voltage StatusNTIO, \TANI, \TIO, VAR \ANO Network Analog Output\ANO , NTIO, \TANO, \TIO Network Analog Output Status \ANO\IN Network Digital Input StatusNTIO, \TIN, \TIO, Varb \OUT Network Digital Output\OUT , NTIO, \TIO, \TOUT \OUT Network Digital Output StatusVARB9=2\3OUT Transfer Network Analog Input Status \TANITransfer Network Analog Output Status \TANO\TIN Range n = Default n/a\TIO Transfer Network Digital Input StatusTransfer Network Digital Output Status \TOUTDigital Outputs Analog Outputs