You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 21st, 2018, 05:17 PM   #1
matt303
Member
New Zealand

matt303 is offline
 
Join Date: Jun 2016
Location: auckland
Posts: 11
micro800 time/timestamps components and countdown timer

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
  Reply With Quote
Old January 21st, 2018, 06:31 PM   #2
Jeev
Member
Australia

Jeev is offline
 
Jeev's Avatar
 
Join Date: May 2008
Location: Brisbane
Posts: 433
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.
  Reply With Quote
Old January 21st, 2018, 06:39 PM   #3
matt303
Member
New Zealand

matt303 is offline
 
Join Date: Jun 2016
Location: auckland
Posts: 11
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
  Reply With Quote
Old January 21st, 2018, 07:40 PM   #4
Jeev
Member
Australia

Jeev is offline
 
Jeev's Avatar
 
Join Date: May 2008
Location: Brisbane
Posts: 433
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 by Jeev; January 21st, 2018 at 07:43 PM.
  Reply With Quote
Old January 21st, 2018, 10:05 PM   #5
matt303
Member
New Zealand

matt303 is offline
 
Join Date: Jun 2016
Location: auckland
Posts: 11
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?
  Reply With Quote
Old January 21st, 2018, 10:55 PM   #6
Jeev
Member
Australia

Jeev is offline
 
Jeev's Avatar
 
Join Date: May 2008
Location: Brisbane
Posts: 433
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.
  Reply With Quote
Old January 22nd, 2018, 07:26 AM   #7
damica1
Member
United States

damica1 is offline
 
Join Date: Aug 2015
Location: Illinois
Posts: 470
Go to their support page http://search.rockwellautomation.com...navs=+Micro800

And download their "Dint to Time" and the "Time to Dint" function blocks. That is what you are looking for.
__________________
David M. Camp

Marshall Electric / https://mei-tech.com/monitor-and-control

Please Download from our download section "Monitor and Control" .pdf.
  Reply With Quote
Old January 22nd, 2018, 04:25 PM   #8
Jeev
Member
Australia

Jeev is offline
 
Jeev's Avatar
 
Join Date: May 2008
Location: Brisbane
Posts: 433
ANY_TO_DINT is what I was looking for before, and couldn't find it. Disregard basically everything I posted above.
  Reply With Quote
Old January 22nd, 2018, 04:56 PM   #9
matt303
Member
New Zealand

matt303 is offline
 
Join Date: Jun 2016
Location: auckland
Posts: 11
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
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:24 AM.


.