GregC
I have an irrigation program running in openplc which is controlled and viewed in ScadaBR.
I am using a TON in openplc which is activated on each of the valves so I can display the elasped time (via CV) in seconds in ScadaBR.
 
How do I go about displaying hours, Minutes and Seconds in ScadaBR instead of just seconds.
Reply 0 0
thiagoralves
You can either write a script on ScadaBR to convert the data to hours, minutes and seconds, or do it on the PLC itself and then expose three Modbus registers, one with hours, another with minutes and another with seconds.
 
If you’re asking about the math to convert it, that’s quite simple:
hours = total_seconds / 3600
minutes = (total_seconds - (hours * 3600)) / 60
seconds = total_seconds - (hours * 3600) - (minutes * 60)
Reply 0 0
GregC
Thanks Thia, if I do it on the PLC, do I write it as an St script or is there a way to include hours, minutes and seconds into an IW
Reply 0 0
thiagoralves
You can write this as ST, Ladder or any other language you want. ST is normally easier to write math on. Once you have the math done, just store the result in QW or MW registers to have them available in your ScadaBR
Reply 0 0
Reply