micro800 time/timestamps components and countdown timer

matt303

Member
Join Date
Jun 2016
Location
auckland
Posts
19
Hi guys,

Thought I might ask here if anyone knows, currently have tech support looking for a solution.

I have a micro820 and wanting to extract the time components from the time format data type. So basically if I have t#hh:mm:ss:ms etc I would like to store hh or mm into different variables to be used through out program for calculations and display back to scada/hmi or put them all into an array and read the hh or mm from the array. Im basically making a countdown timer to display onto hmi for setting irragation pump run times and display the time counting down to 0. There seems to be not much much information on the net for the micro800 range.

Cheers,
Matthew
 
Are you using the RTC_READ instruction? If so each of the members in the RTCData type should be presented as UINTs. You can move the UINTs into your variables, or into your arrays, and use them as you see fit.
 
I'm not using the rtc, I'm using a rto timer and would like to take the components from the elapsed time etc this time is set from the hmi and need to display it back in separate values
 
I just had a play around in CCW, and it doesn't look like you can turn time back into anything useful. What sort of scale are you looking at for these events? Seconds? Minutes? Hours? Days? It might be worthwhile to make your own RTO_DINT function block, so you have something usable.

*EDIT: Or you may have to use the RTC and some maths. Might be an idea to use the RTC, and actually make a FB for event timing/countdown. That way you can customise it to have exactly what you want.
 
Last edited:
maximum at this stage will be 24 hours. I was thinking the same, making a udfb. I was thinking of using 3 count down counters for hh mm ss as the scada sends the timestamp over a 32bit real value in seconds and just converting this to hh:mm:ss and put into preset of counters and use rto timer every 1000ms to repeat, either subtract preset if possible or reset timer and activate seconds counter, this way I can display the cv of the counter back onto scada. I was thinking this could get messy and inaccurate, would you have a better solution or way to work this out?
 
To be honest, making your own FB might be the neatest solution anyway. Just aggregate the HH:MM:SS on your HMI/SCADA. If you are counting a large number of events, you can make an array for each HH/MM/SS, and address it by the event, so your HMI would use EventHH[0]:EventMM[0]:EventSS[0] for the first event and so on.
 
ANY_TO_DINT is what I was looking for before, and couldn't find it. Disregard basically everything I posted above. šŸ™ƒ
 
Perfect that's exactly what I needed. NHP came back saying it can't be done. I had made my own udfb but this is alot better. Thanks a lot for your help damica1 and Jeev
 

Similar Topics

My company built a small test machine using a Micro800 PLC and CCW software. We chose the Micro800 because the machine is very simple. We are...
Replies
2
Views
116
Hi, Is there a way to set the IP of a micro dynamically, based on a variable value.?
Replies
0
Views
148
Anyone use the newer 2080-L50E or L70E with 1734 Point IO yet? I have a customer asking for a setup and I have not found anyone that has done...
Replies
0
Views
354
Is there a way to download the program to a Rockwell Micro810 without using the Rockwell CCW application?
Replies
5
Views
706
Hi All, I am having trouble converting a real to string and keep it to 2 decimal places. I'm sure its a simple solution. Any help is appreciated
Replies
2
Views
250
Back
Top Bottom