From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Ethernet%2FIP to Allen Bradley communication

Solved!
Go to solution

I want to communicate from cRIO  to Allen Bradley plc (specifically ControlLogix L72, L73 or L725 )  via Ethernet/IP.

 

I am newbie so I am not exactly sure how to do this. I have downloaded the Ethernet/ip driver from NI.  I just want to talk to one of the plc at a time. Can someone provide me advice on where to start? Or provide example code.

 

Also would it be possible to simulate cRio to Allen Bradley plc communication using computer and cRIO?

 

Thanks

0 Kudos
Message 1 of 4
(6,045 Views)
Solution
Accepted by sticyfinger

Hello,

 

The NI-Industrial Communications for EtherNet/IP includes several getting started examples.  I would suggest taking a look at at EtherNetIP Adapter.lvproj in example finder.  In LabVIEW, go to Help » Find Examples and then search for EtherNet/IP.  It should be the only option in there.  There's a few examples on getting started with communication to these devices.  I would suggest taking a look at the Write and Read Tag.vi for Rockwell's ControlLogix devices.  

 

Additionally, it is theoretically possible to simulate a the PLC on the computer, however there is a bit of work that would need to be done.  You can check out this discussion here to get an idea of what is involved in getting started with this.

Matt S.
Industrial Communications Product Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(6,042 Views)

Thanks Matt. 

 

Which way will be simpler to implement using NI EtherNet/ip drivers? From my research it seem explicit messages would be easier solution?

I just want to communicate with cRIO from time to time. cRIO should send status update and the PLC should send commands.
---
Is using implicit messages a better solution for a real time application than explicit message?
---
What exactly is the Ethernet/IP i/o connection?

 

------------------

What is the different between “Access Assembly Instance Data (explicit)”, “Create Assembly Instance”, and “Access Identity Attribute (explicit)” Vis?

 

Once I create an Assembly instance using the “Create Assembly Instance” VI do I need to keep it running?   Or do I use one of the other two VI to read and write after it is created?

 

 

 

 

 

 

FYI:

An assembly is a pre-defined collection of data residing in an adapter.

Each assembly is identified by a unique instance number. The

assemblies are further characterized by their size and type. Three types

of assemblies are producing (data to be sent), consuming (data to be

received), and configuration (a data area reserved for information

about how consumed and produced data is to be interpreted).

0 Kudos
Message 3 of 4
(6,030 Views)

Hi sticyfinger,

 

Refer to the example. Neither of the two ways is complicated. Which you use depends on your application.

 

I/O communication (also called implicit communication) is a cyclic predefined way of communication. It transfers chunk of data called assembly, which is raw data. 

Explicit messaging (generic explicit messaging, and tag messaging that Logix PLC supports, and SLC500 register file read wirte that SLC500 supports) is acyclic, and more suitable for transmission of configuration, non-time-critical information. (some command and status information, depending on the use scenario, may need to be transmitted cyclically, though, while others don't.)

 

Create Assembly Instance.vi creates an assemlby and incooperate assembly read/write, so that it can update the assembly on the PLC. It can also be accessed explicitly by “=Access Assembly Instance Data (explicit).vi which uses generic explicit read/write.

You need to keep it running.

Refer to the instructions in the VI eamples which give more detailsl

 

Yishi Liu

PSE.

 

 

0 Kudos
Message 4 of 4
(6,004 Views)