![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Jun 2020
Location: Tennessee
Posts: 2
|
Allen Bradley Compact Logic Clock
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? |
![]() |
![]() |
#2 |
Lifetime Supporting Member
![]() ![]() Join Date: Feb 2015
Location: Yokohama
Posts: 545
|
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.
|
![]() |
![]() |
#3 |
Member
|
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
__________________
I despise when people take random quotes and ascribe them to me - Julius Caesar |
![]() |
![]() |
#4 |
Member
|
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.
__________________
Ask not what your PLC can do for you, ask what you can do for your PLC. ![]() |
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Mar 2010
Location: casablanca
Posts: 590
|
Reading the ControlLogix System Time in Ladder Logic:
http://www.contactandcoil.com/automa...-ladder-logic/
__________________
“A bird sitting on a tree is never afraid of the branch breaking, because her trust is not on the branch but on it’s own wings. Always believe in yourself” |
![]() |
![]() |
#6 |
Lifetime Supporting Member + Moderator
|
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 ....
__________________
___________________________ ![]() abtrain@tiscali.co.uk www.abtrain.co.uk tel: 07506 73 9999 Everything works with smoke. Let it out, and it stops working. Nil Carborundem Illegitimi |
![]() |
![]() |
#7 | |
Member
![]() ![]() Join Date: Apr 2012
Location: Wa
Posts: 423
|
Quote:
I've seen a few solutions but none that were 100% rock solid and then add daylight savings. |
|
![]() |
![]() |
#8 |
Supporting Member
![]() ![]() Join Date: Apr 2009
Location: Kalieefornia
Posts: 875
|
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.
__________________
I have to use Rockwell |
![]() |
![]() |
#9 |
Member
|
Are you sure it doesn't just pull up a gateway/pro license from the server? I'm not ab100% if it's free.
__________________
Ask not what your PLC can do for you, ask what you can do for your PLC. ![]() |
![]() |
![]() |
#10 | |
Member
![]() ![]() Join Date: Apr 2012
Location: Wa
Posts: 423
|
Quote:
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. |
|
![]() |
![]() |
Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Allen Bradley ToolKit | Santosh89 | LIVE PLC Questions And Answers | 7 | November 19th, 2019 10:34 AM |
Allen Bradley Free running counter or clock - CST - and time synchronization | V0N_hydro | LIVE PLC Questions And Answers | 7 | August 15th, 2019 12:18 PM |
Allen bradley Compact logix L35E message to L35E | Brizzle | LIVE PLC Questions And Answers | 5 | February 4th, 2019 09:23 PM |
Allen Bradley Compact Logix need help | Snipy | LIVE PLC Questions And Answers | 17 | July 19th, 2012 10:44 AM |
Allen Bradley HMI | Chopperman | LIVE PLC Questions And Answers | 13 | June 7th, 2012 08:35 AM |