Easy? background sc...
 
Notifications
Clear all

Easy? background script - help needed pls!

25 Posts
6 Users
0 Reactions
8,138 Views
Posts: 87
(@tfmacz)
Estimable Member
Joined: 19 years ago

This is awesome. Thank you.
I have a different problem.
Running the DMX-Pro plugin on com7
I have a background script running.
when a regular sequence is started, either manually or from the scheduler i get a "com port busy error" and the background script stops. if I stop the sequence and restart it before the the background script restarts all is ok.

I created a 2 second "do nothing" sequence which I put at the beginning of my programs for the scheduler to get around this.

Any Ideas why this is happening. It did not occur last year. not sure what version(2.5.0.4) I was running last year, running 2.5.0.8 this year.

Thanks,
Ted


Reply
rokkett
Posts: 441
(@rokkett)
Reputable Member
Joined: 17 years ago

The issue happens because of the multi-threaded nature of the .Net infrastructure. One thread is still closing, the background script, as another is starting, the new programmed sequence. Both threads are attempting to control the serial port, but only one at a time can use the resource. No easy way around it - one thread is still in the process of releasing the serial port as the next is attempting to open the serial port.

The "fix" is to allow time for the first thread to complete. And you have already discovered the same method that I use to allow more time for the first thread to exit. Not sure why you didn't have this issue last year - I did with Vixen 2.5.

But, yes, just leave the empty sequence at the beginning of your program, and you should be good to go.

(If anyone has a different solution - jump in here... :))


Reply
Posts: 87
(@tfmacz)
Estimable Member
Joined: 19 years ago

I suspected something like that. Thanks.

Do you have a suggestion on how to make your sample script above a dimming sequence?

something like group1 turn on to 100% then take 5 seconds to dim off to 0%
then group2 turn on then dim off etc????

Thanks...
Ted

I answered my own question. See the next Port.


Reply
Posts: 87
(@tfmacz)
Estimable Member
Joined: 19 years ago

I have a Vixen Instance running in VirtualBox to experiment with and have the following script running. I would call it a Dimming Marque.

Ted

void Start() {

while(true) {

//Chase( ChannelRange(4,3), At (40), Over(3700).Milliseconds, Wait );
//Ramp( ChannelRange(1,1), 100, 0, Over(1500).Milliseconds );
Ramp ( Channels(MegaTree1_white), 100, 0, Over(1000).Milliseconds, Wait );
Ramp ( Channels(MegaTree2_white), 100, 0, Over(1000).Milliseconds, Wait );
Ramp ( Channels(MegaTree3_white), 100, 0, Over(1000).Milliseconds, Wait );

}
}


Reply
sparky588
Posts: 248
(@sparky588)
Reputable Member
Joined: 17 years ago

When My background sequence is running and my schedual starts i keep gettin access to COM1 denied. if the background sequence isnt running theres no problem HELP


Reply
Page 4 / 5
Share: