Hours minute seconds

Studio 5000

Seconds is from accum of a timer preset 60000
minute comes from the done of the timer
hour comes from minute add grt than 59
 
I added the 3rd int

seconds int
minute int
hour int

I want to combine all 3 into HH:MM:SS. Anyone done this before in Studio 5000
 
Totalseconds_DINT = time.acc / 1000
Seconds = Totalseconds_DINT mod 60
Minutes = ((Totalseconds_DINT mod 3600) - seconds) / 60
Hours = ((Totalseconds_DINT - minutes *60 - seconds) / 3600
 

Similar Topics

I have a pump with ON off status in PLC micrologix 1400 my question is how I can calculate working hours base on ON/off status How I can use the...
Replies
5
Views
2,414
Hello all, I love programming PLC's and am very thankful for my job. That being said, I am finding is impossible to work 40 hours per week in...
Replies
68
Views
22,940
Hi, I'm experienced in Studio 5000 / ControlLogix but have a small project to do in a Micro810 with CCW and something is driving me nuts. I want...
Replies
14
Views
4,023
Hi, Sorry for my bad English The 400C show 037:Battery low so we power off the drive then we pull out the battery and found the new one. After 5...
Replies
2
Views
1,241
I am using v31 of studio5000 i created a UDT for years months days hours minutes seconds and micro seconds all DINTS like i always do to pull in...
Replies
5
Views
3,064
Back
Top Bottom