ADevelp
Hello, I need some information:
  1. If I have a program running on the Runtime (compiled as openplc.exe), is it possible to perform visual debugging from the OpenPLC Editor?
  2. Is there a way to compile and update the openplc.exe file directly from the Editor, or must it necessarily be done through the webserver?
My needs are to verify the program at runtime while programming without too many steps, even just to invert a contact from NO to NC.

PS: My hardware is set to blank with custom code.
Reply 0 0
thiagoralves
  1. Yes. Just click on the blue bug icon at the top toolbar and provide the IP address of the computer or device running the runtime
  2. No. You need to use the webserver. You can update a program instead of having to create a new one every time.
Reply 0 0
ADevelp
The PC where openplc.exe Runtime runs is the same one where the Editor runs.
Which IP should I use localhost or the assigned one?
By 'update' do you mean saving to the same .st file and then reloading it from the webserver?
But I have to delete the current one first, which is a bit cumbersome, don’t you think? Isn’t there another method, even if it needs to be implemented?
Reply 0 0
ADevelp
In fact, it would be enough to use the same compilation command from the web server in the Editor and compile directly into the openplc.exe file, at most adding stop and run functions to the Editor.
Reply 0 0
thiagoralves
The PC where openplc.exe Runtime runs is the same one where the Editor runs.
Which IP should I use localhost or the assigned one?
Either localhost or your computer’s IP, it will work the same. Just make sure that the PLC is running your program before trying to connect the debugger.
By 'update' do you mean saving to the same .st file and then reloading it from the webserver?
But I have to delete the current one first, which is a bit cumbersome, don’t you think? Isn’t there another method, even if it needs to be implemented?
On the runtime webserver, click on the program you want to update on the programs list, and then click on “Update program” button at the bottom of the page. This will allow you to upload another .st file, without having to create another program entry or deleting the current program.
In fact, it would be enough to use the same compilation command from the web server in the Editor and compile directly into the openplc.exe file, at most adding stop and run functions to the Editor
This won’t work, as the runtime and the editor do not run on the same architecture, and the runtime v3 do not have a web API to allow remote programs to send commands to it. The program needs to be compiled by the runtime invariably. On v4 we are adding the ability to upload the program to the runtime from the editor directly. But v4 is a completely different design, and that’s why it will work on v4, but not on v3
 
Reply 0 0
ADevelp
Thank you for your answers.
What do you mean by loading the Runtime from the Editor? Could you please be more detailed?
Where can I set the connection IP to the default 127.0.0.1 so that it can be found without needing any further configuration?
What other features does version 4 include?

Reply 0 0
ADevelp
What other features does version 4 include?
Reply 0 0
thiagoralves
What do you mean by loading the Runtime from the Editor? Could you please be more detailed?
On v3 you generate an .st file from the editor that needs to be manually uploaded to the v3 runtime using your browser. On v4, the editor will connect with the v4 runtime (you just need to provide the runtime IP) and the editor will upload the program directly to the runtime when you compile the PLC project, without any extra manual intervention. This is exactly what you asked in your original question: "Is there a way to compile and update the openplc.exe file directly from the Editor, or must it necessarily be done through the webserver?"
Where can I set the connection IP to the default 127.0.0.1 so that it can be found without needing any further configuration?
On v3 you only provide the runtime IP when you're connecting to it through the debugger (blue bug icon on the top toolbar). The IP you type in there is saved so you don't have to type it again next time.
 
What other features does version 4 include?
v4 is currently in beta, and doesn't even have all the features that v3 has (for example, it is lacking the debugger and arduino compilation at the moment). But it is built on a more solid foundation, allowing us to implement better features. You can try v4 on your own downloading the beta from here: https://github.com/Autonomy-Logic/openplc-editor/releases
 
Also, the feature I just mentioned about connecting directly to the runtime is also in development. So for this beta you still need to follow the same flow you have on v3, which is manually upload the .st file through the webserver.
Reply 0 0
ADevelp
 
On v4, the editor will connect with the v4 runtime (you just need to provide the runtime IP) and the editor will upload the program directly to the runtime when you compile the PLC project, without any extra manual intervention.
 
 
Great, that’s what’s needed. Since you’re developing it, check the possibility of hot modification of the program it requires more memory, but for the SoftPLC it’s not a problem. In many environments, this is useful in case of repeated upgrades that cause blackouts while the system is running.


On v3 you only provide the runtime IP when you're connecting to it through the debugger (blue bug icon on the top toolbar). The IP you type in there is saved so you don't have to type it again next time.
 
Since we are talking about Runtime as a SoftPLC, setting the host address by default could be an idea that works in most cases, and then one can change it to a custom one if needed.

But in those cases, the initial approach becomes even more immediate. For version 4, let me know if you need a hand with debugging — as a user, I have already participated in debugging an IEC1131-3 (FP WIN Pro Panasonic) and other projects… I can help if needed.
Reply 1 0
MDK
Hello, I need some information:
  1. If I have a program running on the Runtime (compiled as openplc.exe), is it possible to perform visual debugging from the OpenPLC Editor?
  2. Is there a way to compile and update the openplc.exe file directly from the Editor, or must it necessarily be done through the webserver?
My needs are to verify the program at runtime while programming without too many steps, even just to invert a contact from NO to NC.

PS: My hardware is set to blank with custom code.
Crazy coincidence this thread is so recent and I found it trying to research something else...
 
Regarding #2 - I just finished writing a python script to headlessly upload and compile a .st file to the runtime. I see you mention an exe file so maybe we are talking different things? Anyway, It uses the python requests library which has a session class that keeps track of all the cookies so it will log you in and complete the process of getting and posting to the different routes, the technique should be able to tackle any tasks that require the webserver.

https://github.com/mdkrieg/openplc-tools

Hope it fits your needs and let me know if you have any trouble with it.
Reply 0 0
Reply