NI Labs

cancel
Showing results for 
Search instead for 
Did you mean: 

Welcome to EtherNet/IP Driver for Communication to Allen Bradley ControlLogix PLCs

Vincent,

 

Unless you have a need to cancel pending operations or you are doing something uncommon such as using VI server to load and run the EtherNet/IP VIs and want to ensure the session remains open between calls, you should not need to mess with the sessions. You can leave the inputs as the default session and LabVIEW will handle determining when to open and close it.

 

Keep in mind the SLC500 is likely using an older 10Mbit network connection and likely has a slower CPU than newer PLCs. If there is an HMI polling at high speeds as well you may be contending for limited messaging resources on the PLC as well as bandwidth bottlenecks. If you want to see the pure PLC servicing time minus whatever overhead the driver adds you could download and install Wireshark to sniff the network connection and simply look at the time delta between the request being sent out and the response coming back from the PLC.

 

Eric

0 Kudos
Message 121 of 193
(6,176 Views)

Hi Eric,

 

It really clarifies.

 

Best regards.

 

Vince

0 Kudos
Message 122 of 193
(6,174 Views)

Is there a array size limit on this driver? If I access 100 elements of my 10000 element array the code works fine. If I try little more than 100 elements I get the following error. I have the timeout set for 5 seconds but I get the error before 5 seconds.

 

 Error -251723760 occurred at EthernetIP Tag Read REAL.vi;
Details: CIP Error - Extended status may be available
CIP Status: 0x6 (Partial data sent)

0 Kudos
Message 123 of 193
(6,137 Views)

Dazach,

 

The amount of data that can be encapsulated in a standard explicit message is ~504 bytes (depending on what you are doing, some data may be taken up in headers). Since each REAL takes 4 bytes, you are likely getting very close to this limit at 100 elements.  If you try to read/write more than that you will likely get an error such as what you got. The PLC is saying it can't send that much data into a single message.

 

You will likely need to split your request into multiple chunks below the maximum size.

 

Hope this helps, 

Eric

0 Kudos
Message 124 of 193
(6,135 Views)

Hi Eric,

 

I tried with Raw Read vi to read a 2-D array of DINT. The data read back is a 1-D array of single byte. With some conversion I can have the data I want. But with Raw write vi I'm not sure how I can send a 2-D array. So I think I will go with the 1-D array of DINT using DINT read and write vi.

For the I/O assembly I followed the way in your demo code and it's working.

Thank you so much for the help.

0 Kudos
Message 125 of 193
(6,107 Views)

Is there an updated statement of direction for NI support of Ethernet/IP?

 

I'm in need of standard Ethernet/IP _client_ functionality in LabVIEW.  I need LabVIEW to access an Ethernet/IP-enabled industrial sensor and receive data from it using the implicit (background-polled/strobed/cyclic/changeofstate) methods.

 

It appears that I can use the NI library and/or Sivamgr's (generously contributed) code to do _explicit_ messages to the device.  This will help to some extent to prove the concept but it falls short.

 

I'm seeing a disconnect between statements in some of the whitepapers and videos of NI folks talking about the direction of Ethernet/IP support.  At some point, the project re-focused on becoming an adaptor (server) for AB controllers.  This is fine, but it seems somewhat of a departure from past network support, such as Modbus, where simple functionality was added to LabVIEW to let it be the controller for multiple networked sensors and devices.

 

Of course this project had to start somewhere, and I'm not complaining.  But as a strong NI supporter I feel the need to point out the discrepancies so it can be made stronger.  I'd like to close by saying I really encourage you to support the use-case of someone like me needing to simply plug in an industrial EIP device, load in the EDS into LabVIEW, and start reading and writing data right away.  That is the kind of situation that impresses uninitiated managers that LabVIEW is a serious tool and not just a "toy with pretty graphs for programmers who have trouble typing".

 

So, I hope someone can take a moment to create a "roadmap" of Ethernet/IP support that goes beyond AB PLC-centered functionality.  Also, if I have mis-stated anything here, _please_ let me know so I can get back on track.

 

Thanks,

Mike

 

 

 

Message 126 of 193
(6,093 Views)
Hi Mike,
 
Thank you for leaving your feedback! As you have likely read, the purpose of these NI Labs projects are to gather direct feedback which well help determine what kind of features are important to customers, drive future development, and and help determine what direction the technology may go. As such, I really cannot give you any official "statement of direction" because we are constantly evolving based on this feedback. I'm not sure which whitepapers/videos you are describing, but I would not necessarily infer any "direction" from their contents. They are likely trying to explain features/usage as it exists today. Keep in mind that there are many various product lines that this EtherNet/IP technology applies to, all with separate marketing folks, so it is very possible that you might have different product lines using this technology for vastly different purposes.
 
