ViewStat Scheduler Update!
vining
Posts: 4,368
ViewStat Scheduler Update!
I posted this here so any one w/o access to the "ACE" only areas can use if desired.
Here's an updated version of the scheduler. A few minor modifications were made to debug and a for loop was added when checking for matching "hold" hours because the line wouldn't work w/o it and it was out of the scope of the for loop which was supposed to affect it. There were some minor appearance changes in this and the previous TP file as well.
So here's the complete zip w/ changes. I don't see any bugs in this version and everything appears to be running smoothly. If you use it, enjoy and let me know what you think or if you find any quirks.
I posted this here so any one w/o access to the "ACE" only areas can use if desired.
Here's an updated version of the scheduler. A few minor modifications were made to debug and a for loop was added when checking for matching "hold" hours because the line wouldn't work w/o it and it was out of the scope of the for loop which was supposed to affect it. There were some minor appearance changes in this and the previous TP file as well.
So here's the complete zip w/ changes. I don't see any bugs in this version and everything appears to be running smoothly. If you use it, enjoy and let me know what you think or if you find any quirks.
0
Comments
it says perimeters expected are 9 but 8 found. any ideas?
your schedule pages look great btw.
I neglected to update the .axi. This was the original axi file and I since added the debug variable nVST_Debug to pass to the module which is a module paremeter as defined in the module but wasn't in the axi to be passed. There's a couple other changes in the axi so just scrap the old and use the new.
I've updated the axi in the zip and it should compile fine now. It's just a pain keeping track of these files cuz I have my working folder and the folder I keep this stuff in for posting is sperate. So I updated the TP and the MOD file but not the include.
I'm glad you like the TP page but wait til you get it working, it's pretty intuative, has nice prompts and very user friendly. I may be biased but I think it's pretty cool!
can't wait to try it.
thanks for the post
Values are not written to ram on every save but only upon exiting the scheduler. On save values are stored in the structure, on exit the structure is written to ram.
Attachment Removed!
i did a quick test with this code yesterday and had some issues.
- the down buttons on both heat and cool do not seem to work.
- the stat names don't populate the name fields on the schedule page.
i changed the port from 18 to 5 but that shouldnt have an effect.
any ideas?
Do the buttons work as single pushes or are you having problems w/ the hold & variable repeat timeline?
If it's just the down arrows for heat and cool verify that the channel port number indeed changed to 5 and the channel numbers are both correct. Check the address port for the STAT names as well.
If the only thing you did was change from TP port 18 to 5 the buttons should work especially if the up arrow buttons work. The T-Stat names could be one of two possibilities, first being the address port not being changed properly and the second being the structure fields didn't load.
Open debug and copy the structure name sVSTSTAT from inside the modules code and paste it into the Debug var field and check the structure's fields to see if they were populated on start up with values and defaults. I don't think I tested to see that if the xml file wasn't found on the ram at start up that it would go ahead and load the default initial values (just assumed it would work). So depending the version this may be an issue. If you are using the XML version you have to use to the axi file that's with it.
the up buttons for heat and cool both work fine for push and hold.
the downs do not work at all.
Oh, read my previous post as I edited it while you made your last post.
In short the first time this code is run it was supposed to load defaults values but then I added code to write stored values to ram to make it in a sense persistent and then when the program is uploaded or the system is rebooted again it would read from ram and not load the defaults. I never tested since having the file on ram to see if the default would load on initial start up. So I delete that file and sure enough the defaults didn't load because the below functions weren't modified for this conditon.
Replace the existing functioins with these and you should get T-Stat names and all initial defaults displayed.
As long as that file is on the RAM the initial defaults will not be loaded into the structure and when the scheduler is exited and the structure is written to RAM missing values in the structure will also be absent in the file.
Unless I change the code and do comparisons of the XML file to the defaults values any changes in zone names, or defaults in the includes files constants will also require that file to be deleted as well so that the new values will be loaded and subsequently written to RAM.
This update fixes some issue mentioned in previous posts.
On initial start up the functions will now load the defaults. When the user exits the scheduler the structures data is written to RAM in an .xml file. On subsequent program uploads or reboots the structure values will be loaded from the .xml file making the values persistent.
Added a persistent VAR to keep track of the amount of zones that were loaded into the structure in previous uploads so that if changes are made in the number of zones and a new program is uploaded it will test for changes and update the structure has needed. If you add zones the previous existing zones will still get populated by the values contained in the .xml file but any new zones will be loaded with defaults. If you decrease zones the entire structure will be loaded will defaults and not from the .xml file. If any zone name is changed it will also see those changes and is coded to load all new defualts and not the .xml.
With the above changes you no longer need to delete the .xml file when changes are made and program will load the structure accordingly.
Sorry but the Attachment Expired!
Any other modules?
Ricardo
I am having a couple of problems with the ViewStat Scheduler Module:
1)I set ? HVAC_ZONES = 2 ? , but for some reason the ? nVST_NumZonesLoaded ? is fixed on 3. The Structure ? sVST_Stat ? still loads 3 zones even though I have defined only 2.
2)The XML is not being written. All the code run fine as far as setting time and cool and heat. It also executes correctly when reaches the preset time. However, when I reboot the Master it loads only the default values. I FTP to the Master and the XML file is empty ? 0 bytes.
Any ideas? Thanks.
Ricardo
Did you recompile the module after changing the number of zones in the .axi like it says in the block comment at the top of the constants of the .axi. When the module is compiled it pulls in the values of these constants and in turn sets the size of the structure. There's not really away to change this other than setting the module to a max number say 24 zones and then passing it the actual working number of zone which in your test case would be 2. I would have done it this way if I only supplied the .tko file of the module but because I didn't I figured why allocate more memory to the structure than is actually needed.
As far as thse XML file goes the way the code is written it will only write or re-write the xml file when you exit the scheduler. My thinking was to only write or re-write once rather then everytime a zone or a period is changed. Make your changes, exit the scheduler and then ftp you master an see if the file is created. If it's not then something is messed up and I'll have to look into what that might be. You can also set the debug variable to 1, open up and enable diagnostics and go through the procedure again and see what errors or send_string 0 returns your getting.
Make sure you change the number of named zones here also.
I just changed my running code to to 2 HVAC_ZONES, changed this array, saved this file and re-compiled the module and it worked fine. My thinking is it will work fine once you re-compile the module but if it doesn't, do what I said in the last post and let me know how you made out.
You're right, after recompiling it worked, including the XML. My problem was that I had forgotten that the ' VAV_ViewStat_SchedulerMod_v1 ' and the ' VAV_ViewStats ' are both working as the hole module, not like a typical standalone module which the COMM module is independent from the UI module.
Again, I thank you and think that you did a great job. I am trying to contact AMX Engineering and see if they can look at your module and probably consider making it standalone and adding ICSNet support. Again, a scheduler for the ViewStats is a must. Also, I don't know if you ever seen the code that Design Xpress generates for the ViewStats. They have newer functions and handling that could probably improve your module quite a bit.
Ricardo
flcusat@bellsouth.net.
Thanks.
Brandon
bjray@nomadgroup.com
please send to me as well. alex@isg-group.com Thank you.
Could you please send it to lou@mediushome.com?
thanks-lou
jwjames83 (at) gmail (dot) com
Thanks!
Thanks a ton!
You'll need to use the include file and make whatever changes to it to taylor it to your system. I've supplied the .axs module which I believe needs to be compiled after changes are made to the include file. If I remember correctly the module pulls in constants from the include file to determine quantities and sizes for its arrays and structures so if you make changes to the include just play it safe and re-compile the module.
Just go through the include change the applicable sections, number zones, zone names, etc. and then re-compile the module. Add the include to your system and the include will instatiate the module. The include file is based on the original AMX version but modified and renamed and this code uses the original AMX comm file tko so make sure all this stuff is in your working directory.
The 17" has a slightly different GUI with better feedback so you might want update the other versions with its modifications.
Good luck and if you guys need any help I'll see what I can do.
The newer file didn't have some of the newer code that I used in the 17" so I pulled this code from a current working job.