Event Scheduler


 

I am having trouble getting this working on a RMC3.

I have schedule.dat uploaded to \\NVRAM\\Schedule.dat and a serial send to send that to the Event Scheduler.

I have this in the file:

1,Curtains Open,2,15,-XXXXX-,--XXXXXXXX--,0
2,Curtain Close,3,-30,XXXXXXX,XXXXXXXXXXXX,0
3,Lights,1,245,XXXXXXX,XXXXXXXXXXXX,0

But it is not driving any of the items.

Does the module get the time from the system?  I have checked th system time is correct or does it need the Astronomical Clock included?


 
Змінено

I only have the following populated in the Event Scheduler to test: (The times from Astronomical Clock)

Enabled
Filename
Morning Hour
Morning Minute
Night Hour
Night Minute
Event 3 Due

Does it need more than this as a base.


 

You might want to add Edit_Next_Event, Edit_Prev_Event, Edit_Event_Name & Edit_Event_Time to see if it is actually loading the file.

On the processor my file is located in the NVRAM Disk, in a folder that is the same name as the program id tag.
In the program I am using \\NVRAM\\Scheduler.txt

My file looks very similar to yours.
1,Maddie Weekday Disable,1,600,XXXXX--,XXXXXXXXXXXX
2,Maddie Weekday Enable,1,360,XXXXX--,XXXXXXXXXXXX


 

OK thanks, will try that,

I did notice that I do not have a folder in NVRAM the same as the Program tag so loaded into the root NVRAM.  Would this folder normally be created automatically.


 

The only time it is auto created is if the program tries to write a file to that nvram


 

I have added a Folder under the NVRAM folder to be NVRAM/Lighting/ and put theSchedule.dat file there.

Still nothing.


 

I believe the first line of the scheduler needs to be:
#2

Here is one from a working project:
#2
1,System On,0,420,XXXXXXX,XXXXXXXXXXXX,0
2,System Off,1,420,XXXXXXX,XXXXXXXXXXXX,0


On Wed, Mar 13, 2024 at 10:10 AM Adam <adamfeare@...> wrote:
I am having trouble getting this working on a RMC3.

I have schedule.dat uploaded to &#92;&#92;NVRAM&#92;&#92;Schedule.dat and a serial send to send that to the Event Scheduler.

I have this in the file:

1,Curtains Open,2,15,-XXXXX-,--XXXXXXXX--,0
2,Curtain Close,3,-30,XXXXXXX,XXXXXXXXXXXX,0
3,Lights,1,245,XXXXXXX,XXXXXXXXXXXX,0

But it is not driving any of the items.

Does the module get the time from the system?  I have checked th system time is correct or does it need the Astronomical Clock included?


 

I have seen comments about the editor causing a problem, I am using notepad to create the file.

It looks like it is not loading the txt file.

I recall some time ago issue with the RMC, when it doesnt have the licence for the 10nprograms, wonder if that is it.


 

Hi Adam,

I haven't used the event schedule in quite some time but I saw the earlier email that you were placing the file in the root nvram directory.  I believe you need to manually create the folder for the program slot where the scheduler code is running and place the file in there.  As one of the other posters said, the folder won't be automatically created unless the code running in that program slot tries to create a file.  However, I believe that is where the scheduler will look for its data file so you have to manually create the folder and place the file there.

Hope this helps

Jay

On 3/13/2024 2:58 PM, Adam wrote:

I have seen comments about the editor causing a problem, I am using notepad to create the file.

It looks like it is not loading the txt file.

I recall some time ago issue with the RMC, when it doesnt have the licence for the 10nprograms, wonder if that is it.


 

Thanks Jay

The Event Scheduler code is not under the NVRAM folder but under the Program01 folder itself.  Also tried putting the file there and pointing the Serial Send to that but no luck!


 

Hmm.  On my CP4 I have some of my code driven by data files that I place in NVRAM on the processor.  Those files are not in folders named Program01, Program02, etc. but in a folder with the name of the associated Program ID Tag.  So, my text files are in folders named AV, HVAC, etc.  Now it could be that your Program ID Tags are named Program01, etc. but I just wanted to throw this out there in case.

