Scott.Thompson
All:

Two issues related to Ethernet/IP on OpenPLC.  I believe that the Ethernet/IP stack is still in development, but I'll ask the questions nonetheless in case someone has had success.

(1) For Ethernet/IP protocol addressing, logic tells me to use a methodology that looks like this.  Normally registers on a MicroLogix would be 16 bit, but I used an 8 bit methodology like in OpenPLC:

Digital Inputs:
%IX0.0 - %IX0.7 = I:0/0 - I:0/7
%IX1.0 - %IX1.7 = I:1/0 - I:1/7
Digital Outputs:
%QX1.0 - %QX1.7 = O:1/0 - O:1/7
etc...

(2) mySCADA is crashing OpenPLC when it tries to talk using Ethernet/IP.  The software gives me three Rockwell/AB type options --- MicroLogix / CompactLogix / ControlLogix.  In this case, I used the MicroLogix interface.  I've used mySCADA as an HMI for MicroLogix 1100 PLCs before.

With OpenPLC, mySCADA sends 2 SYN packets to port 44818 which is just unusual.  Regardless, the first SYN initiates and completes the 3 way handshake.  OpenPLC and mySCADA negotiate a session in Ethernet/IP, but the crash happens with the Common Industrial Protocol (CIP) connection manager.  I'm sending a packet capture.

If there's a different HMI I should consider, I am all ears!

Thanks all!

Scott
Reply 0 0
thiagoralves
Hi Scott. This is really good and valuable info. The EtherNet/IP implementation on OpenPLC was made from scratch. We had to reverse engineer the protocol by observing a ML1400 communicating with AdvancedHMI, so it is probably missing some important bits and pieces. We’ve tested the communication with AdvancedHMI and it works. I bet this crash might be related to reading/writing to wrong locations as there seems to be many different ways to access locations on EtherNet/IP. Try running openplc from the command line with GDB to see if you can catch the error precisely where it happens. If I have some free time this week I’ll also try to look into this a bit.
Reply 0 0
Scott.Thompson
Thaigo ... I'll take care of it.  I have to do some additional testing for an Ethernet/IP project.  I'll see if I can get something posted on Monday.

I'm going to consider purchasing AdvancedHMI, but I'll probably throw IGSS Free50 at it on Monday.  I love mySCADA because it's super easy and fast to set up HMIs, but even it's Modbus/TCP stack isn't the best.

BTW ... The OpenPLC implementation on the UniPi Neuron is awesome!  Very fun.  I might have to do a video next week.
Reply 0 0
thiagoralves
AdvancedHMI is free. That’s why we used it. Ideally it should work with any HMI that can talk EtherNet/IP, not only AdvancedHMI. I just noticed that Ignition SCADA also crashes OpenPLC when they talk over EtherNet/IP. So definitely there is something wrong in there that needs to be fixed. Thanks for your help
Reply 0 0
Scott.Thompson
Thiago:

Having trouble using GDB.  I ran this again on a fresh softplc.  My ethernet/ip request crashes the PLC runtime but not the webserver.py service.  The log file on the web page clears before I can pull any data.  I'm looking for a .txt file where the internal log is saved.

Thanks for turning me on to AdvancedHMI.  I'm going to fire that up tonight.

Best Regards, S
Reply 0 0
Scott.Thompson
I'm crashing OpenPLC with AdvancedHMI.  I'm doing something wrong.

I'm using "EthernetIPtoDHRIOforSLCMicroCom1" as a driver (MicroLogix).  Addressing is in the following format:  For %QX2.0, I'm using O:2/1 ... etc.

Modbus/TCP works like a champ!  Very nice software.
Reply 0 0
thiagoralves

Scott, I think the easiest way is to actually debug the application to find where it is failing. You can run OpenPLC with gdb going to the folder where OpenPLC executable lies (OpenPLC_v3/webserver/core) and then running gdb openplc.

The only catch is that you will need to start EtherNet/IP server manually since you’re running it out of the webserver. To do that, on the same machine where OpenPLC is running, open a new terminal and Telnet to localhost on port 43628. Then on the telnet session type

start_enip(44818)

This will start the EtherNet/IP server on the running OpenPLC instance.

Reply 0 0
marco0
Dear Thiago, are there any updates on this matter?
Thanks a lot
Marco
Reply 0 0
thiagoralves
Nope... I had to focus on other things and never dig into that. Is this something you would be willing to help fixing? If so, I can provide guidance in the process
Reply 0 0
marco0
Nope... I had to focus on other things and never dig into that. Is this something you would be willing to help fixing? If so, I can provide guidance in the process

I would love to help! Let me know how
Reply 0 0
thiagoralves
Thanks @marco0. Start by trying to reproduce @Scott.Thompson problem from above.
Reply 0 0
jaebarn
All:

Two issues related to Ethernet/IP on OpenPLC. I believe that the Ethernet/IP stack is still in development, but I'll ask the questions nonetheless in case someone has had success.

(1) For Ethernet/IP protocol addressing, logic tells me to use a methodology that looks like this. Normally registers on a MicroLogix would be 16 bit, but I used an 8 bit methodology like in OpenPLC:

Digital Inputs:
%IX0.0 - %IX0.7 = I:0/0 - I:0/7
%IX1.0 - %IX1.7 = I:1/0 - I:1/7
Digital Outputs:
%QX1.0 - %QX1.7 = O:1/0 - O:1/7
etc...

(2) mySCADA is crashing OpenPLC when it tries to talk using Ethernet/IP. The software gives me three Rockwell/AB type options --- MicroLogix / CompactLogix / ControlLogix. In this case, I used the MicroLogix interface. I've used mySCADA as an HMI for MicroLogix 1100 PLCs before.

With OpenPLC, mySCADA sends 2 SYN packets to port 44818 which is just unusual. Regardless, the first SYN initiates and completes the 3 way handshake. OpenPLC and mySCADA negotiate a session in Ethernet/IP, but the crash happens with the Common Industrial Protocol (CIP) connection manager. I'm sending a packet capture.

If there's a different HMI I should consider, I am all ears!

Thanks all!

Scott
Hi Scott,
 
What addressing did you use for talking to %MW1 etc data types out for curiosity?
 
I can access the I:0/0 and O:0/0 registers in the OpenPLC device from an HMI but I can't see to find what %MW1 translates to in EtherNet/IP. I know normally Allen Bradley devices with use N7:0 etc but this doesn't seem to mach up with OpenPLC.
 
Thank in advance.
Reply 0 0
Reply