Jump to content
siva

Industrial EtherNet (EtherNet/IP)

Recommended Posts

I just trying to understand the whole Ethernet IP thing. For testing I have a SMC Valve Cluster with EIP interface.

Could anybody please tell me or give me a hint how to use these VIs on this device. I've got some informations from the manual that sound inportant:

Input : Data length 6 byte, instance 100

Output: Data length 4 byte, instance 150

Does this tell me something about the registers I would have to read/set?

Any help is really appreciated.

Thank You!

Best regards,

Stefan

Share this post


Link to post
Share on other sites

Hi Siva,

Nice work with your current VIs. I wanted to let you and others know that NI now has some preliminary support available for communicating with EtherNet/IP to compatible PLCs at NI Labs. We'd love to get some feedback if possible.

Thanks,

Eric

Share this post


Link to post
Share on other sites

Hello,

Is this project dead?

While NI has some pre-release drivers for Ethernet/IP, they only work on Windows and RT platforms. No Linux.

Since a Linux driver is what I need, I would naturally be interested to know if this project is still alive, and if it would run on Linux.

Thanks!

Share this post


Link to post
Share on other sites

Hello,

Is this project dead?

While NI has some pre-release drivers for Ethernet/IP, they only work on Windows and RT platforms. No Linux.

Since a Linux driver is what I need, I would naturally be interested to know if this project is still alive, and if it would run on Linux.

Thanks!

Why shouldn't it work under Linux? It does AFAIK not use DLLs or other external code solutions but is all written in LabVIEW so that should be easy to use on Linux too.

I would expect the original poster of this library to have moved on and/or likely being busy with other projects, so whatever you need to do with this you should prepare to spend some time to actually learn EIP and get your hands a bit dirty, if you want to use it for your specific application.

Share this post


Link to post
Share on other sites

I have been looking at the CIP portion of the library posted. One thing it does not support is Network Path. What it does instead is try to read tags from the controller in Slot 0 on the backplane of the device at the IP address given to the init function.

This is hard coded.

To fix you need to add code to properly format a network path into the packet built in the EtherNet_IP CIP Scan Registers.vi. Specifically the network path is part of the CPF array in the diagram.

Unfortunatly, I don't have the spec and so I don't know how to make all the changes. What I did figure out, I was able to work out from looking at Wireshark logs.

Share this post


Link to post
Share on other sites

I am curious if anyone has tried to use the EtherNet_IP_PCCC.zip on a PLC 5. Specifically I wanting to use it with a 1785-L20E revision D.2. I have been trying to use the NI-Industrial Communications for EthernetIP, but have been getting a Error PCCC Status: 0xf0. I am wondering if I might get different results using the EtherNet_IP_PCCC.zip.

Any thoughts would be helpful.

Russell

Share this post


Link to post
Share on other sites

Here is some code to communicate to a PLC5 with CSPv4 (Client Server Protocol). This is just basically the DF1 commands wrapped up with a header and placed in a TCP packet. You can refer to the DF1 user manual to see the PCCC commands. The attached example "PLC5 ReadWrite Test.vi" will try to read N21:0 to N21:5 and write to N21:20.

Info about the CSPv4 header can be found here.

PLC5 CSPv4.zip

Share this post


Link to post
Share on other sites

It should work, its the old style AB Ethernet protocol. I think the NI-Industrial Communications for EthernetIP is PCCC inside a CIP packet (Ethernet IP). With CIP you would need the correct firmware. All these AB protocols and the darn names are very confusing. I still don't think I have them figured out yet.

Hello David,

Thank you for the code. I am wondering if you know if I need a certain version of the PLC firmware to run this code?

Thank you,

Russell

Edited by David Wisti

Share this post


Link to post
Share on other sites

Hello David,

Thank you for your code it is communicating with the PLC 5, but I have two issues that I thought you might be able to help me overcome. It looks like the element number is an U8 so I can't enter element numbers greater than 255. The other issue is that negative numbers are not read correctly. I tried to read from element 201 which should of been -22 and I read -17.

