Author Topic: Background script not running  (Read 4492 times)

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Background script not running
« on: December 07, 2009, »
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.
Branden

"If you can't go big, why do it?"

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
Re: Background script not running
« Reply #1 on: December 07, 2009, »
Check this thread

You are not allowed to view links. Register or Login

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.

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #2 on: December 07, 2009, »
i did all of #1.  i will post it when i get home in about four hrs.  thanks
Branden

"If you can't go big, why do it?"

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #3 on: December 07, 2009, »
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
}



}
Branden

"If you can't go big, why do it?"

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
Re: Background script not running
« Reply #4 on: December 08, 2009, »
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
}



}

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #5 on: December 08, 2009, »
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?
« Last Edit: December 08, 2009, by ElectricCraft1 »
Branden

"If you can't go big, why do it?"

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
Re: Background script not running
« Reply #6 on: December 08, 2009, »
You are not allowed to view links. Register or Login
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.
« Last Edit: December 08, 2009, by knguyen916 »

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
Re: Background script not running
« Reply #7 on: December 08, 2009, »
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);

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #8 on: December 08, 2009, »
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.
Branden

"If you can't go big, why do it?"

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
Re: Background script not running
« Reply #9 on: December 09, 2009, »
You are not allowed to view links. Register or Login
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.

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #10 on: December 09, 2009, »
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.
Branden

"If you can't go big, why do it?"

Offline rrowan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 5899
  • 08096
Re: Background script not running
« Reply #11 on: December 09, 2009, »
You are not allowed to view links. Register or Login
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.
Light Animation Hobby - Having fun and Learning at the same time. (21st member of DLA)
You are not allowed to view links. Register or Login
Warning SOME assembly required

Offline knguyen916

  • Sr. Member
  • ****
  • Posts: 530
Re: Background script not running
« Reply #12 on: December 09, 2009, »
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 ^_^

You are not allowed to view links. Register or Login
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.

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #13 on: December 12, 2009, »
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
« Last Edit: December 13, 2009, by ElectricCraft1 »
Branden

"If you can't go big, why do it?"

Offline ElectricCraft1

  • Sr. Member
  • ****
  • Posts: 115
  • Dimming for the first time in '09.
Re: Background script not running
« Reply #14 on: December 14, 2009, »
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.
Branden

"If you can't go big, why do it?"