Thanks

Jay

On 3/13/2024 3:22 PM, Adam wrote:

Thanks Jay

The Event Scheduler code is not under the NVRAM folder but under the Program01 folder itself.  Also tried putting the file there and pointing the Serial Send to that but no luck!


 

I have now done the following:

OK, so trying to make this work I have:

Created a new folder in the \NVRAM folder named Main using Fliezilla and transferred the Lighting.txt  text file to that folder.

Changed program tag to Main in the program, saved and recompiled.

Used &#92;&#92;NVRAM&#92;&#92;Lighting.txt in the Serial Send and set using 1 and also manually in Debugger.

Toggled The Scheduler On and Off using panel.

It still looks like the events are not firing.


 

Last though, could it be due to the fact that most of the symbols are commented out in Scheduler as I am testing it  and only need the events firing for now and none of the adjustment parameters.


 

I cannot get this to work either. The module 'EventSchduler 2 v1.2.0(cm)' has no MSP related to file path serial input so the S+ tries to open a path called '*'. 
I opened the CMC module and exposed the 'Read_Error' and 'Write_Error' S+ outputs. Also added the aforementioned MSP.  
 
Can now get the file to read without error. However, the 6 events are not actually read. 
I did add the \x0d\x0a to the end of each line in the text file since the S+ is using that as end of line delimiter. (I know, I should  not need to do this. Just grabbing at straws since every part of this has failed) 
 
Looks like the file operation will start but the file data is not actually read into the scheduler. 
My schedule.dat contains the following: 
 
1,Wake Up,0,450,-XXXXX-,XXXXXXXXXXXX,0\x0D\x0A
2,Goodnight,1,660,-XXXXX-,XXXXXXXXXXXX,0\x0D\x0A
3,Sprinklers On,3,240,-X-X-X-,---XXXXXX---,0\x0D\x0A
4,Sprinklers Off,3,280,-X-X-X-,---XXXXXX---,0\x0D\x0A
5,Vacation,1,360,XXXXXXX,XXXXXXXXXXXX,1,R\x0D\x0A
6,Maintenance,0,180,------X,XXXXXXXXXXXX,0,H\x0D\x0A
 
 
Has anyone been able to get this to work? I am behind the 8 ball and do not have time to write a scheduler from scratch. 
 
Thanks for any insight on this. 
 
Tray
 
 


 

Make sure you put a #2 at the top of the file, and put it into NVRAM\Main\Lighting.txt
 
Mine looks like:
 
#2
1,Wake Up,0,450,-XXXXX-,XXXXXXXXXXXX
2,Goodnight,1,660,-XXXXX-,XXXXXXXXXXXX
3,Sprinklers On,3,240,-X-X-X-,---XXXXXX---,0
4,Sprinklers Off,3,280,-X-X-X-,---XXXXXX---,0
5,Vacation,1,360,xxxxxxx,xxxxxxxxxxxx,1,R
6,Maintenance,0,180,------x,xxxxxxxxxxxx,0,H
 
 


 

Here's the first three lines from mine:
1,Night Temp Setback,0,119,XXXXXXX,XXXXXXXXXXXX,0,,05172020:015627,
2,Weekday Temp Normal,0,405,-XXXXX-,XXXXXXXXXXXX,0,,12242019:192720,
3,Weekend Temp Normal,0,390,X-----X,XXXXXXXXXXXX,0,,09272011:232846,
 
It's also necessary to have a return at the end of the last line or it won't work, just hit return and leave the line blank and save it.
Mine lives in NVRAM Disc>Main. That's driven with a serial send on a MSP as \\NVRAM\\scheduler.dat.
 
FWIW it's hella easier to throw a page on a panel to adjust the times instead of dragging the file back and forth. I have a setup xpanel executable I keep on my computer that's over 20 years old at this point that takes care of that and some other setup stuff. It's been modified heavily over the years but the timer page is still chugging along. 
 


 

Was going to add as well you need to have a return at the end of the last item in the list or else it doesnt work. Have been using scheduler in every project and works fine.