DiyLightAnimation
Software => Vixen => Topic started by: ElectricCraft1 on December 07, 2009, 05:03:39 pm
-
I have read over the last two topics in this thread and done everything as stated, but my background sequence is not running. The indicator at the bottom of the vixen panel (bottom left) is running, but no output to the lynx controllers. My program runs fine. Any ideas. I can't copy the script to save as a .txt otherwise I would post it here.
-
Check this thread
http://diylightanimation.com/index.php?topic=776.0
1. Did you import your channels, attached your plugin, and enable the Standard.dll in module all under the Script toolbar?
2. Did you enable the Background Sequence in Tools>Preference>Background Items
3. To get the code, open up the directory called "Source Files" in the Vixen folder, then open up the folder that you named the BGS. You will see a cs file. Open the file in notepad and copy and paste it here for us to see.
-
i did all of #1. i will post it when i get home in about four hrs. thanks
-
void Start() {
Off(All);
DateTime now = DateTime.Now; //get the current time
//The DateTime constructor goes (YYY, MM, HH, SS)
//Start and End time - Midnight to 5:00 pm - All Off
DateTime start0 = new DateTime(now.Year, now.Month, now.Day, 00,00,00);
DateTime end0 = new DateTime(now.Year, now.Month, now.Day, 17, 00, 00);
//Start and End time 5:00 - 6:00pm - Basic Lights
DateTime start1 = new DateTime(now.Year, now.Month, now.Day, 16, 25, 00);
DateTime end1 = new DateTime(now.Year, now.Month, now.Day, 18, 00, 00);
//Start and End time 6:00 pm - 10:30 pm - Main Background Sequence
DateTime start2 = new DateTime(now.Year, now.Month, now.Day, 18, 00, 00);
DateTime end2 = new DateTime(now.Year, now.Month, now.Day, 22, 30, 00);
//Start and End time 10:30 pm - 12:00 am - Good Night Sequence
DateTime start3 = new DateTime(now.Year, now.Month, now.Day, 22, 30, 00);
DateTime end3 = new DateTime(now.Year, now.Month, now.Day, 00, 00, 00);
//Variable Declaration
//****Channel Specific****
ChannelCollection WhtTree;
ChannelCollection RedTree;
ChannelCollection BluTree;
ChannelCollection GrnTree;
ChannelCollection SingingSanta;
ChannelCollection Arches;
ChannelCollection Eve;
ChannelCollection Candy;
ChannelCollection Deer;
ChannelCollection SantaLgt_Proj_BlowUp_Motion;
ChannelCollection Branches;
//Channel selection of loads - All from this profile
WhtTree = Channels(Wht1,Wht2,Wht3,Wht4,Wht5);
RedTree = Channels(Red1,Red2,Red3,Red4,Red5);
BluTree = Channels(Blue1,Blue2,Blue3,Blue4,Blue5);
GrnTree = Channels(Grn1,Grn2,Grn3,Grn4,Grn5);
SingingSanta = Channels(Santa);
Arches = Channels(HouseRArch,HouseLArch,GarageLArch,GarageRArch);
Eve = Channels(EveLgts);
Candy = Channels(CandyCanes);
Deer = Channels(DoeLgts,BuckLgts);
SantaLgt_Proj_BlowUp_Motion = Channels(SantaLgt,Projector,BlowUp,DeerMotion);
Branches = Channels(Twigs);
//Time Zone Zero
while (now.CompareTo(start0)>= 0 && now.CompareTo(end0) <= 0)
{
Off(All);
now = DateTime.Now; //update the current time
}
//Time Zone One
while (now.CompareTo(start1) >= 0 && now.CompareTo(end1) <= 0)
{
On(SingingSanta);
On(SantaLgt_Proj_BlowUp_Motion);
now = DateTime.Now; // update the current time
}
//Time Zone Two
while (now.CompareTo(start2) >= 0 && now.CompareTo(end2) <= 0)
{
On(SingingSanta);
On(SantaLgt_Proj_BlowUp_Motion);
On(EveLgts);
Random(Channels(HouseRArch,HouseLArch,GarageLArch,GarageRArch), 75, Over(20).Second, Wait);
On(Branches);
On(Deer, At(30)); //Deer on at 30%
On(Candy);
Ramp(WhtTree, 100, 0, Over(5).Second, Wait);
Ramp(WhtTree, 0, 100, Over(5).Second, Wait);
Ramp(RedTree, 100, 0, Over(5).Second, Wait);
Ramp(RedTree, 0, 100, Over(5).Second, Wait);
Ramp(BluTree, 100, 0, Over(5).Second, Wait);
Ramp(BluTree, 0, 100, Over(5).Second, Wait);
Ramp(GrnTree, 100, 0, Over(5).Second, Wait);
Ramp(GrnTree, 0, 100, Over(5).Second, Wait);
now = DateTime.Now; //update current time
}
//Time Zone Three
while (now.CompareTo(start3) >= 0 && now.CompareTo(end3) <= 0)
{
On(SantaLgt_Proj_BlowUp_Motion);
On(Deer, At(30));
On(Branches);
now = DateTime.Now; //update current time
}
}
-
I did slight modifications. Instead of overlapping your times have them off by a bit. Also I noticed that your second time set overlapped your first time set by 30 minuteds
void Start() {
Off(All);
DateTime now = DateTime.Now; //get the current time
//The DateTime constructor goes (YYY, MM, HH, SS)
//Start and End time - Midnight to 5:00 pm - All Off
DateTime start0 = new DateTime(now.Year, now.Month, now.Day, 00,00,01);
DateTime end0 = new DateTime(now.Year, now.Month, now.Day, 17, 00, 00);
//Start and End time 5:00 - 6:00pm - Basic Lights
DateTime start1 = new DateTime(now.Year, now.Month, now.Day, 17, 00, 01);
DateTime end1 = new DateTime(now.Year, now.Month, now.Day, 18, 00, 00);
//Start and End time 6:00 pm - 10:30 pm - Main Background Sequence
DateTime start2 = new DateTime(now.Year, now.Month, now.Day, 18, 00, 01);
DateTime end2 = new DateTime(now.Year, now.Month, now.Day, 22, 30, 00);
//Start and End time 10:30 pm - 12:00 am - Good Night Sequence
DateTime start3 = new DateTime(now.Year, now.Month, now.Day, 22, 30, 01);
DateTime end3 = new DateTime(now.Year, now.Month, now.Day, 23, 59, 00);
//Variable Declaration
//****Channel Specific****
ChannelCollection WhtTree;
ChannelCollection RedTree;
ChannelCollection BluTree;
ChannelCollection GrnTree;
ChannelCollection SingingSanta;
ChannelCollection Arches;
ChannelCollection Eve;
ChannelCollection Candy;
ChannelCollection Deer;
ChannelCollection SantaLgt_Proj_BlowUp_Motion;
ChannelCollection Branches;
//Channel selection of loads - All from this profile
WhtTree = Channels(Wht1,Wht2,Wht3,Wht4,Wht5);
RedTree = Channels(Red1,Red2,Red3,Red4,Red5);
BluTree = Channels(Blue1,Blue2,Blue3,Blue4,Blue5);
GrnTree = Channels(Grn1,Grn2,Grn3,Grn4,Grn5);
SingingSanta = Channels(Santa);
Arches = Channels(HouseRArch,HouseLArch,GarageLArch,GarageRArch);
Eve = Channels(EveLgts);
Candy = Channels(CandyCanes);
Deer = Channels(DoeLgts,BuckLgts);
SantaLgt_Proj_BlowUp_Motion = Channels(SantaLgt,Projector,BlowUp,DeerMotion);
Branches = Channels(Twigs);
//Time Zone Zero
while (now.CompareTo(start0)>= 0 && now.CompareTo(end0) =< 0)
{
Off(All);
now = DateTime.Now; //update the current time
}
//Time Zone One
while (now.CompareTo(start1) >= 0 && now.CompareTo(end1) <= 0)
{
On(SingingSanta);
On(SantaLgt_Proj_BlowUp_Motion);
now = DateTime.Now; // update the current time
}
//Time Zone Two
while (now.CompareTo(start2) >= 0 && now.CompareTo(end2) <= 0)
{
On(SingingSanta);
On(SantaLgt_Proj_BlowUp_Motion);
On(EveLgts);
Random(Channels(HouseRArch,HouseLArch,GarageLArch,GarageRArch), 75, Over(20).Second, Wait);
On(Branches);
On(Deer, At(30)); //Deer on at 30%
On(Candy);
Ramp(WhtTree, 100, 0, Over(5).Second, Wait);
Ramp(WhtTree, 0, 100, Over(5).Second, Wait);
Ramp(RedTree, 100, 0, Over(5).Second, Wait);
Ramp(RedTree, 0, 100, Over(5).Second, Wait);
Ramp(BluTree, 100, 0, Over(5).Second, Wait);
Ramp(BluTree, 0, 100, Over(5).Second, Wait);
Ramp(GrnTree, 100, 0, Over(5).Second, Wait);
Ramp(GrnTree, 0, 100, Over(5).Second, Wait);
now = DateTime.Now; //update current time
}
//Time Zone Three
while (now.CompareTo(start3) >= 0 && now.CompareTo(end3) <= 0)
{
On(SantaLgt_Proj_BlowUp_Motion);
On(Deer, At(30));
On(Branches);
now = DateTime.Now; //update current time
}
}
-
The overlap by 30 min. was my testing. Will this make things run properly? I appreciate your help. Also, how would I make the random and tree fade go at the same time? I used the wait, so I know that these will happen one at a time. When the file saves, it saves as .vix.vsp. Is this correct or should it just be .vsp?
-
The overlap by 30 min. was my testing. Will this make things run properly? I appreciate your help. Also, how would I make the random and tree fade go at the same time? I used the wait, so I know that these will happen one at a time. When the file saves, it saves as .vix.vsp. Is this correct or should it just be .vsp?
it should save as vsp. I have to check in regards to running both at the same time.
-
no testing just thinking.
The piece of code below, make it so that the randoms is ran first for 20 seconds, waits then goes on to read the next line of code. Therefore it will not go on at the same time as the ramps
Random(Channels(HouseRArch,HouseLArch,GarageLArch,GarageRArch), 75, Over(20).Second, Wait);
-
i made the time changes and it still is not running. any more suggestions. newest version of vixen is used just in case that matters.
-
i made the time changes and it still is not running. any more suggestions. newest version of vixen is used just in case that matters.
Can you confirm these were done. Look at attached images. If so next step is to zip up your vixen and send it to me so I can have a look at it.
-
when vixen sa ed the script it saved as .vsp.vix. i renamed this just .vsp. i got home late last night and it appeared that the blow up was partially inflated like the script ran except that time zone three wasn't. i changed the end time to day + 1 and it came on like it should. this morning it was still on. i changed the end time to 11 59 in hopes that this time constructor was my issue. i'll keep you posted. thanks for all the help.
-
when vixen sa ed the script it saved as .vsp.vix. i renamed this just .vsp. i got home late last night and it appeared that the blow up was partially inflated like the script ran except that time zone three wasn't. i changed the end time to day + 1 and it came on like it should. this morning it was still on. i changed the end time to 11 59 in hopes that this time constructor was my issue. i'll keep you posted. thanks for all the help.
One silly mistake I made last year was I had the wrong time of day. Like the computer time was on am and I was on pm.
Rick R.
-
Thats good to hear. Yes, mess with the time constructor. I could be off in the timing of things. I remember times can overlap, but of course it wont go into the next look until the previous look is satisfied.
i.e.
Loop 1 = 5pm to 7pm
Loop 2 = 6:30pm to 10pm
The second loop wont loop starting at 6:30 it will however start after 7:00pm because the first loop has not been satisfied yet. It's been a while and i'm still a little rusty since doing that writeup last year. It's funny I had to refer to it to do some BGS this year myself ^_^
when vixen sa ed the script it saved as .vsp.vix. i renamed this just .vsp. i got home late last night and it appeared that the blow up was partially inflated like the script ran except that time zone three wasn't. i changed the end time to day + 1 and it came on like it should. this morning it was still on. i changed the end time to 11 59 in hopes that this time constructor was my issue. i'll keep you posted. thanks for all the help.
-
Ok. Script runs just fine if I hit play when open. Won't run by itself on a daily time schedule. What to check. I have attached my file of Vixen for review. Please let me know what you may think is the problem.
Thanks,
Branden
-
Upon checking in over at DIY Christmas I found others who also had this issue. Vixen runs the sequence then ends and doesn't restart the BGS until Vixen is restarted. I wrote this script to rectify that issue until we can figure out what is going on with the other. It runs all the time with the while statement.
-
Thats good that it help fix your problem.
Upon checking in over at DIY Christmas I found others who also had this issue. Vixen runs the sequence then ends and doesn't restart the BGS until Vixen is restarted. I wrote this script to rectify that issue until we can figure out what is going on with the other. It runs all the time with the while statement.
-
Well, didn't fix it. Now I get com port errors when the program starts. All this is making me crazy, especially this close to christmas.
-
If you turn off the bgs and just run a program schedule do you get the com error?
Last year I used a bgs and but this year I didn't bother with it. So far no problems. My lights turn on at 5pm and run til 10:16 and then I just have the nativity lit until midnight.
Cheers
Rick R.
-
Been playing with everything this am, no com errors while vixen runs the first time upon opening. Things go bad after the BGS finishes its timers. Posted a question about windows in a new thread that would end this problem. I have PM's KC over at DIY to ask about the BGS problem and no reply yet. All this is quite frustrating.
-
Found a way to get around this issue. Check Windows Closer posting.