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 

Summary of Contents for 6K Series

Page 1: ...Effective February 11 2002 Ethernet Networking for 6K and Gem6K Automation ...

Page 2: ... or used for any purpose not expressly authorized by the owner thereof Since Parker Hannifin constantly strives to improve all of its products we reserve the right to change this user guide and software and hardware mentioned therein at any time without notice In no event will the provider of the equipment be liable for any incidental consequential or special damages of any kind or nature whatsoev...

Page 3: ...om PLC 24 NTMPWI Network Map Integer Variables for Writing to PLC 25 NTPOLL Network Polling Rate 26 NTRATE Network Sharing Rate for Peer to Peer Communication 27 NTS Network Status 28 NTSELP Network Program Select Enable 28 NTWRIT Network Write ASCII String to DVT Camera 29 TNTS Transfer Network Status 30 TNTSF Transfer Network Status full text report 30 VARSHI Shared Input Variable for Peer to Pe...

Page 4: ......

Page 5: ...another device server and request information from that device The 6K supports up to 6 simultaneous server connections Devices servers that may be connected to the 6K include Allen Bradley SLC5 05 PLC see page 12 for setup procedures OPTO22 SNAP I O using Modbus TCP protocol see page 9 for setup procedures DVT vision system cameras see page 11 for setup procedures EXAMPLE Closed Network PC Etherne...

Page 6: ...ch or Hub 255 255 0 0 Connection to company network EXAMPLE Direct Connect to PC PC Ethernet Card Server IP 172 20 34 30 Client IP 172 20 34 160 IP 172 20 44 180 Ethernet Card 6K Switch or Hub 255 255 0 0 Connection to company network Crossover Cable provided in 6K ship kit p n 71 017635 01 Combination of server and client For example the 6K could be the client for an OPTO22 server and an Allen Br...

Page 7: ... 168 10 31 Ethernet Card IP 172 20 44 180 6K unit 2 IP 192 168 10 40 Connection to company network Networking Guidelines Use a closed network Because of network broadcasts it is best to put the 6K along with any associated server devices on a closed network with its own subnet If you have a PC connected to the Ethernet Client Server network and the PC is also connected to your company s network us...

Page 8: ...e OPTENØ command then the RESET command this disables the Fieldbus features and then the NTFEN1 or NTFEN2 command To re enable Fieldbus communication execute the NTFENØ command then the RESET command this disables Ethernet communication and then the OPTEN1 command You cannot communicate to the 6K with simultaneous transmissions over both the ETHERNET and RS 232 PORT1 connections Follow the manufac...

Page 9: ... then type the RESET command and press ENTER Step 2 Setting TCP IP Properties and Static Mapping Changing the 6K s IP Address or Subnet Mask The factory default 6K IP address is 192 168 10 30 the default mask is 255 255 255 0 If the default address and mask are not compatible with your network you may change them with the NTADDR and NTMASK commands respectively see 6K Series Command Reference for ...

Page 10: ...r see Step 4 above Click OK 7 In the Terminal window enable Ethernet communication with the appropriate NTFEN command a If you are using the 6K as a server or client type the NTFEN2 command and press ENTER then type the RESET command and press ENTER b If you are using the 6K in a peer to peer connection with another 6K or Gem6K type the NTFEN1 command and press ENTER then type the RESET command an...

Page 11: ...c bat file Windows NT Create a batch file that contains the arp s command Save the file name the file 6KARP BAT to the root directory on the C drive Using Windows Explorer locate the 6KARP BAT file create a shortcut then cut and paste the shortcut into the StartUp directory Windows NT has several StartUp directories to accommodate various user configurations We recommend using the Administrators o...

Page 12: ...segment buffers The data can be either binary as in the AS axis status operand or a 32 bit unscaled integer as in PE encoder position operand The data stored in the VARSHO is not scaled The NTRATE command sets the rate at which each controller broadcasts its updated VARSHO data RECOMMENDATION Set all devices to broadcast at the same NTRATE rate of 50 milliseconds Setup For 6K or Gem6K sending and ...

