thiagoralves
Hello OpenPLC Community!
 
I'm excited to share a new feature that many of you have been waiting for! You can now write values directly to the runtime from the Monitoring tab—finally! This has been a highly requested addition, and I’m happy to see it is finally here.
 
Currently, only %QX is supported, but I’m planning to add support for %QW, %MW, %MD, and %ML in the future. Check it out in action below:
 
monitoring.gif
Reply 6 0
fg71
Nice, it would be cool if there was also momentary push button specially in your example above.
Reply 0 0
nikucolor
Hello OpenPLC Community!
 
I'm excited to share a new feature that many of you have been waiting for! You can now write values directly to the runtime from the Monitoring tab—finally! This has been a highly requested addition, and I’m happy to see it is finally here.
 
Currently, only %QX is supported, but I’m planning to add support for %QW, %MW, %MD, and %ML in the future. Check it out in action below:
 
monitoring.gif
Very cool!!! Well done, thank you. But I didn't manage to start like that. I have an esp8266 slave, I wrote %QX100.0 etc. and it does not appear as in the example. I updated the editor. Thank you.[203128%2F9031814%2Fmceclip0]
Reply 0 0
thiagoralves
That’s because you need to update the runtime, not the editor
Reply 0 0
nikucolor
Ok, that's it, sorry. Now it works. Thank you.[203128%2F9032430%2Fmceclip0]
Reply 0 0
fg71
One cool feature I think is to use Blender CGI application and install Python modules inside Blender.
 
ex.
pip install <package_name> --target="PATH_TO\\AppData\\Roaming\\Blender Foundation\\Blender\\4.2\\scripts\\modules"
 
Will install any Python module inside Blender.
 
I believe its possible to build a simple simulator inside Blender and use OpenPLC.
 
try it.... and let me know.
Reply 0 0
Mange
That’s because you need to update the runtime, not the editor
I have Release: 2024-12-03 of the runtime in a PI, but nothing happens when I press true or false.
Reply 0 0
fg71
but nothing happens when I press true or false.
You could only write to input that is not (physical input) not directly to output. Meaning in Ladder Diagram its the
contact you could change the state from False to True.
 
In the screenshot below it means I could change FALSE to TRUE with M_IN but not D_IN both are contacts in Ladder Diagram.
All OUT_C_X are coils (output) and this couldn't be changed directly. The reason I couldn't change D_IN its a physical input.
Like real switch connected to the GPIO pin on Raspberry Pi. On other hand M_IN could be a switch for HMI there you change
the state. In that context we could describe it as user inputs. In some PLC IDE they use something called memory flag a pointer
to address register there a user have read/write access. If the physical input is TRUE to start a motor you couldn't send a message
thru a communication to set the state to FALSE. The OUT_C_1 is both contact and coil but in reality the contact is a reference to the
state of a output. Meaning you couldn't change the state of a output by using a contact with the same variable name.
 
Its also good to know how Raspberry Pi is working and how the mapping of the pins. It could be a physical pin is TRUE when its FALSE
In other words GPIO 0 to GPIO 7 have internal pull-up resistors enabled. In the example below D_IN use physical pin 7 (GPIO 4)
In OpenPLC Runtime that is TRUE the opposite from what we think its.
 
[203128%2F9113686%2Fmceclip0]
Reply 1 0
Mange
You could only write to input that is not (physical input) not directly to output. Meaning in Ladder Diagram its the
contact you could change the state from False to True.
 
In the screenshot below it means I could change FALSE to TRUE with M_IN but not D_IN both are contacts in Ladder Diagram.
All OUT_C_X are coils (output) and this couldn't be changed directly. The reason I couldn't change D_IN its a physical input.
Like real switch connected to the GPIO pin on Raspberry Pi. On other hand M_IN could be a switch for HMI there you change
the state. In that context we could describe it as user inputs. In some PLC IDE they use something called memory flag a pointer
to address register there a user have read/write access. If the physical input is TRUE to start a motor you couldn't send a message
thru a communication to set the state to FALSE. The OUT_C_1 is both contact and coil but in reality the contact is a reference to the
state of a output. Meaning you couldn't change the state of a output by using a contact with the same variable name.
 
