Red Lion G304K clock sync with 5/05

OkiePC

Lifetime Supporting Member
Join Date
Mar 2005
Location
ENE of Nowhere Oklahoma
Posts
11,762
Okay, I have my new program almost completed, tested comms (DH485 to SLC 5/05 Ch0), and have data going back and forth.

I have some bit triggered alarms for which I basically just dropped in an alarm ticker, and set the alarm property of some tags to "active on". I also added an alarm list page, and it left it at the default settings.

When I was testing comms, I noticed that there were three alarms in the list, and the time was based on the G304K clock which was not set.

I need to force the G3 clock to sync with the PLC time/date. I went ahead and added data tags for the SLC year, month, day, hour, minute, and second status registers, but I have not figured out how to get the G3 clock set to match those.

EDIT: Also, the alarm text came up "Untitled Event". The balloon pop-up help for the event name said "...If you do not enter any text, the system will choose a default label based upon the display name and the on/off text." What is the display name? I thought it would use the Tag Data Label, but apparently is is looking for something else.

I might have to break down and actually do some typing in these fields, while everything else about this software has been pretty much import, drag drop, copy, "smart duplicate" etc., so far. I am very pleased with C3 and the little Red Lion HMI so far.

Thanks in advance,
Paul
 
Last edited:
Okay, I have my new program almost completed, tested comms (DH485 to SLC 5/05 Ch0), and have data going back and forth.

I have some bit triggered alarms for which I basically just dropped in an alarm ticker, and set the alarm property of some tags to "active on". I also added an alarm list page, and it left it at the default settings.

When I was testing comms, I noticed that there were three alarms in the list, and the time was based on the G304K clock which was not set.

I need to force the G3 clock to sync with the PLC time/date. I went ahead and added data tags for the SLC year, month, day, hour, minute, and second status registers, but I have not figured out how to get the G3 clock set to match those.

EDIT: Also, the alarm text came up "Untitled Event". The balloon pop-up help for the event name said "...If you do not enter any text, the system will choose a default label based upon the display name and the on/off text." What is the display name? I thought it would use the Tag Data Label, but apparently is is looking for something else.

I might have to break down and actually do some typing in these fields, while everything else about this software has been pretty much import, drag drop, copy, "smart duplicate" etc., so far. I am very pleased with C3 and the little Red Lion HMI so far.

Thanks in advance,
Paul

To set the time, use the SetNow() function.

You might want to use something like SetNow(Date(Y, M, D) + Time(h, m, s)) using the Year, Month, Day, Hour, Minute, Second from your PLC. You can get fancier by comparing the Date/Time in the Display to the PLC and setting it when they get out by more than a minute or 15 seconds.

Someone from Redlion will probably be on soon to give you other suggestions.
 
Okay. I now have a program based on your suggestion, called "Set_Clock", and it verifies okay.

So, I have decided that I want to sync the clock every morning at 3 a.m.

Can I just set up a trigger on my tag "TagsPLC1.YEAR"?

That seems like it would work...but I have a question about the Trigger Modes. If I pick "Data Match" is the action going to occur every repeatedly as long as the hour is equal to the value?

I only want it to execute once, so I need an edge trigger, but I am not sure which trigger mode choice might acheive that...

Also, I would like to be able to call this progrm each time the panel is restarted following a power outage, or program download...

Thanks for your help.
Paul
 
Okay. I now have a program based on your suggestion, called "Set_Clock", and it verifies okay.

So, I have decided that I want to sync the clock every morning at 3 a.m.

Can I just set up a trigger on my tag "TagsPLC1.YEAR"?

That seems like it would work...but I have a question about the Trigger Modes. If I pick "Data Match" is the action going to occur every repeatedly as long as the hour is equal to the value?

I only want it to execute once, so I need an edge trigger, but I am not sure which trigger mode choice might acheive that...

Also, I would like to be able to call this progrm each time the panel is restarted following a power outage, or program download...

Thanks for your help.
Paul

Create an OnStartup() program to call it after a power outage or C3 program download.

I'll get back to you on the othr question in a bit.
 
Okay. I now have a program based on your suggestion, called "Set_Clock", and it verifies okay.

So, I have decided that I want to sync the clock every morning at 3 a.m.

Can I just set up a trigger on my tag "TagsPLC1.YEAR"?

That seems like it would work...but I have a question about the Trigger Modes. If I pick "Data Match" is the action going to occur every repeatedly as long as the hour is equal to the value?

I only want it to execute once, so I need an edge trigger, but I am not sure which trigger mode choice might acheive that...

Also, I would like to be able to call this progrm each time the panel is restarted following a power outage, or program download...

Thanks for your help.
Paul


There's probably a better way, but you could create a Data Match Trigger Program for 3 (AM) and in the program check to seen if the TagsPLC1.MINUTE = 0 and TagsPLC1.SECOND <= 2. If it is, you could run the SetTime Program. I suggested <= 2 so that you can be sure it will run but wouldn't run too many times.
 
There's probably a better way, but you could create a Data Match Trigger Program for 3 (AM) and in the program check to seen if the TagsPLC1.MINUTE = 0 and TagsPLC1.SECOND <= 2. If it is, you could run the SetTime Program. I suggested <= 2 so that you can be sure it will run but wouldn't run too many times.


An even simpler solution would be to create a bit in the PLC that is on for 1 second (might have to play with the time a little) at 03:00:00. Create a C3 tag that monitors that bit and when it triggers ON, run your Set_Time() program.
 

Similar Topics

Hai, I am newbie to PLC world. I bought a Red Lion G304K model(only 1serial port). I have installed crimson 3 software. I did not find "HMI...
Replies
3
Views
2,442
I am having a problem with downloading to the G304K. I am getting an error messager that reads "No acknowlege from target device". I know that Red...
Replies
2
Views
1,821
I got an sk000 hooked between my serial port (com 4) and an Allen Bradley 1100 and a G304K. When I try to download from Crimson 3 (Send)to a G304K...
Replies
10
Views
3,322
I am trying to communicate between a G304K and a ML 1400. I have the cable to send my program to the G304 but I was told the cable to communicate...
Replies
12
Views
7,843
Hello, I am using a red lion G304K HMI and a STM24QF-3AN stepper motor + drive from applied motion. I am using the applied motion SCL driver for...
Replies
0
Views
3,833
Back
Top Bottom