[email protected]
Member
I need to take seconds and convert to mm:ss. Say i have a cycle that the operator of a machine wants to run for 125 seconds. He will enter 125 into a setpoint on the hmi. They want me to show them on the hmi how much time is left in that cycle while its running. Its simple for me to do if i show them in seconds. But how do I convert those seconds to be displayed
as mm:ss (02:05)????
Math wise: 125/60=2.083 (This gives me minutes)
.08333333*60=4.999 (This gives me seconds)
Im trying to display a reg for minutes then next to it a reg for sec. But I cant figure out how to take my 2.083 and mask it so I get rid of the 2 so that i can do my seconds equation. Is there another way to do this or am i on the right path? can you mask real #s?
as mm:ss (02:05)????
Math wise: 125/60=2.083 (This gives me minutes)
.08333333*60=4.999 (This gives me seconds)
Im trying to display a reg for minutes then next to it a reg for sec. But I cant figure out how to take my 2.083 and mask it so I get rid of the 2 so that i can do my seconds equation. Is there another way to do this or am i on the right path? can you mask real #s?