Thank you,

Russell

Share this post


Link to post
Share on other sites

Russell,

To get element number higher than 255 requires messing with the mask byte and understanding the PLC addressing for PLC5. See chapter 13 of the following manual:

Allen Bradley DF1 Protocol and Command Set Reference Manual

The PLC5 I was communicating to only required reading and writing a few words. I did not have to dive into fully implementing the PLC addressing for my application. Unfortunately, I no longer have a PLC5 here so I can test with. The code I posted uses "word range read" and "word range write" commands, see page 7-34 and 7-35 for more details on those commands.

David

Hello David,

Thank you for your code it is communicating with the PLC 5, but I have two issues that I thought you might be able to help me overcome. It looks like the element number is an U8 so I can't enter element numbers greater than 255. The other issue is that negative numbers are not read correctly. I tried to read from element 201 which should of been -22 and I read -17.

Thank you,

Russell

Share this post


Link to post
Share on other sites

Hi,

I am using the ethernet_ip_cip package to communicate between a Compact Logix 1769-l32E V17.7 and Labview version 2011. I have a labview program setup to do the following.

If data present in Data 1

delay 50ms Init --> Scan Data 1--> If data Update (Set Bool 1=1) --> Update (Set Bool 1=0) --> Update (Set Bool 2=1) --> Update (Set Bool 2=0) --> Terminate

If no data present Data 1

delay 50ms Init --> Scan Data 1--> Update (Set Bool 2=1) --> Update (Set Bool 2=0) --> Terminate

I have 2 problems, and the might be related:

1. The terminate program has an error 0x66, on every run. If I change it to 0x65, I do not get an error.

2. After a period of time, with no data in 'Data 1' the PLC 'crashes' or is slow to respond a power off is required.

Any Ideas?

Thanks

Share this post


Link to post
Share on other sites

I'm only just coming into this, but is this the same as NI's Ethernet/IP toolkit?

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209676

I saw that this existed in NI Labs before it was an official product, but those files have been taken down.

Share this post


Link to post
Share on other sites

Yes, Its similar to NI Ethernet IP toolkit. I currently use NIs toolkit for communicating to SLC5 and Contrologix PLCs. Its well worth the 500 beans. However, if you have to communicate to a Allen-Bradley PLC5 over Ethernet, then NI's EthernetIP toolkit is not going to help you. I posted some code above that can help if your using a PLC5.

I'm only just coming into this, but is this the same as NI's Ethernet/IP toolkit?

http://sine.ni.com/n...g/en/nid/209676

I saw that this existed in NI Labs before it was an official product, but those files have been taken down.

Share this post


Link to post
Share on other sites

siva,

can you help me out? i'm new to ethernet/ip and want to learn the protocol. can you document and/or post some documentation to help me with your vis?

JY

Share this post


Link to post
Share on other sites

Hi Jared, By Changing the Constant(0x07),. any Integer file can be accessed. But, before changing the constant, create that particular file in the PLC and configure it as integer. also configure the number of registers in that file as required. Accessing Bool File directly is a bit tough. Instaed of accessing a Bool File., You can keep some registers in the N7 and access it. In plc side, keep a logic to read from the integer file register and update the bool file. Use one of the these values for this field. Do not use any othervalues; doing so may result in unpredictable results.

Hi!

I'm communicating with a Micrologix 1400 PLC.

I Can read the N7 integer value, but the plc software use even "B" and "I"files for boolean variables. I Can't modify the PLC software.

Is there a way to read these files with your VI's?How?

Share this post


Link to post
Share on other sites

I solved my problem and now i can read every file.

Now i Have a problem with communication.

Sometimes i Get ERROR 56, so i stop and restart communication and i can communicate again.

Sometimes i get error 60 and it seems that it's not possible to restart communication.

Should there be a minimum time between stop and start connection with the PLC?

Share this post


Link to post
Share on other sites

