"Day of the Week" Sample Code

CAAJ

Member
Join Date
Dec 2014
Location
Fairhaven, Ma
Posts
47
Hello All,

I have been trying to refer to the "Day of the Week" Sample code that came with my rslogix 5000 package, however I am receiving an error message stating that I am unable to open the file because the file is not formatted for a specific processor. Is there a way I can bypass this error to just view the code? Or does anyone out there have a pdf of this code?

Any help would be much appreciated!

:D

CAAJ
 
Yeah, leaving the sample code as controllogix processors was a bit of a mistake I feel by Rockwell. Yet, since 2008, their knowledgebase has said "Tough luck! Either upgrade, or get someone with ControlLogix support to convert the file for you."
 
I believe I am using the lite version of RSlogix 5000.

CAAJ

I believe widelto was referring to the Software Version Number of your RSLogix software.

Perhaps Lite doesn't install the "Samples", but on my PC there is a folder for all the software versions of RSLogix5000 that I have installed (see the picture). The DayOfWeek.ACD sample appeared from V13 onwards.

What version software are you using ?

ADDEDNDUM : It looks like you are trying to open "DayOfTheWeek.ACD", which is an Add-On Instruction sample. That ACD file was specifically written for V19 of RSLogix5000. If you look in your "Samples" folder, under the installed version number, you will find "DayOfWeek.ACD". That should open with your software.

2016-11-07_141030.jpg
 
Last edited:
Yeah, leaving the sample code as controllogix processors was a bit of a mistake I feel by Rockwell. Yet, since 2008, their knowledgebase has said "Tough luck! Either upgrade, or get someone with ControlLogix support to convert the file for you."

It shouldn't matter.... If you open a sample ACD that was not written for your processor model, you can simply change it in the Controller Properties, and then you can download it.
 
I am using V19.01.00 (CPR 9 SR 3).

I've attached an image of the message below.

I've tried changing the controller properties but I can not find the required processor for the file.

CAAJ

error.jpg
 
Last edited:
Lite only supports CompactLogix, so when you open the DayOfWeek.ACD file, it says "controller not supported" and doesn't open, nor give you an opportunity to change the controller type. If you had RSLogix 5K Pro, you could change it to CompactLogix.
 
Lite only supports CompactLogix, so when you open the DayOfWeek.ACD file, it says "controller not supported" and doesn't open, nor give you an opportunity to change the controller type. If you had RSLogix 5K Pro, you could change it to CompactLogix.

Is there any other way to see this, maybe a pdf?

CAAJ
 
This is the code that I use. It is a simplified version of Zellers formula. The I use the last two lines to automatically change the time when Daylight Saving Time begins and ends.
Zeller is a UDT of some Dints. Day of week is 0=Sunday, 6=Saturday.

GSV(WallClockTime,,LocalDateTime,DateTimeAct[0]);
MOV(DateTimeAct[2],Zeller.q)MOV(DateTimeAct[1],Zeller.m)MOD(DateTimeAct[0],100,Zeller.K)DIV(DateTimeAct[0],100,Zeller.J);
LES(DateTimeAct[1],3)ADD(DateTimeAct[1],12,Zeller.m)CPT(Zeller.K,(DateTimeAct[0]-1)MOD 100)CPT(Zeller.J,(DateTimeAct[0]-1)/100);
CPT(Zeller.DayofWeek,(Zeller.q+(13*(Zeller.m+1)/5)+Zeller.K+(Zeller.K/4)+(Zeller.J/4)-(2*Zeller.J)+6)MOD 7);
EQU(DateTimeAct[1],3)GEQ(DateTimeAct[2],8)LEQ(DateTimeAct[2],14)EQU(DateTimeAct[3],2)EQU(Zeller.DayofWeek,0)MOV(1,ApplyDST)SSV(WallClockTime,,ApplyDST,ApplyDST)GSV(WallClockTime,,LocalDateTime,DateTimeAct[0]);
EQU(DateTimeAct[1],11)LEQ(DateTimeAct[2],7)LEQ(DateTimeAct[3],2)EQU(Zeller.DayofWeek,0)CLR(ApplyDST)SSV(WallClockTime,,ApplyDST,ApplyDST)GSV(WallClockTime,,LocalDateTime,DateTimeAct[0]);
 
The Mosquito Station Sample Code located at Projects\Samples\ENU\v19\Rockwell Automation\PlantPAx\3_MosquitoStation\Project has a T_Clock AOI that calculates day of week, and is a 1769-L32E controller.
 
Lite only supports CompactLogix, so when you open the DayOfWeek.ACD file, it says "controller not supported" and doesn't open, nor give you an opportunity to change the controller type. If you had RSLogix 5K Pro, you could change it to CompactLogix.

Ahhh, something I had completely forgotten, never having to use Lite - ever ...

CAAJ - if you tell me your CompactLogix model, I can convert both files so you can open in V19 RSLogix5000 Lite. I rather think the AOI version will be more useful.....

I doubt I'll be breaking any copyrights, as they have put it "out there", with disclaimers on "suitability for use" etc.
 
The Mosquito Station Sample Code located at Projects\Samples\ENU\v19\Rockwell Automation\PlantPAx\3_MosquitoStation\Project has a T_Clock AOI that calculates day of week, and is a 1769-L32E controller.

Strange, mine opens as Emulator, V16

2016-11-07_174243.jpg
 
Ahhh, something I had completely forgotten, never having to use Lite - ever ...

CAAJ - if you tell me your CompactLogix model, I can convert both files so you can open in V19 RSLogix5000 Lite. I rather think the AOI version will be more useful.....

I doubt I'll be breaking any copyrights, as they have put it "out there", with disclaimers on "suitability for use" etc.


That would be great! I am utilizing a 1769-L32E.

Thank you for your help!

CAAJ
 

Similar Topics

I am looking for a sample program or user defined block for connected components workbench to be able to set and view timers for an output to be...
Replies
6
Views
2,570
Hi All, I'd like to know can we use DTR instruction to get a week pulse ? Could anyone please help me to understand that one ? I've managed to...
Replies
4
Views
180
The day of week program started changing day of week 2 hours early. It changes at 10 P.M. instead of 12A.M. Just started this year.
Replies
22
Views
2,665
For some reason that I do not understand, FactoryTalk is showing the Day of Week in the time and date display, despite the fact that this isn't an...
Replies
5
Views
1,224
This is the reason why I signed up here and decided to get some help before I tackle the traffic light program on Wednesday. It looked good on...
Replies
17
Views
11,694
Back
Top Bottom