Page 13: ...2 s VARSHO8 which is the voltage value at analog input 1 on I O brick 1 to VARI1 Second 6K or Gem6K unit 2 VARI100 1VARSHI2 Assign Unit 1 s VARSHO2 which is the encoder position of axis 1 to VARI100 Third 6K or Gem6K reading data only VARI90 1VARSHI1 Assign Unit 1 s VARSHO1 which is the acceleration of axis 1 to VARI90 Networking with OPTO22 SNAP I O The 6K client can communicate with the OPTO22 S...

Page 14: ...put 2NTPOLL50 Begin polling set polling interval to 50 ms END Program Interaction Once the OPTO22 is configured and a connection is made you can then set outputs and check inputs How the 6K addresses OPTO22 I O locations The 6K addresses each I O bit by its location on a specific module NOTE I O points are not addressed by an absolute 32 bit location on the OPTO22 Digital input and output modules ...

Page 15: ...n WAIT condition that reads analog input 2 on module 7 IF 3 5ANO 1 1 0 is an IF condition that reads analog output 1 on module 5 3 6TANI transfers the voltage status of both analog inputs on module 6 3 6TANI 2 transfers the voltage status of only analog input 2 on module 6 3 4TANO transfers the voltage status of both analog outputs on module 4 3 4TANO 1 transfers the voltage status of only analog ...

Page 16: ...ference the device from now on 4 Enter the IP address of the PLC and specify a 1 for connection type with the NTIP command For example if the PLC is Server 5 and its IP address is 172 20 34 124 then the command would be 3NTIP1 172 20 34 124 5 Attempt a connection to the device with NTCONN For example if the server number is 5 the command would be 5NTCONN1 If the connection is successful Network St...

Page 17: ... 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 0 14 15 elements total for integer data to be transmitted from the 6K Use the 6K s integer variables 20 34 15 variables total to store the data to be transmitted to the PLC The required mapping command is 5NTMPWI9 0 15 20 7 Set the polling rate with th...

Page 18: ...data is written to the integer file during the next poll Read a binary variable from the PLC The VARB variables in the NTMPRB mapping correspond to the values in the binary file in the PLC Read an integer variable from the PLC The VARI variables in the NTMPRI mapping correspond to the values in the integer file in the PLC Example VARB100 HAB79 Element 3 in file 10 of the AB PLC will be equal to VA...

Page 19: ...BUS units 6Kn DN for DeviceNet units You must disable the internal option card with OPTENØ before enabling Ethernet communication The 6K cannot communicate over a Fieldbus connection and Ethernet connection simultaneously ETHERNET COMMUNICATION MUST BE ENABLED BEFORE MAKING CONNECTION SEE NTFEN Tried to connect to an Ethernet server nNTCONN1 before you enabled Ethernet communication in the 6K with...

Page 20: ...ICT SEE NTMPRB NTMPRI NTMPWI NTMPWB MAPPINGS Tried to map the same 6K VARB or VARI variables for read and write functions Or tried to map the same 6K VARB or VARI variables to another PLC Error Handling The 6K has a Error Status register for logging certain error conditions If you enable checking for an error condition see ERROR command the 6K will branch to the designated error program see ERRORP...

Page 21: ... IP ADDRESS SPECIFIED FOR CONNECTION SEE NTIP Potential Error Conditions If you attempt to connect to an Ethernet server before you enable Ethernet communication in the 6K with the NTFEN command the 6K will not allow the connection and will transmit the error message ETHERNET COMMUNICATION MUST BE ENABLED BEFORE MAKING CONNECTION SEE NTFEN If you attempt to execute an NTIP command attempt while th...

Page 22: ...nd complete steps 4 and 5 4 Assign a unique unit number 1 8 with the NTID command 5 Assign data to the broadcast variables up to eight with the VARSHO command 6 Repeat steps 2 5 for each unit in the peer to peer network Example CONNECT TO 6K UNIT 1 AND SEND THE FOLLOWING SETUP COMMANDS NTID1 Assign this unit a peer to peer unit 1 VARSHO1 1A Shared variable 1 contains axis 1 s acceleration VARSHO2 ...