How to use Labview EthenetIP Tag Read vi_MicroLogix 1100_a Problem‏

Dear Mr. Siva

 Excuse me, May I ask? How to use Labview EthenetIP Tag Read vi_MicroLogix 1100, The E-mail's attach is a problem from Ethernet IP Tag Read( O_0_Bit0) tag MicroLogix 1100 (1763-L16BBB)

O:0/0 output..Have a Error -251723760.....Could you help me. If have a cash. You can E-mail's to us.  Thanks.

Best regards.

Mr.Feng

04-07-2013

 

Share this post


Link to post
Share on other sites

I'm trying to set up connection between PC and Festo motor controller (with Ethernet/IP module).

 

PC: Win x86 LV2012SP1f4 + NI Ethernet/IP 1.3 driver

Festo Motor Driver: SMMP-AS-C5-3A-M3 with CAMC-F-EP ethernet/ip module included

 

I'm able to read all classes/instance/attributes that fest offers but i have problem with assembly.

 

Via assembly instance 101 i suppose to read the 16B data frame from controller and via assembly instance 100 i suppose to write the 16B data frame to controller. That works without error. The size is return correctly as 16B if i read attribute 4.

 

But the data inside does not change at all, the read data does not correspond to the actual state of the controller and written data has no impact on the controller as well.

 

 

I Attached my simple Vi to communicate with the controller:

 

Niether NI tech support niether Festo support is not able to help me. NI thinks this is controller issue, Festo thinks this is labview driver issue since the communication is working with PLCs like AllenBradley. I stucked in between.  16x16_smiley-frustrated.gif

 

Anyone know what the reason may be? Thanks for any kind of help

 

post-8360-0-26252400-1376652944.jpg

post-8360-0-38848800-1376652963_thumb.jp

ethernetip festo test.vi

Share this post


Link to post
Share on other sites

I'm trying to set up connection between PC and Festo motor controller (with Ethernet/IP module).

 

PC: Win x86 LV2012SP1f4 + NI Ethernet/IP 1.3 driver

Festo Motor Driver: SMMP-AS-C5-3A-M3 with CAMC-F-EP ethernet/ip module included

 

I'm able to read all classes/instance/attributes that fest offers but i have problem with assembly.

 

Via assembly instance 101 i suppose to read the 16B data frame from controller and via assembly instance 100 i suppose to write the 16B data frame to controller. That works without error. The size is return correctly as 16B if i read attribute 4.

 

But the data inside does not change at all, the read data does not correspond to the actual state of the controller and written data has no impact on the controller as well.

 

 

I Attached my simple Vi to communicate with the controller:

 

Niether NI tech support niether Festo support is not able to help me. NI thinks this is controller issue, Festo thinks this is labview driver issue since the communication is working with PLCs like AllenBradley. I stucked in between.  16x16_smiley-frustrated.gif

 

Anyone know what the reason may be? Thanks for any kind of help

 

You should mention that you have posted elsewhere too (NI forum) for this, as that can help people to see if they can add anything useful to the thread, instead of repeating what others already said. Also it is a good way of getting additional references for anyone coming across similar problems in the future and coming here instead of the NI forums.

Share this post


Link to post
Share on other sites
VIs can be downloaded here... 

 

https://github.com/sivamgr/LabVIEW_EtherNET_IP

 

(or)

 

sivamgr.github.com/LabVIEW_EtherNET_IP

Siva, 

 

Do you have any VI's that can set and get attributes with respect to Class_id, object_id and instance_id ?

Can you help me in this please ? This is generic.

 

Thanks

Share this post


Link to post
Share on other sites

Hello,

thanks for this interesting topic. I try to do some ethernet IP communication with LabVIEW, but I can't find the attached unlocked VIs. I will try with the lockecd ones, if I can establish a communication at all, but I would like to use your VIs as a base for my communication library. Could you please give me a hint, where I can find the unlocked VIs?

Thanks and greetings!

Oliver

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.