0

I am working on a project that I have to make a connection to an Allen Bradley ControlLogix over EtherNet/IP which uses TCP. Does anyone know how to craft packets to send over TCP to receive data? I am sure I have to use CIP to get a specific tag, but I am not sure how it is supposed to be crafted so the TCP Server in the PLC will give me a return. As an example, lets say I want to get a tag called TankTemp (real) and it is in my UDT MyTopic so normally I would use MyTopic.TankTemp. I want to essentially make something like libtagPLC, but I want to do it myself I just am not sure how to get the return from the PLC. My stack is C# .Net Core 3.1 so I am using the TCP Lib that is built into C#.

If I need to clear anything up please do let me know I am not a great writer.

Thanks in advance!

2 Answers2

0

I did answer a similar questions

Where should I start with my OPC-UA client?

or

Get data from RSLinx and send to SQL Server through Visual Basic or C#?

With out node-red you would need to buy a driver, write your own driver, or use an open source driver.

Node-red was developed by IBM and is currently supported by paid IBM employees.

If you would like to use node-red I can post the code you would need. I would get the data from the PLC and then provide it as a http rest end point and/or a MQTT message.

CTGControls
  • 104
  • 1
  • 8
  • The goal is to completely skip RSLinx and all proprietary software. I want to figure out how to write the driver really. Something like https://github.com/libplctag/libplctag unless an MPL 2.0 license means I can use it in my software I plan to sell later (obviously giving credit where it is due) I am not really good at understanding licenses – Benjamin Furlani Apr 02 '21 at 22:26
  • Is your "goal" a product you are going to market or is it something you will be using inside of a single company? – CTGControls Apr 05 '21 at 20:15
  • my goal is the use it as like an API. So I built the process for how it goes through and what it edits and grabs, but I am using it inside of software that I plan to sell later on. I don't plan to sell the Library obviously just use it inside my software with 0 edits to the library – Benjamin Furlani Apr 07 '21 at 14:33
  • It's difficult for me to make recommendations for commercial products. I don't understand your industry or your customer base. So I'm going to make recommendation as if I was using my industry in my customer base. If I were going to market a canned product, I would not use a open source project. I would purchase a driver that's already developed and comes with support. The problem I have ran into in the past is as soon as I get something working for one customer the second customer wonts a different PLC. – CTGControls Apr 13 '21 at 14:19
  • If you are going with open source, I would use a company that also provides paid support. Here are two examples: https://github.com/rossmann-engineering or https://www.advancedhmi.com/index.php?main_page=product_info&cPath=3&products_id=14 – CTGControls Apr 13 '21 at 14:29
0

A hardware based solution could be that the ControlLogix has embedded "Socket interface architecture", this is a Rockwell automation solution which offers the capability to communicate the ControlLogix whith Ethernet devices that do not support EthernetIP protocol. These sockets or servicesa re available for Controllers 5580, 5380, 5370, 5480, and for 1756-EN2x, -EN3TR, -EN4TR and -EWEB modules.

For this solution you´ll need to map the data using a function block, provided by Rockwell Automations 's website, but this instruction communicates specifically to Modbus TCP.