randhall
Hi all,
I just downloaded openplc and I'm trying to debug online...but it doesn't work.
This is the sequence:
-I upload the program on Arduino Uno
-I enable Modbus communication
-I select "live debug" (same ID, same serial port, same Baud)
when I try the debug connection I get this error:
 
[203128%2F9056298%2Fmceclip0]
 
 
 
So , as suggested by the message I transfer the program back to Arduino, but I get the serial communication error :
 
 
 
[203128%2F9056299%2Fblobid0]
 
The system no longer recognizes the communication serial .
To be able to transfer the program I have to disconnect and reconnect the USB plug...
and the trouble  repeats itself endlessly...
 
Has anyone had the same problem?
 
 
 
 
 
Reply 0 0
thiagoralves
First, make sure you have the latest version of the OpenPLC Editor (file->check for updates). Then make sure that no other program is using your serial port. The error you’re getting on upload means that another program is using the serial port. Try rebooting your computer to be sure that nothing else is running and using the serial port. Then try again.
Reply 0 0
randhall
I downloaded the latest version.
I have no other devices connected to USB.
In device management I only see ""Arduino Uno (COM3)"".
I uninstalled the Arduino Uno usb and then reinstalled it.

This is the strange thing:
normally the program loads correctly (the USB communication is ok)
only when I run the debug I get the error that the program does not match the target and asks me to reload the program.
When I reload the program it gives me the communication error.
It's as if the debug sees a different version of the program .
Reply 0 0
thiagoralves
What is the version of your editor? What does the about screen say?
Reply 0 0
randhall
[203128%2F9058848%2Fmceclip0]
Reply 0 0
randhall
Maybe the code should be saved in a particular folder or subfolder? In order to make it visible both from the editor and from the debug?
I also add that I have already reinstalled Openplc editor ...more than once.
Reply 0 0
thiagoralves
The error is not related to the MD5, but to the fact that the debugger can't read the MD5 from the project running in your board. After a few failed attempts it gives up with the final mismatch error. Try using a different USB cable to see if it works.
Reply 0 0
randhall
Ok , I'll try to do it .
Thanks so much for the support !!
Reply 0 0
randhall
Problem solved, I hope permanently.
I reloaded openplc runtime again and debugging seems to work regularly !!
Reply 0 0
BambosD
Hello everyone !!
i have the same issue with a runtime on Linux connecting with IP Address. what port should i use?? i saw on some posts mentioning about modbus port usage for live debugging.

the port on 8080 running the runtime interface succesfully, i have enabled the modbus TCP Server on 1502 (because of linux users limitation using ports below 1000).

On the live debugging i'm using the port 1502 and also 8080. none if it is working.

Updated the IDE running on windows already.

Any suggestions appreciated.
Reply 0 0
BambosD
The output console when using the IP and modbus TCP Server port is:

PLC :
[CC] plc_main.c -> plc_main.o
[CC] plc_debugger.c -> plc_debugger.o
PLC :
[CC] Config0.c -> Config0.o
[CC] Res0.c -> Res0.o
Linking :
[CC] plc_main.o plc_debugger.o Config0.o Res0.o -> project1.dll
Successfully built.
PYRO connecting to URI : PYRO://localhost:62068
PLC did not provide identity and security infomation.
Latest build does not match with connected target.
PLCobject : Incorrect MD5! Expected: 60056181c7d1902529a1cee4da6c362c Received: ab961f2226af1e62d09dcbf21a2e67df
This project does not match the program running on target. Upload the project to target and try again.
Couldn't stop PLC !
Reply 0 0
thiagoralves
Make sure you’re running the latest version of the runtime. Some older versions don’t even have support for online debugging. If you’re not sure, git clone and reinstall the runtime.
 
Also, it is always advisable to run the runtime as root. This will get rid of the 502 Modbus port limitation. You should use the Modbus port with the debugger.
Reply 0 0
BambosD
Hello and good morning,
i can confirm that the commands on the installation guide needs to be executed as sudo, otherwise the system is misbehaving.
 
now I'm able to use the sample program tcp socket, upload it using the web interface, and then start online debugging successfully using the modbus port.
 
Question: how we can make online change to the program and re-send it to the runtime ?? on the menu of transfer program to plc, the window opens and there are inside the drop down list all the controllers, but not the bare linux. Does this mean that we need to manually upload the file to the web interface ?
Where this file needs to be located as path ?? Is there any workaround for this ?? What about creating an SMB Share on the Openplc path and send the file over SMB ?
 
Question 2 : in between my trials with the system, i had the openplc runtime on linux running as a service inside /lib.......  
on the latest git clone, install and run script, this is not done. is there any difference on the command ./ install.sh linux or ./ install.sh   without arguments ?
 
Thanks for any suggestions.
Reply 0 0
thiagoralves
1.Currently you have to upload the program manually to the webserver. You can reuse the same program entry instead of creating a new one every time. Just open the program entry on programs and select “update program” to upload a new .st file. There is no way to upload it directly from the editor. We’re going to fix this flow on the next major version release of the runtime.
 
2.OpenPLC does not install itself on /lib. Calling install.sh without arguments will not do anything. It will error out and ask for the correct argument. On Linux, OpenPLC installs itself as a systemd service, so that it is always started on boot.
Reply 0 0
Reply