Parker Hannifin GEM6K manual Ntpoll, Network Polling Rate, Range n =

Page 30

3.Map a range of integer elements in the AB PLC to a range of integer (VARI) variables in the 6K (NTMPWI command).

4.Start polling the AB device at a specific polling interval (NTPOLL command). This updates integer data elements in the AB PLC with the data from the mapped VARI variables in the 6K.

NOTE: The VARI variables in the 6K are 32 bit values, but the integers in the AB PLC are 16 bit values. Therefore, the range for the VARI variables must be kept in the range –32767 to +32767.

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:

You are not allowed to map the same 6K VARI variables for read and write functions. Nor are you allowed to map the same 6K VARI variables to another PLC. If you attempt either of these conditions, the 6K will not accept the NTMPWI command and will transmit the error message “VARIABLE MAPPING CONFLICT…”.

If you attempt to write to an AB data file of the wrong type, or to a non-existent data element, the 6K will not accept the NTMPWI command, it will transmit the error message “ERROR, INVALID FILE TYPE, NUMBER OR SIZE…” and it will automatically stop polling all mapped binary and integer variables (equivalent to executing the

NTMPRBi,i,0,i, NTMPWBi,i,0,i, NTMPRIi,i,0,i, and NTMPWIi,i,0,i, commands).

Control over Polling: If you want to stop the 6K from writing integer 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:

; Identify network server #2 as an Allen-Bradley PLC at

2NTIP1,172,54,125,34

2NTCONN1

; IP address 172.54.125.34

; Attempt connection to network server #2

2NTMPWI9,0,15,20

; File 9, elements 0-14, in the AB PLC are mapped to

2NTPOLL50

; the 6K's integer variables VARI20-VARI34

; Start polling network server #2, set interval to 50 ms

VARI = 42

; The value of AB file 9, element 5, will be set to 42,

 

; because it is mapped to VARI25

NTPOLL

Network Polling Rate

 

 

Type:

Network

Product

Rev

Syntax:

<!><n>NTPOLL<i>

6K

5.3

Units:

n = network server #

 

 

 

i = polling rate (milliseconds)

 

 

Range: n = 1-6

i= 0 (disable polling) or 1-9999 (50 is recommended)

Default: 0 (disabled)

Response: 1NTPOLL: *1NTPOLL50

See Also: NTIP, NTCONN, NTMPRB, NTMPRI, NTMPWB, NTMPWI

The NTPOLL command establishes the rate at which the 6K polls the Ethernet server devices for information:

Allen-Bradley PLC Devices: NTPOLL sets the rate at which the 6K reads and writes the VARI and VARB variables that are mapped to the Allen-Bradley PLC. Variables are mapped with the NTMPRB, NTMPRI, NTMPWB and NTMPWI commands.

OPTO22: NTPOLL sets the rate for polling or changing the states of the input and output modules on the OPTO22. OPTO22 outputs are controlled with the \OUT and \ANO commands, and the inputs are monitored with the \IN,

\ANI, \TANI, \TANO, \TIN, \TIO, \TOUT commands.

The polling rate affects the 6K overall command execution speed (slowing the polling rate will speed up the 6K’s command processing).

page 26

Image 30
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 Networking Guidelines DevicePing Preparing the Controller over RS-232 Configuring the 6K for Ethernet CommunicationSetting TCP/IP Properties and Static Mapping Changing the 6K’s IP Address or Subnet MaskPage Connecting the 6K to the PC through Ethernet Arp -s 192.168.10.30 0-90-55-0-0-1Networking with Other 6K or Gem6K Products Peer-to-Peer MillisecondsNetworking with OPTO22 Snap I/O Communication according to the procedures onThen the command would be 3NTIP2,172,20,34,170 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 OPTO22 Ethernet I/O rack Command would be 3NTIP1,172,20,34,124Networking with an Allen-Bradley SLC 5/05 PLC Provided belowVARB100-VARB103 NTFEN2 Reset5NTCONN1 5NTPOLL50VARB106 Exchanging data automatically with the PLC. Here is how toHAB79 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 Network Sharing Unit ID for Peer-to-Peer Communication Type Syntax Units Range Default Response See AlsoNtid ProductNetwork I/O OPTO22 Configuration Ntio\OUT , \TANI, \TANO, \TIN, \TIO, \TOUT Network IP Address Type Syntax Units Range Default ResponseNtip Server TypeNtmprb Network Map Binary Variables for Reading from PLC ExampleNtmpwb Network Map Binary Variables for Writing to PLCNtmpri Network Map Integer Variables for Reading from PLC TNTS, TNTSF, VariVARI35-VARI49 NtmpwiNetwork Map Integer Variables for Writing to PLC WAITVARI40=22Ntpoll Network Polling RateRange n = Ntrate *NTRATE50 NtrateNetwork Sharing Rate for Peer-to-Peer Communication NTFEN, NTID, SYSPER, VARSHO, VarshiNtselp Network Program Select EnableNTS Network StatusDefault Response See Also NtwritNetwork Write Ascii String to DVT Camera Transfer Network Status TntsTntsf 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 \ANO Network Analog Output Status\IN Network Digital Input StatusNTIO, \TIN, \TIO, Varb \OUT Network Digital Output\OUT , NTIO, \TIO, \TOUT \OUT Network Digital Output StatusVARB9=2\3OUT \TANI Transfer Network Analog Input Status\TANO Transfer Network Analog Output Status\TIO Range n = Default n/a\TIN Transfer Network Digital Input StatusDigital Outputs \TOUTTransfer Network Digital Output Status Analog Outputs