Run an event only on a certain day of week

careed_25

Member
Join Date
Jul 2007
Location
KY
Posts
57
I am needing to know the simplest way to run an event on a certain day of the week every week. This has to happen at the same time every week. I know I could set up a set of timers and counters to accomplish what I want to do but I want to use the GSV instruction if at all possible. I know I can use it to get the exact time but is there a way to determine what day of the week it is MTWRF by using an instruction. I know GSV can access what day of the month and what year. I need to know day of week. Any help would be appreciated.
 
The simple way is to use GSV to retrive the hour from WALLCLOCKTIME. When the hour = 0 (midnight) increment a counter - every day at midnight the day of the week counter increments. Pre-initialize your counter to represent the current day of the week and program it to reset at the beginning of the week.

By constructing some lookup up tables you can create simple algorithims to calculate the day of the week for any given date. See http://en.wikipedia.org/wiki/Calculating_the_day_of_the_week

You can google the terms +calculate +day +week to get dozens of methods of doing it.
 
Last edited:
In V16, there is an AOI that is similar if not the same as the one Kim Gold posted. You can get it from a Rockwell Demo File.
 

Similar Topics

Good Morning everyone, I would like to know if it's possible to configure a event to run when i open up Rsview. Thanks,
Replies
4
Views
1,649
Hi All I want to run a certain application whenever an alarm goes on i'm using RSView SE how do i do that? thanks.
Replies
6
Views
1,843
Hello..I am new to Plc.I have Mitsubishi Melsec Fx3Ga-40MR PLC controlling a machine for packing powder.Currently the Plc has issue which power...
Replies
3
Views
139
I'm looking to get some spare keys for this PLC. Does anyone know a source or have a part number? My searches are turning up nothing at the moment.
Replies
1
Views
76
I have a few questions about Studio5000. 1. Why is my RA folder so big? its well over 100 GB. 2. How do you delete versions or extra files...
Replies
3
Views
276
Back
Top Bottom