Its also good to know how Raspberry Pi is working and how the mapping of the pins. It could be a physical pin is TRUE when its FALSE
In other words GPIO 0 to GPIO 7 have internal pull-up resistors enabled. In the example below D_IN use physical pin 7 (GPIO 4)
In OpenPLC Runtime that is TRUE the opposite from what we think its.
 
[203128%2F9113686%2Fmceclip0]
Great explanations, thanks @fg71!
I think I get it, but I cant even force true/false on the ones that are %QC, and which are marked as possible to force in the monitor window of Runtime.
[203128%2F9114148%2Fmceclip0]
Reply 0 0
Mange
It works now for me to force all variables during debug, but only %QX and %QW are updated in the runtime webpage. I guess that the blue true and white false fields are meant to be push buttons in later versions?
Reply 0 0
thiagoralves
The debugger is different than the monitoring page. The debugger is on the editor, and on that you can indeed force variables. The monitoring page is just a Modbus utility that allows you to visualize and interact with your program through Modbus. In the Monitoring page, those true/false buttons ARE indeed push buttons, but as I explained to you earlier, those are just Modbus write requests. If your program overwrites the state of the variables, the write request is lost in one scan cycle. In other words, if your variable is associated with a coil at the end of a rung, writing to it from Modbus will take no effect, as your program will take precedence to define the state of your variable. However, if this variable is associated with a CONTACT only, then yes, you can write to it from Modbus and it will take effect.
Reply 1 0
Mange
The debugger is different than the monitoring page. The debugger is on the editor, and on that you can indeed force variables. The monitoring page is just a Modbus utility that allows you to visualize and interact with your program through Modbus. In the Monitoring page, those true/false buttons ARE indeed push buttons, but as I explained to you earlier, those are just Modbus write requests. If your program overwrites the state of the variables, the write request is lost in one scan cycle. In other words, if your variable is associated with a coil at the end of a rung, writing to it from Modbus will take no effect, as your program will take precedence to define the state of your variable. However, if this variable is associated with a CONTACT only, then yes, you can write to it from Modbus and it will take effect.
So for instance, I can have a pair of contacts and force them up or down in order to by a logic, adjust a speed or similar, on a running machine?
Reply 0 0
thiagoralves
From the debugger (either running on simulation in the PC or in your target board), you can force contacts, coils, variables (INT, TIME, DATE), pretty much anything.
 
From the monitoring page, you can only write to contacts located in %QX locations.
Reply 1 0
Mange
From the debugger (either running on simulation in the PC or in your target board), you can force contacts, coils, variables (INT, TIME, DATE), pretty much anything.
 
From the monitoring page, you can only write to contacts located in %QX locations.
OK, I got it to work now with an "HMI-contact" on an %QX adress. The blue/white buttons in monitor are a bit buggy, sometimes seems you must doubble-click on them, thats why had problems to understand, but sometimes one single click is enough.  I can live with that ;-) !
Thanks again for your great job Thiago!
 
A bit messy, but it works! (Also similar in Monitor):
[203128%2F9119150%2Fmceclip0]
 
All I have to do now is to figure out the simplest way to make 4 HMI-contacts to be able to "pushdim" my two important speeds, SPEEDTARGET and BPHO :-)
Reply 1 0
thiagoralves
I think I understood better your problem as well. When you're debugging the real hardware, are you having issues to force VP, PRESSOSTAT and VPKONTAKTOR? All those variables are located in %IX locations, which ties them to hardware. I think the hardware is overwriting the debugger force, as the hardware has the highest priority. Maybe I need to fix that. If you want to test if this is the case, remove all the %IX locations from your program (just leave them empty) and then debug on the hardware again to see if you can force those contacts from the debugger. You should be able to force everything in that case.
Reply 0 0
Reply