Page 23: ...ther connection This will be used to reference the OPTO22 unit from now on 4 Enter the IP address of the OPTO22 and specify a 2 for connection type with the NTIP command For example if the OPTO22 is Server 3 and its IP address is 172 20 34 170 then the command would be 3NTIP2 172 20 34 170 5 Attempt a connection to the device with NTCONN For example if the server number is 3 the command would be 3...

Page 24: ... the OPTO22 I O handling commands ANI ANI ANO ANO IN OUT OUT TANI TANO TIN TIO TOUT page 20 ...

Page 25: ...the octets Network Server Range 1 6 The NTIP command describes the type of connection the 6K controller will make with a server and it specifies the IP address of the server Saved in Non Volatile Memory This command is saved in the controller s non volatile memory and is remembered on power up and RESET Potential Error Conditions A valid IP address for the designated server must be specified or th...

Page 26: ... 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 condi...

Page 27: ...l to store the data to be transmitted to the PLC The required mapping command is 2NTMPWB3 0 15 20 The NTMPWB 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 exchanging binary data To perform a binary write to the PLC 1 Assign the AB PLC a server number according to its IP address NTIP co...

Page 28: ...TNTSF VARI 6K 5 3 n NTMPRI i i i i Network Server Range 1 6 of Allen Bradley data file 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 2 The PLC s integer data file 9 has 30 elements Use data elements 15 29 15 elements total for integer data that is to be shared ...

Page 29: ... 20 in the PLC is 22 NTMPWI Network Map Integer Variables for Writing to PLC Type Network Product Rev Syntax n NTMPWI i i i i 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 integer VARI variable in the 6K to map to Range n 1 6 1st i 0 n n depends on size of file 2nd i 0 n n dep...

Page 30: ...r data to the PLC but continue to exchange NTMPRI NTMPRB and NTMPWB data use the NTMPWIi i 0 i command If you need to stop polling all mapped variables use the nNTPOLL0 command Example 2NTIP1 172 54 125 34 Identify network server 2 as an Allen Bradley PLC at IP address 172 54 125 34 2NTCONN1 Attempt connection to network server 2 2NTMPWI9 0 15 20 File 9 elements 0 14 in the AB PLC are mapped to th...

Page 31: ...ate for VARSHO information packets to other 6K units With NTRATE0 broadcasting and listening to other units that are broadcasting is disabled With a value 0 it is enabled A rate of 50 is recommended All sharing units should have the same NTRATE NTRATE is not accepted unless the 6K is operating in NTFEN1 mode Each 6K unit internally updates its VARSHO data at the System Update Rate 2 milliseconds t...

Page 32: ...f 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...

Page 33: ...i 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...

Page 34: ...signment use the NTS assignment comparison operand FULL TEXT STATUS REPORT AVAILABLE The TNTS status command reports a binary bit report If you would like to see a more descriptive text based report use the TNTSF command description 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 ...

Page 35: ...iagram below shows the syntax requirements for assigning VARSHI data to a variable assignment n VARSHI i Assignment options Variable number Number of the source unit use this unit s VARSHO data Number of the VARSHO variable from unit n VAR numeric variable VARI integer variable VARB binary variable variable n I O brick number Range 1 8 Must be an unused I O brick n IN virtual input assignment The ...

Page 36: ...d integer as in PE encoder position operand The data stored in the VARSHO is not scaled For example unit 2 could execute VARSHO1 3PE to share the encoder position of axis 3 in shared output variable 1 Each unit will re broadcast its updated VARSHO data at a rate set with the NTRATE command RECOMMENDATION Set all devices to broadcast at the same NTRATE rate of 50 milliseconds The Implementation Pro...

Page 37: ... axis 3 s axis status binary data in shared output variable 1 This code is executed on unit 2 NTID2 Set unit ID to 2 NTRATE100 Set the sharing rate to 100ms and enable this unit VAR1 1VARSHI1 Load the value of unit 1 s first shared data 1PE into VAR1 WRITE AXIS 1 AT POSITION Report axis 1 s current position the value of VAR1 WRVAR1 VAR2 8PCEA 3VARSHI2 Calculate offset position Subtract synch unit ...

