Ntwritnetwork write ascii string to dvt camera, Ntwrit network, Write – Parker Hannifin GEM6K User Manual

Page 33: Ascii string to dvt camera, Ntwrit

Advertising
background image

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:
2NTIP1,172,54,125,34

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

2NTCONN1

; 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
; derived from the values of File 20, elements 5 and 6 in the PLC.

2NTPOLL50

; 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>"

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

6K 5.3

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

Advertising
This manual is related to the following products:

6K