Get time from HMI to Micro850, and how to schedule events

MikeBriggs

Member
Join Date
Sep 2022
Location
Dover, NH
Posts
33
I'm using a Micro850 with a Panelview 800, programming in CCW. We'd like the customer to be able to schedule the system to startup at a certain day/time. I know the Micro850 doesn't have a built-in RTC and I could add the RTC plug-in module. But, the PV800 already has an RTC - Can I use that to get a date/time to the PLC?

I can't find much of anything online about using date and time in CCW. I know there are the RTC_Read and RTC_Set commands, but the RTC_Read spits out a data type of RTC, and I don't know what to do with that. I can't convert it to a date and time (Any_to_date can't have RTC data as an input), and if I have a user input anything I don't know how to convert it to RTC, since there is no Any_to_RTC. So what can you DO with the RTC Data that you get from the RTC_Read command? It doesn't seem to be compatible as an input to anything else.

I'd like the user to be able to select a date (month and day) and time through the HMI, and then use that to trigger an event when the date/time from the RTC matches it. But I don't see any possible way to compare anything the user might put in to the data output of the RTC_Read command. Surely I must be missing something?
 
Ok, it looks like the RTC Data type is an array of 7 UINTs, for Year, Month, Day, Hours, Minutes, Seconds, and Day of Week. That helps. So if I have the user enter month, day, hour, and minutes as 4 separate UINTs, then I could just check for when they all equal the corresponding UINTs in the RTC Data type.

Still though - is there any way to just get the current date & time from the PV800 over to the PLC, to avoid the need for the RTC plug-in module?
 
Ok, I think I found how to get the date & time from the PV800's RTC over to the PLC using Global Connections in the Tags section.... this might work.
 
This might help are at least give you some Ideas.

Here is a UDFB (From Rockwell) that allows you to start/stop a "BIT" using a schedular.

Now this is how I sync my time.

I use Maple Systems Hmi and they also have a build in RTC, that can be programmed to update from any "NTP" / "Pool Time servers".
So, program the Hmi to keep it's time updated every 6 hours, them by using a "Macro" I wrote in the HMI that also runs every 6 hours, this Macro with write
the 7 "Dint" values to a RTC Datatype and then just us that Datatype as your RTC parameter.

This will keep your PLC time updated and in sync with the Hmi, and with the Function Block I have attached you should be able schedule any event(process) to
start and stop any time you need.

Hope this helps.
 

Attachments

  • UDFB_TOWEEK.zip
    3.3 KB · Views: 2
Thank you, I'll look into that UDFB and overall approach. I'm not sure if I can have the PanelView HMI update its time from a server though. That UDFB may be really helpful though, thank you!
 
Ok, I have a crude version of it that should work. The PanelView now has a screen showing the current date and time, and spots for the user to enter a month, day, hour, and minutes for the date and time when they want it to turn on (and then press a button to activate the scheduler). The PLC will start the system up when the scheduler is activated and the current month, day, hour, and minutes all match the scheduled values for those. Here's the issue - it would look much more professional if I could have the user select a date with drop down menus, rather than just entering numerical values. Is there any way to make drop-down menus on a PanelView in CCW? I know how to make lists, but those aren't drop-down, the entire list shows up always, which is very cumbersom if you want to have multiple lists on the same screen.
 

Similar Topics

Programming an AB Micro850 PLC with Panelview800, not super experienced with these yet, anyone have a technique they use to have the HMI notify...
Replies
0
Views
150
We have a project coming up which we need to do as cheaply as possible. We have a used 2711P-T6C20D8 HMI. Is it possible to use this with a...
Replies
4
Views
1,685
I'm trying to set up communications between the AB Micro850 and a Delta HMI DOP-107WV. I can get everything working using Modbus TCP. However...
Replies
10
Views
6,285
Good day, I have a little problem with connected a PLC micro 850 Allen Bradley with a HMI C200. Already connected PLC with ethernet cable in my...
Replies
0
Views
1,406
I am using Factory Talk view Machine Edition Runtime HMI. I want to configure on button in such way that when i press this button I want to...
Replies
3
Views
117
Back
Top Bottom