Page 38: ...he OPTO22 Digital input and output modules have four I O points or channels and are numbered 1 4 Analog input and output modules have two I O points or channels and are numbered 1 2 Digital Input Module Input 1 0 Input 2 Input 3 Input 4 Digital Input Module Input 1 1 Input 2 Input 3 Input 4 Digital Output Module Output 1 2 Output 2 Output 3 Output 4 Digital Output Module Output 1 3 Output 2 Output...

Page 39: ...utput modules have four I O points or channels and are numbered 1 4 Analog input and output modules have two I O points or channels and are numbered 1 2 Digital Input Module Input 1 0 Input 2 Input 3 Input 4 Digital Input Module Input 1 1 Input 2 Input 3 Input 4 Digital Output Module Output 1 2 Output 2 Output 3 Output 4 Digital Output Module Output 1 3 Output 2 Output 3 Output 4 Analog Output Mod...

Page 40: ...e OPTO22 Digital input and output modules have four I O points or channels and are numbered 1 4 Analog input and output modules have two I O points or channels and are numbered 1 2 Digital Input Module Input 1 0 Input 2 Input 3 Input 4 Digital Input Module Input 1 1 Input 2 Input 3 Input 4 Digital Output Module Output 1 2 Output 2 Output 3 Output 4 Digital Output Module Output 1 3 Output 2 Output ...

Page 41: ...rver 2 to binary variable 1 In another example WAIT 2 3IN 1 b1 tells the 6K to wait until input 1 on module 3 of OPTO22 server 2 is active The controller addresses the OPTO22 I O locations as follows Each I O bit is addressed by its location on a specific module NOTE I O points are not addressed by an absolute 32 bit location on the OPTO22 Digital input and output modules have four I O points or c...

Page 42: ...solute 32 bit location on the OPTO22 Digital input and output modules have four I O points or channels and are numbered 1 4 Analog input and output modules have two I O points or channels and are numbered 1 2 Digital Input Module Input 1 0 Input 2 Input 3 Input 4 Digital Input Module Input 1 1 Input 2 Input 3 Input 4 Digital Output Module Output 1 2 Output 2 Output 3 Output 4 Digital Output Module...

Page 43: ...e 1 In another example IF 2 3OUT 1 b1 evaluates true if output 1 on module 3 of OPTO22 server 2 is active The controller addresses the OPTO22 I O locations as follows Each I O bit is addressed by its location on a specific module NOTE I O points are not addressed by an absolute 32 bit location on the OPTO22 Digital input and output modules have four I O points or channels and are numbered 1 4 Anal...

Page 44: ... analog input 2 on module 3 of network server 1 The controller addresses the OPTO22 I O locations as follows Each I O bit is addressed by its location on a specific module NOTE I O points are not addressed by an absolute 32 bit location on the OPTO22 Digital input and output modules have four I O points or channels and are numbered 1 4 Analog input and output modules have two I O points or channel...

Page 45: ...TANO 2 reports the voltage of analog output 2 on module 3 of network server 1 The controller addresses the OPTO22 I O locations as follows Each I O bit is addressed by its location on a specific module NOTE I O points are not addressed by an absolute 32 bit location on the OPTO22 Digital input and output modules have four I O points or channels and are numbered 1 4 Analog input and output modules ...

Page 46: ...nput and output modules have four I O points or channels and are numbered 1 4 Analog input and output modules have two I O points or channels and are numbered 1 2 Digital Input Module Input 1 0 Input 2 Input 3 Input 4 Digital Input Module Input 1 1 Input 2 Input 3 Input 4 Digital Output Module Output 1 2 Output 2 Output 3 Output 4 Digital Output Module Output 1 3 Output 2 Output 3 Output 4 Analog ...

Page 47: ...pecific output is required use the bit select operator For example 1 3TOUT 2 reports the status of output 2 on module 3 of network server 1 The controller addresses the OPTO22 I O locations as follows Each I O bit is addressed by its location on a specific module NOTE I O points are not addressed by an absolute 32 bit location on the OPTO22 Digital input and output modules have four I O points or ...

Reviews: