Forums.MrPLC.com: RSLogix 5000 Wall Clock - Forums.MrPLC.com

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

RSLogix 5000 Wall Clock How do you use the wall clock? Rate Topic: -----

#1
User is offline   Jeremiah 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 39
  • Joined: 02-March 07
  • Country:United States
    United States
I need to reset a group of RTO's at 6AM every morning. I have never used the free running clock in RSLogix 5000 and can't seem to find it anywhere. How would I go about doing so? Your help is appreciated. Thanks in advance.

JS
0

#2
User is offline   Ron Beaufort 

  • Guru
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 813
  • Joined: 07-August 02
  • Location:Charleston, SC
  • Country:United States
    United States
use a GSV (Get System Value) instruction to retrieve the wallclock time from the processor - and put the values for Year, Month, etc. into a DINT[7] array that you've created for the purpose ... once you've got the data stored in the array, then you can use EQU (Equal) and other comparison instructions to trigger different actions ...

Best regards,
Ron
PLC Training Boot Camp

I once was lost, but now am found, was blind, but now I see.
0

#3
User is offline   TConnolly 

  • Guru
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 934
  • Joined: 06-May 05
  • Gender:Male
  • Location:Salt Lake City
  • Country:United States
    United States
Controller scoped tag: Date_Time DINT[7] *Dint array where date and time is to be stored
Date_Time[0] is the year
Date_Time[1] is the month
Date_Time[2] is the day
Date_Time[3] is the hour (24 hour format)
Date_Time[4] is the minute
Date_Time[5] is the second
Date_Time[6] is microseconds.



Controller scoped tag: One_Shots Bool[64] *array for one shot status bits

Controller scoped tag: Reset_All Bool *boolean used elsewhere to reset timers

In Logix5K V16 or later use:
GSV WALLCLOCKTIME ? LocalDateTime Date_Time[0]

In Logix5K version 15.x or earlier, use
GSV WALLCLOCKTIME ? DateTime Date_Time[0]

EQU Date_Time[3] 6 EQU Date_Time[4] 0 ONS OneShots[63] OTE Reset_All.

I recommend using a periodic task since its not necessary to execute this code continuously.

0

#4
User is offline   BobLfoot 

  • The Wizard
  • Group: MrPLC Admin
  • Posts: 3,152
  • Joined: 27-March 06
  • Gender:Male
  • Location:Southern Indiana
  • Country:United States
    United States

View PostAlaric, on Jul 16 2008, 12:05 PM, said:

I recommend using a periodic task since its not necessary to execute this code continuously.


Excellent Suggestion Alaric!!!

Not everyone has looked this up but GSV and SSV instructions are real scan time hogs compared to XIC, OTE and even COP, CPS instructions.

I never thought of using a periodic task for WallClock maintenance before and I think it makes great sense.
BobLfoot

"Poor Planning on your part does not a crisis on my part make"
0

#5
User is offline   TConnolly 

  • Guru
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 934
  • Joined: 06-May 05
  • Gender:Male
  • Location:Salt Lake City
  • Country:United States
    United States

View PostBobLfoot, on Jul 17 2008, 09:10 AM, said:

[quote name='Alaric' post='71601' date='Jul
I never thought of using a periodic task for WallClock maintenance before and I think it makes great sense.


Bob, you may be interested in something I saw two weeks ago about the continuous task at one of Rockwell's Automation On the Move events (mini Automation Fair).

The class instructor opened the continuous task and monitored the program scan time which was running between 3 and 4 milliseconds for the demonstration program. In this PLC the only task was the continuous task. The continuous task time slices with all of the PLC housekeeping, communication servicing, etc. He put the PLC in program mode, switched the task to periodic at 10 msec and put it back into run mode. Now the program completed a scan in about 0.7 milliseconds. Then he changed the task period to 2 msec. So now the program was being executed nearly twice in the same time that it ran just once before.

So today I had some time while waiting for Bubba and Cletus to complete some mechanical work on a startup and I did the same thing. This PLC has 8 tasks including the continuous task and all 7 periodic tasks have a higher priority than the continuous task, but I still dropped the max scan time from 3.2 mSec to 1.2 mSec. I actually changed the task back to continuous because there are a couple dozen similar machines, but it was an interesting exercise.

0

#6
User is offline   protiusmime 

  • Newbie
  • PipPip
  • Group: MrPLC Member
  • Posts: 6
  • Joined: 21-June 08
  • Country:United States
    United States

View PostJeremiah, on Jul 15 2008, 12:29 PM, said:

I need to reset a group of RTO's at 6AM every morning. I have never used the free running clock in RSLogix 5000 and can't seem to find it anywhere. How would I go about doing so? Your help is appreciated. Thanks in advance.

JS


Excellent approach by Ron, et. al. One additional use that we are doing is to update all PLCs on the highway, comms by the following:

at say 23:50hrs (military standard), MOV the dint array to a tag base range, then MSG date/time tag base to each PLC upon change.. first to an integer array in each, then to the S files. MSG.DN triggers the next MSG send, etc. etc. We also use a day increment counter that is reset >7, so you could use that rollover to update the PLC system clocks. We are using a CTX for the master in this fashion to keep all others in "sync" for production tallies and a bunch of other calc timings.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users