Hello everyone, my name is Mick and I'm a beginner PLC programmer
I'm using an Omron CP1L and a NS5 HMI and what I trying to to do is calculate how much a piece of equipment is costing the customer based on the time it is on.
For example if Heater A were on for 3:45:45 h:m:s I could convert the time to decimal using 1 hr + (45/60) + (45/3600) = 3.7625 hrs and them multiply that by their energy costs.
How do PLCs handle numbers and fractions of whole numbers? for example When I divide 45/60 = 0.75 how can this be handled?
Thanks
Mick
I'm using an Omron CP1L and a NS5 HMI and what I trying to to do is calculate how much a piece of equipment is costing the customer based on the time it is on.
For example if Heater A were on for 3:45:45 h:m:s I could convert the time to decimal using 1 hr + (45/60) + (45/3600) = 3.7625 hrs and them multiply that by their energy costs.
How do PLCs handle numbers and fractions of whole numbers? for example When I divide 45/60 = 0.75 how can this be handled?
Thanks
Mick