EthernetIP and .NET
Does anyone have experience, experience, or heard about an EthernetIP library in .NET ?
Company I work for will soon need to communicate with devices over EthernetIP, and I want inputs on it, as I will probably be the one who work on it.
121 Replies
That's so overly specific
@JamesK.Polk might know something
Oh, I don't
That's something we have to do soon since our vendor won't give us a simple restAPI, but I will "feign" incompetence so I can stick to business problems
good idea
If you need to talk to allen bradley (rockwell) devices with ethernet-ip you can use libplctag (https://github.com/libplctag/libplctag.NET)
GitHub
GitHub - libplctag/libplctag.NET: This is a .NET wrapper for libplc...
This is a .NET wrapper for libplctag. Contribute to libplctag/libplctag.NET development by creating an account on GitHub.
That's a tool I didn't seen before, thanks !
Did you worked with it ? Also, there is a .NET lib called EEIP for EthernetIP, did you heard anything about it ?
Yes, I've worked with it and it's pretty good. Of course it has some limitations, like you cannot expect to have real-time communications like you have in PLCs.
For what concerns EEIP, I never used it, but I could be interested in it (e.g. for directly accessing point I/O)
There is a google group around it too, if you need help
I have done extensive work with that library.
10/10 would recommend
We are using it in production
mhhhh, device we have right now are Bihl Wiedemann devices
oh thats nice to know, any issue with it/things to know ?
I think there was a bug I reported a while back with tags not found being accidentally being marked as valid.
google groups, about libplc, or ethernetip ?
I think that's patched in the newest preview
Multiple instances of tags are thread-safe.
A single tag is not thread-safe, use your own C# synchronization primitives.
You can read and write entire UDT chunks in single operations if you so desire.
is the api hard to use and did you looked at their code (like is it maintainable) or not ?
At around the 17kB mark you may have performance issues on the EtherNet/IP card on physical PLCs
Google group about libplctag:
https://groups.google.com/g/libplctag?pli=1
The only problem I've had was in accessing a boolean in write-mode, it didn't worked. However it worked if you have that bit within a DINT. In that case you could just modify the corrisponding bit inside the DINT (Logix Designer terminology)
It seems fine, but it likes throwing exceptions, which isn't super good for performance.
thanks, I won't join the group for now, but i'll remember it if we need to work on Allen-Bradley modules
But you can't query the PLC for "What type is this tag?"
You must know what the type is!
You can interpret the memory chunk as an Int32 or a Float32 should you so desire
Make sure to get it right or you'll blow out a valve with way too much pressure
Yep, the fact you can transfer an UDT is very handy. They have examples on how to access almost every data type
We got 100x improvement on gamepad remote-control through that.
Fantastic.
Pipe over the full gamepad state continuously, over 100 updates a second heck yeah
The library supports both sync and async methods.
mhhh, I have trouble finding EEIP sources...
wait, it's the smol EIPClient.cs
We are 99% going to migrate away from using KepServerEXv6 and OPCDA to doing EtherNet/IP directly.
libplctag.Net uses Symbolic Protocol, as opposed to Logical Non-Blocking.
that what we wanted to do basically, directly communicate to devices over eip
Do you have physical plcs?
what is that ?
Symbolic is using tag-name
Logical Non-Blocking is using numerical indexes instead
If you want to do LNB, you gotta index the entirety of the PLC memory first
Which takes effort/time
But then you don't need to transmit the tag-name, only the number index instead
Both ControlLogix and CompactLogix support both
we have this for now
Not sure if the Micro controllers support that
Which controller type are you using?
3 secs I search it up
Is it a L71/L81 ControlLogix? Or is it a CompactLogix?
com module is a BWU3849
That's not an Allen Bradley product
am searching the infos, im in remote right now, cant look up the thing on place
never said it was !
^
It's an E-IP & Modbus TCP gateway, but a gateway for what exactly?
Is that the controller itself, or is it just a gateway for something else?
Not that I know what ASi refers to
ASi ?
24 Volt ASi-5/ASi-3 EtherNet/IP + Modbus TCP Gateway in Stainless Steel, 1 ASi-5/ASi-3 master
the belt is an interoll, so I guess an interoll controller ?
ah found it, the motor controller is a BWU4246
And it uses digital inputs
company and I is entering/discovering these things, what do you mean by physical PLC here ?
As a GuardLogix
yeah thats something like that, not exactly this one tho
But Allen-Bradley/Rockwell products tend to be really pricy
You probably don't need those safety ratings on those products, but that may depend on what your specific application is
*not this one because we use other company product that look like this
a conveyor belt... for food or something like that
yeah, not lifethreatening
Okay, yeah, we use it for driving multi-tonne autonomous drilling rigs
They use tank-like tracks for movement and can run over cars easily
Good fun
software side, does EEIP have/need some certification for task like this ?
found some better doc
What do you mean EEIP anyway?
https://github.com/rossmann-engineering/EEIP.NET
this .NET lib
GitHub
GitHub - rossmann-engineering/EEIP.NET: Ethernet/IP compatible libr...
Ethernet/IP compatible library for .NET implementations - GitHub - rossmann-engineering/EEIP.NET: Ethernet/IP compatible library for .NET implementations
Eh, not really.
The moment you're doing C# you can't meet those ISO safety standards directly on that software.
That's why the safety for us is done on the safety-rated controllers, digital smart/IOs and similar.
But we use libplctag.Net
And it works really well.
Works on both windows and linux
ok ok, thanks for the answers :D
And libplctag.Net supports both EtherNet/IP and Modbus/TCP
as far as I understand, libplctag wont work with the controller we have right ?
Your gateway says it supports EtherNet/IP
it should work.
See if it supports symbolic protocol
and it looks like this
our gateways
You would create a tag
Give it the gateway and path details
Say to use EtherNet/IP, say that the endpoint is probably a controllogix-compatible device
Set the tag address by
Name
And then initialize the tag and it "should" work
EtherNet/IP itself is an adaption of Rockwell CIP to operate over IP networkssymbolic doesnt show up in the pdf, any other keyword ? :')
I think you could just give it a try tbh
Reading a tag in C# libplctag.Net is like, 10 lines
ok i'll test right now, need to pull out work laptop
I can't share any of my production code with you because NDAs annoyingly, but I can help out if you need it
do you know a good sample to clone and modify ?
The gateway is the IP address of the machine
libplctag.Net github has samples?
But I found it super easy to get started, so long as you know the valid address of tags on the end device
oh, in the readme there is one, was searching for sources have some docs to help, maybe we'll see I need to use our office vpn which I never used
Do you have valid tags on the device?
mhhhhh
would this help ?
... Maybe? But a tag typically refers to a chunk of memory at a known fixed address
E.g.:
MyRealValue
like a C# variablethen I have the docs, will have to search it
first roadblock: the freaking vpn
Ah
lets run this .exe with a GUID which is under the vpn folder root cert I have expired in june only person who know about it are in vacation
F
wtf azure vpn clien... look shady af
@RazorSharpFang i'm in !!!!!!
bruh im a moron
@RazorSharpFang no plc, want to control motor directly
🤣
You'll have to find some way to talk to the digital inputs of the motor then
All of our digital inputs are handled by PLCs
there is a EhternetIP-ASi5 gateway for that, no ?
I'm not very familiar with the control system side of things.
I don't know how gateways work per-se.
I looked at the Ethernet IP side, it looks like I can open a connection, then talk directly to the motor controller?
But the motor controller use ASi-5, and I can't find anything about it
The motor controller may have defined memory addresses?
Those might be your tag Name
im not using libplctag, I don't think I even have tags there ?
From what I understand, I need to open one of these EtherNet/IP connection, then ... ?
I'm expecting named addresses on the motor
does assemblyobjects have named instance ? dont know what you are expecting
I'm expecting like
Output1
being a named address
Of a known datatype, e.g.: DINT, INT, SINT, REAL, BOOL etc is this named address thing
It's a region of memory on the controller
... controller ? of the motor ?
Either... ?
On a controllogix for instance, you can refer to external mapped devices
Kinda like memory-mapped files or addresses that correspond to particular digital pins on a computer
I have no PLC there
Okay, yes, but the gateway mapping should do something similar
Either that, or to use ethernet/ip, it would expect you to use a CompactLogix or similar controller that does ethernet/ip and then you can do ethernet/ip to that controller
gateway docs speak about ethernetip "connections", I dont see mappings
CompactLogix would be a cheaper controller
cheaper than ... what ?
Than a ControlLogix
$1000 vs $20000
it would expect you to use a CompactLogixobjective is to not use a PLC there FYI
Then perhaps you should be using a rasp-pi that has digital outputs, or a soc thingy ?
Are you sure it's a EtherNet/IP Master and not an EtherNet/IP slave?
Product selector: Gateways - Bihl+Wiedemann GmbH
Bihl+Wiedemann GmbH was founded in 1992 in Mannheim, Germany by Jochen Bihl and Bernhard Wiedemann. This highly specialized engineering firm is among the leading providers of safety technology and electronic components for automation technology using AS-Interface.
Oh! It supports OPC UA
Just use that
There's nuget libraries for OPC UA
Non-commercial only but whatever
there is an MIT lib for ethernetIP and I tested it yesterday
Okay, but OPC UA lets you query the device
As in "What do you have?"
Which you might be able to use to tease out what the memory addresses it has actually are, which might be the same on the EtherNet/IP side
But have you tried out the library on the device at all?
as far as I understood, I can redirect ASi-5 connection on ethernet/IP
yes, got some output
Were you able to move the motor?
not yet, due to my lack of knowledge of ethernetIP, and me not wanting to make a motor spin when nobody is in the office
Did you check their quick start guide on rockwell rslogix 5000 ?
What output did you get?
correction: not with the lib, but with gateway manufacturer software, yes
Does the gateway manufacturer software let you set motor output?
The more of the docs I read the more it makes me think it's expecting you to run this with a PLC
manufacturer software can do it without a PLC
¯\_(ツ)_/¯
Do you have access to
https://www.bihl-wiedemann.de/eb/download/dl_quicksetup/en_quick_start_guide_Rockwell_RSLogix5000.pdf
Download - Bihl+Wiedemann GmbH
Bihl+Wiedemann GmbH was founded in 1992 in Mannheim, Germany by Jochen Bihl and Bernhard Wiedemann. This highly specialized engineering firm is among the leading providers of safety technology and electronic components for automation technology using AS-Interface.
yes
Can you send it to me? It requires login
you just need an account, even unverified
Reviving this do you know details of the EtherNetIP protocol ?
Like what are the "path" ?
Path
Chassis and Slot identification that lets the EtherNet/IP card determine to which device on the bus you are referring to
E.g.:
1,0
(string)
Says "Chassis 1, Slot 0"I'm speaking about this:
the assembly have "path", which looks hardcoded
🤨
it's also called Link Path elsewhere
That's not the path I was referring to.
yeah, I understood that: p
This is a very different side of EtherNet/IP than the side I typically use, so I genuinely have no idea.
Yeah I think you are on the users/PLC side
I have no PLC there
that would be, 2 weeks, are at most 3 weeks of engineering time to get rid of the need of a PLC, I think that's worth it near completion (I hope), of generating code from the EDS (if you know what are those ?) to interface to a EthernetIP device directly
I only vaguely know what an EDS file tbh. Typically I just right-click and say "Upload from device" and then it "just works"