Regarding the idea that we are concentrating on becoming an adapter/server for AB controllers, I would say this is not quite correct. We are trying to add features on a priority that matches what we see customers wanting. More than 90% of EtherNet/IP requests I have seen involve AB PLCs (and lets face it, Rockwell created the standard and is still the main user of it), and I'd say we are making great progress towards filling that communication gap and solving the use-cases we see customers wanting. In general, when interacting with AB PLCs, the explicit messaging requests as well as the implicit I/O Adapter-class communication is what those customers with AB controllers seem to want. We have not seen very much requests for working as a implicit I/O scanner (the role the PLC generally takes) as really the only use-case is to be able to collect data from industrial I/O modules that are marketed towards the PLC users. In general these modules either are geared towards one specific PLC type such as AB (and make use of AB-specific functionality like Add-On Profiles with RSLogix) or support multiple protocols such as ModBus. Also, keep in mind that EtherNet/IP is not quite a single standard as it sounds on paper. Between explicit and implicit communication, originating versus being the target of communication, vendor-specific objects and service codes encapsulating other protocols, etc, it is a much larger standard to just claim generic "support" like we do for Modbus/TCP. While EDS files exist, given that most vendors don't seem to actually use them as a means for actually integrating them into their software but rather go the route of having custom support for each module, I have some doubts about how useful being able to load an EDS file would be. We'd be interested in hearing more about what kinds of I/O modules you would like to communicate with though and what types of EtherNet/IP communication it supports.
 
It may also interest you know that we will shortly be adding support for the generic Get/Set Attribute Single service codes. This should make it easier to do explicit messages to many generic devices that are not covered by the Data Table Read/Write and PCCC service codes that our existing explicit messages cover. In fact, you can likely use these to read/write to the assembly objects on your I/O module (though in a polled fashion, not an implicit I/O data connection). However, if you do that in a separate loop you may be served nearly as well depending on your application requirements.
 
In general, please be sure to continue giving detailed feedback regarding what kinds of support you'd like to see. Without such information, we cannot accurately gauge what features are most needed. Any details such as the actual device you are trying to communicate and application details (such as timing) are very useful. Also, in addition to this forum, be sure to involve your local NI sales rep if you have specific needs that you would like to see met. While of course as an engineer I'd like to be able to support every feature under the sun, projects and features are obviously funded by customer needs and it can't hurt to involve your sales rep if you feel a particular feature is a requirement for your project. While these forums are great for getting communication between end-users and developers, it doesn't provide an accurate mechanism for quantifying how valuable particular features are in a larger context.
 
I hope this helps answer your questions at least a little,
Eric
0 Kudos
Message 127 of 193
(6,072 Views)

I'm trying to read/write tags from a ControlLogix5550 controller on backplane 1, slot 0 with IP address 10.10.100.5.  I believe the correct network path is "10.10.100.5,1,0" but no matter how I set that up I still get the "-251723767, Unable to connect to the network path specified" error.  I am connected from the PC to the PLC through a switch.

 

In keeping with previous posts, I tried wiresniffer and it shows an incorrect header checksum on the packet going from the PC out to the 5550 (checksum 0x0000, should be 0xb4d8).  Does this sound familiar to anyone?  Thanks,

 

Charlie

0 Kudos
Message 128 of 193
(6,050 Views)

Charlie,

 

It sounds like you may have an IP connectivity issue you need to figure out first. The error message would indicate a local connectivity issue rather than the PLC returning an error that the path is incorrect. It is likely that your IP configuration between the PLC and the PC does not match. What is the output of "ipconfig" from the command line on the PC? Can you ping the PLC?

 

With regards to the incorrect checksum, this is expected behavior with most network cards/drivers these days. The network card does checksum offloading and computes the checksum before it goes onto the wire. The network sniffer is sitting higher-up in the software layers before this checksum is added and thus does not ever see the filled-in checksum.

 

Eric 

0 Kudos
Message 129 of 193
(6,049 Views)

This is a question about configuration of Rockwell's RSLogix 5000.  I'm using version 16.03. 

 

I'm able to use the ETHERNET-MODULE-generic I/O module to communicate with my home-brew Ethernet/IP adaptor device.  The generic ethernet module process completely bypasses using an EDS file. 

 

I don't have a copy of RSNetWorx for Ethernet/IP so I don't know what it does with an EDS file, but having used RSNetWorx for DeviceNet, I understand how the EDS is used to configure a scanner module attached to the PLC, but I know the ControlLogix controllers don't need RSNetWorx.

 

The big question is how to create my own custom add-on I/O module for my device so that it may be added to the I/O Tree within RsLogix 5000, instead of using the "generic" module.  Just poking around in the filesystem, I see that some XML files are involved, etc.  Is there a published spec for this?  A Rockwell developer's program that I must join, etc?

 

Thanks,

Mike

 

0 Kudos
Message 130 of 193
(5,958 Views)