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.

New Here? Please read this important info!!!


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

Reply
 
Thread Tools Display Modes
Old April 7th, 2021, 09:48 PM   #1
brendantiberend
Member
United States

brendantiberend is offline
 
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?
  Reply With Quote
Old April 7th, 2021, 10:31 PM   #2
AlfredoQuintero
Lifetime Supporting Member
Japan

AlfredoQuintero is offline
 
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.
  Reply With Quote
Old April 8th, 2021, 09:05 AM   #3
Operaghost
Member
United States

Operaghost is online now
 
Operaghost's Avatar
 
Join Date: Apr 2002
Location: Dallas, TX USA
Posts: 3,115
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
  Reply With Quote
Old April 8th, 2021, 09:26 AM   #4
PreLC
Member
United States

PreLC is offline
 
PreLC's Avatar
 
Join Date: Apr 2019
Location: Mars
Posts: 337
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.
  Reply With Quote
Old April 8th, 2021, 10:26 AM   #5
tarik1978
Member
Morocco

tarik1978 is offline
 
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”
  Reply With Quote
Old April 8th, 2021, 11:16 AM   #6
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 5,266
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 ....
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
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



  Reply With Quote
Old April 8th, 2021, 03:24 PM   #7
VAN
Member
United States

VAN is offline
 
Join Date: Apr 2012
Location: Wa
Posts: 423
Quote:
Originally Posted by brendantiberend View Post
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.
  Reply With Quote
Old April 8th, 2021, 03:46 PM   #8
JaxGTO
Supporting Member
United States

JaxGTO is offline
 
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 Software!
  Reply With Quote
Old April 8th, 2021, 03:53 PM   #9
PreLC
Member
United States

PreLC is offline
 
PreLC's Avatar
 
Join Date: Apr 2019
Location: Mars
Posts: 337
Quote:
Originally Posted by JaxGTO View Post
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.
__________________
Ask not what your PLC can do for you, ask what you can do for your PLC.
  Reply With Quote
Old April 8th, 2021, 04:09 PM   #10
VAN
Member
United States

VAN is offline
 
Join Date: Apr 2012
Location: Wa
Posts: 423
Quote:
Originally Posted by JaxGTO View Post
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.
  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

Similar Topics
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


All times are GMT -4. The time now is 12:51 PM.


.