Parker Hannifin 6K Exchanging data automatically with the PLC. Here is how to, HAB79, VARB106

Page 18

Program

After the connection is established, mapping has been set up, and polling enabled, the 6K starts

Interaction

exchanging data automatically with the PLC. Here is how to:

Write a binary variable to the PLC: Write a value to one of the VARB variables in the NTMPWB mapping. The new data is written to the binary file during the next poll.

Write an integer variable to the PLC: Write a value to one of the VARI variables in the NTMPWI mapping. The new 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 VARB100

 

if(VARB106 =

B1111111111111111)

;

VARB106

will be equal to variable 7 in

 

if(VARI129 =

17)

;

Element

6

 

;

file 10

of the AB PLC

 

in file

20

of

the

AB

PLC

will be equal to VARI129

 

VARI121

=

17

 

;

Element

4

in file

20

of

the

AB

PLC

will be equal to VARI121

page 14

Image 18
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