Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opta 1.1 breaks connection over Modbus on Arduino PLC IDE #5

Open
JC-85 opened this issue May 31, 2024 · 10 comments
Open

Opta 1.1 breaks connection over Modbus on Arduino PLC IDE #5

JC-85 opened this issue May 31, 2024 · 10 comments

Comments

@JC-85
Copy link

JC-85 commented May 31, 2024

I have a project in Arduino PLC IDE 1.0.3 where I've been using Modbus TCP to remote debug and download updates. Today after upgrading Arduino PLC IDE to 1.0.6 and re-initializing the Opta I can no longer connect to the device, it only shows Error in the Connection status-bar. I've tested this with two separate devices, the first one was field deployed and I can still connect to it as a modbus slave and read mapped variables in the 0x6000 range. Wireshark suggests that the registers used for the management communication is unavailable.

Skärmbild 2024-05-31 191700

Downgrading to PLC IDE 1.0.3 and re-initializing with Opta 1.0 solves the problem.

@manchoz
Copy link
Collaborator

manchoz commented Jun 19, 2024

Hi @JC-85, in PLC IDE 1.0.6, we had to remove support to update the PLC application with Modbus TCP because it is not fully functional (also in 1.0.3).

In the PLC IDE, a complete PLC application consists of the PLC runtime and the PLC application. The PLC runtime can only be updated via USB, and since it's linked to the embedded Arduino Sketch, a complete application update may require updating both the PLC logic part and runtime. This process is essential to ensure a fully updated application.

For example, if you use the Arduino Sketch to configure the Ethernet port and change the configuration, you must also update the runtime part. It is impossible to update the runtime part with Modbus TCP, so you will likely end up with an Opta in an inconsistent status.

We are working on a solution that also allows updating the PLC runtime over the Ethernet connection, which will be included in the next releases.

Meanwhile, please use the Modbus TCP connection to update the application with extreme care.

@Incompetent-OE
Copy link

Any idea of a ballpark when the next release is going to be released? PLC IDE 1.0.6 is unstable enough I am seriously considering shelling out for an industrial PLC that will just work.

@manchoz
Copy link
Collaborator

manchoz commented Jun 20, 2024

Hey @Incompetent-OE, what kind of instability are you experiencing?

Please keep in touch with the Arduino PRO support at pro at arduino.cc

@Incompetent-OE
Copy link

Incompetent-OE commented Jun 20, 2024

@manchoz Well the biggest one is the IDE crashing about half the time a device refuses to connect, even over USB. I figured out part of the issue was I had flashed the wrong firmware version to my boards, but even with the correct firmware I'm still crashing enough for it to be a headache.

@manchoz
Copy link
Collaborator

manchoz commented Jun 20, 2024

@Incompetent-OE try resetting the Opta to factory defaults following the instructions at https://docs.arduino.cc/tutorials/opta/memory-partitioning/ and then start with the PLC IDE from scratch.

@JC-85
Copy link
Author

JC-85 commented Jun 25, 2024

Hi @manchoz, thanks for the response.

In the PLC IDE, a complete PLC application consists of the PLC runtime and the PLC application. The PLC runtime can only be updated via USB, and since it's linked to the embedded Arduino Sketch, a complete application update may require updating both the PLC logic part and runtime. This process is essential to ensure a fully updated application.

That seems reasonable and not really a major hurdle, it was part of the learning curve to see which changes could be pushed over Ethernet and which required a serial connection.

In my use case I'm about to deploy 10 Opta units to a remote site. The development is completed so I don't need to push any major changes except for fine tuning a constant for a linear transform that's applied to one of the analog inputs. The watch window is also really helpful with this.

So the base functionality in Opta 1.0 already fulfilled all my requirements. But there seems to be a major issue in Opta 1.0. When running as a modbus slave I get mbedOS crashes after 12-24 hours, with the red status LED blinking alternating long and short pulses. I would have opened a separate issue for this except I don't really have a better error description than this. And it doesn't seem to be in a consistent fashion either. The unit I have at my desk I can just power cycle and it will come back online, but the unit we did our initial test deployment with refuses to acquire a new DHCP lease and needs to be re-initialized to com back to life.

This problem however seems to have been fixed in Opta 1.1. We had a device up and running for over 48 hours without issue. But the lack of a watch window was really setting us back with verifying the calculations on analog values, so we decided to roll back to Opta 1.0 to see if we can sort out the random mbedOS crashes, but so far we haven't gotten anywhere with that.

@manchoz
Copy link
Collaborator

manchoz commented Jun 25, 2024

Hey @JC-85,
What do you think about reading the values using a Modbus client? You can export your analog variables as Modbus variables by adding them as Status variables in the Public Objects menu in the Resources pane.

Any Modbus client software will do it. Also, you can use another Arduino board running as a Modbus client to collect data from the remote devices.

@manchoz
Copy link
Collaborator

manchoz commented Jul 15, 2024

Hi @JC-85,
any feedback?

@JC-85
Copy link
Author

JC-85 commented Sep 19, 2024

Hi @manchoz, sorry for the delay.

What do you think about reading the values using a Modbus client?
This has been the plan all along when we go live in production. We have our own Modbus library in C# which to read devices over both RTU and TCP/RTU.

We have been attempting to move to Opta 1.1 but I feel there are major issues with this release. For one thing it seems the latest version of PLC IDE can't provision new un-activated devices. Currently I need to connect new devices to my laptop running PLC IDE 1.0.3 just to activate the license and then move to my workstation with PLC IDE 1.0.6 to download the sketch. When downloading a project it will pop up a failure dialogue even if the download succeeds.

We're hoping to get a device running Opta 1.1 installed on-site next week to see how it runs and were hoping it will solve stability issues in Opta 1.0 (about every 24h the Modbus server stops responding).

@manchoz
Copy link
Collaborator

manchoz commented Sep 19, 2024

@JC-85, please contact the dedicated support at https://www.arduino.cc/pro/contact-us/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants