zpg2000
Hi,
I have created a  project in Open PLC and has integrated it with the ScadaBR. The challenge which I am facing is how to connect a push Button in HMI to the logic in PLC. Open plc has internal variables but seems like it is all register type. Also when I am trying to connect memory signal to TON ET pin it is showing error.

Please find the logic attcahed.
 
PLC.jpg

Can you suggest me, how to do the same?

Thanks
Jagadish P Gupta
Reply 0 0
thiagoralves
Locate your start_button at position %QX2.0 or any other unused coil location. %QX2.0 will be available at Modbus coil address 16 (check  https://www.openplcproject.com/reference/modbus-slave/ for more info on Modbus addressing)

Your green_time_left must be of type DINT if you’re placing it at %MD0. You will need to use a conversion block to convert from TIME to DINT. Place the conversion block between the variable and ET
Reply 1 0
zpg2000
Hi Thiago Alves,

Thank you for the response.
If I locate the start button as output %QX2.0 then how come it will write to the programme. I tried as told but still, I am not able to activate my logic. I assigned the %Q2.0 to a button in HMI it is able to do the ON/ OFF but it is not able to write to the program. as a result my program not running.
Reply 0 0
thiagoralves
I don’t know. I don’t have your logic to check. From the screenshots I can see that your start_button is activated, so in my view it is working
Reply 0 0
zpg2000
Hi,
Sorry, forget to attach the logic. Please find it attached.  The start_button is an operator input that starts the logic. So hope I am able to make my point and what issue I am facing. it is the integration of the HMI button with the OpenPLC program logic. Generally, in PLC programming we use some internal variables.

Thank you for the reply.
Reply 0 0
thiagoralves
I can only see a small portion of your program from the screenshot. I don’t think the problem is the integration with your HMI, because as I told you, the start_button seems to be working from the Monitoring page screenshot. If the lights are not turning on as expected, it is probably because your logic is wrong.
Reply 0 0
zpg2000
Hi
Thanks for following up and replying.
Please find attached my logic diagram along with the variable list. I did the simulation in the editor, there the logic was working fine. Only I have to force the Start_button manually.
I am still not sure how an output coil will write to a programme. The start_button seems to be working from the Monitoring page screenshot because it is just showing the output status of the DO %QX2.0, which we have written (forced) from HMI.
I hope my understanding is wrong. and sorry for bugging you.
 Thank again
Regards
JPG
Reply 0 0
zpg2000
Hi Thiago Alves,
were you able to look at the logic? any suggestions on how to make the Start_button start the logic.
Thanks
JPG
Reply 0 0
zpg2000
Hi Thiago Alves,

you were right now it is working fine, I have to delete the %MD variable.  Thanks

Reply 0 0
Reply