Allen Bradley Compact Logic Clock

Join Date
Jun 2020
Location
Tennessee
Posts
2
Hello everyone I have an Allen Bradley Compact Logix
1769-L18ER-BB1B.
I have several processes that I would like to start based on time of day.
Is there a way that I can use the device's internal clock to turn bits on and off?
 
Hello and welcome to the forum. The function GSV (Get System Value), with attribute "Class Name" selected for WallClockTime, and "Attribute Name" LocalDateTime will give your program the value of the internal clock.
 
Read up on the WALLCLOCK object in the Help system. It will explain how the clock data is arranged and what type of tags you must use to store the clock values when you program the GSV. Hint, 7 DINT tags.

OG
 
You can also straight up copy WALLCLOCK into the new LINT datatype. This let's you use a combination of MVM and LIM instructions with start and end times as triggers.
 
The "LocalDateTime" data returned by a GSV is the time adjusted for daylight savings time. It advances the time by the number of minutes you program into the attribute "DSTAdjustment" and by SSV'ing that to the WallClock.

BUT ! Daylight Savings Time is NOT automatically applied, you will have to write code to do it. I already developed this code which might be useful to you, but you may need to adapt it to your locale and rules. Please ask and I'll share if you want it.

One of the issues is if the controller is switched off during the DST transtions, which I have addressed in my method.

Here in the UK we go forward 1 hour (60 in DSTAdjustment) on the last Sunday in March at 0100 hrs. And we put the clocks back to GMT on the last Sunday in October, at 0200 hrs.

Other countries observe different rules, which makes it a nightmare for system suppliers shipping to different geographic locations ...

There is a fantastic Wiki article on DST all around the world ....
 
Hello everyone I have an Allen Bradley Compact Logix
1769-L18ER-BB1B.
I have several processes that I would like to start based on time of day.
Is there a way that I can use the device's internal clock to turn bits on and off?

How are you controlling time drift?

I've seen a few solutions but none that were 100% rock solid and then add daylight savings.
 
AB has a free download that will keep your PLC clocks synced. Needs to run on a PC or server on the network. It also works with RSLinx Lite version so basically all free, which is amazing for AB.

If no network then you can use an HMI to allow someone to update the clock. Then you would use the SSV to update it.


They also have a free sample code that has a lot of nice AOI functions that use the PLC clock format, like LIM GRT GEQ EQU etc. Just go the the sample code lib and type 'time' and you will find it.
 
AB has a free download that will keep your PLC clocks synced. Needs to run on a PC or server on the network. It also works with RSLinx Lite version so basically all free, which is amazing for AB.

Are you sure it doesn't just pull up a gateway/pro license from the server? I'm not ab100% if it's free.
 
AB has a free download that will keep your PLC clocks synced. Needs to run on a PC or server on the network. It also works with RSLinx Lite version so basically all free, which is amazing for AB.

If no network then you can use an HMI to allow someone to update the clock. Then you would use the SSV to update it.

You are correct I have the software running on a random computer on the network.

But its not ideal, and like you said no network update from HMI. I generally avoid this because I'd rather the HMI get its time from the PLC.

I've read about using the grandmaster but haven't seen it implemented successfully anywhere, or the 1756-time module.

It would just be nice to have Rockwell be able to look for NTP server.
 

Similar Topics

I was wanting to see if anyone had any information on setting up a cub5 meter and getting the data to a Allen bradley PLC. I think i have the set...
Replies
0
Views
110
We have an AB PLC that has a faulty expansion cable between Bank 1 and Bank 2. Part # 1769-CRR3. I found a small burn mark on the board. Being...
Replies
1
Views
749
I have two L35e processors i want to send message to and from. I just want to do data read. Condition from one plc and see it on another plc. I...
Replies
5
Views
2,184
Above mentioned HMI is installed in my plant with Micrologix PLC. Yesterday the HMI suddenly stopped working during plant operation and HMI's...
Replies
3
Views
4,865
Here we have a machine that is running with AB LM35 compact logix PLC communicating the SEImens micro master 430 drives using profibus protocol.As...
Replies
0
Views
2,046
Back
Top Bottom