Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Lookout 4.5.1 b18 nested expressions on startup

There seem to be a problem with nested expressions on process
startup.

We used to program a delay on process startup so that audio
alarms (if any) acivate after given period of time.

Here's code example of how we used to do that.

Normally PlayWave should play ONCE after
5 second delay upon process startup.

------------------
/* doesn't work correctly on 4.5.1 b18 - plays TWICE */
/* !TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave */

ExpPlayWave = new ExpStartupDelay;




/* It works OK ... */
/* !TimerStartupDelay->ExpPlayWave->PlayWave */


/*
ExpPlayWave = new !TimerStartupDelay;
*/


ExpStartupDelay = new !TimerStartupDelay;


Panel1 = new Panel ("Control Panel", 0, 239, 109, 16, 35,
0xC0C0C0, 0,
0, 0,
TimerStartupDelay.status
{l= 130,t= 7,w=
38,h= 20
},
ExpPlayWave {l= 105,t= 12,w= 16,h=
16,opt=8193,
type=2},
ExpStartupDelay {l= 105,t= 37,w= 16,h=
16,opt=8193,
type=2},
"ExpPlayWave" {l= 8,t= 8,w= 87,h=
20,opt=3,fwt=400
},
"ExpStartupDelay" {l= 4,t= 35,w= 100,h=
20,opt=3,fwt=400
});
Panel1.activate= true;

PlayWave = new PlayWave (ExpPlayWave, "c:\windows\media\ding.wav");

TimerStartupDelay= new OneShot (true, :05);


---------------


In other words a signal received by PlayWave
should be identical in both cases:

!TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave

!TimerStartupDelay->ExpPlayWave->PlayWave

In fact it is't in 4.5.1 build 18.
It was OK with earlier Lookout versions/builds.

I would mostly appreciate to hear from NI on the problem.

We have many processes with timer values 'hidden'
within nested expressions. And it used to work fine for years.
I feel sick thinking of rewriting / debugging
dozens of programs.

Best Regards,

Sergei
0 Kudos
Message 1 of 4
(3,670 Views)
Further to my previous posting, I just found out that
renaming ExpStartupDelay to Exp1 eliminates the problem.

The problem seems to occur only on process startup.

Can anybody comment on that? How can it be that
expression name affects it's value?

Best Regards,

Sergei


toma.inc@usa.net wrote:

> There seem to be a problem with nested expressions on process
> startup.
>
> We used to program a delay on process startup so that audio
> alarms (if any) acivate after given period of time.
>
> Here's code example of how we used to do that.
>
> Normally PlayWave should play ONCE after
> 5 second delay upon process startup.
>
> ------------------
> /* doesn't work correctly on 4.5.1 b18 - plays TWICE */
> /* !TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave */
>
> ExpPlayWave = new ExpStartupDelay;
>
> /* It works OK ... */
> /* !TimerStartupDelay->ExpPlayWave->PlayWave */
>
> /*
> ExpPlayWave = new !TimerStartupDelay;
> */
>
> ExpStartupDelay = new !TimerStartupDelay;
>
> Panel1 = new Panel ("Control Panel", 0, 239, 109, 16, 35,
> 0xC0C0C0, 0,
> 0, 0,
> TimerStartupDelay.status
> {l= 130,t= 7,w=
> 38,h= 20
> },
> ExpPlayWave {l= 105,t= 12,w= 16,h=
> 16,opt=8193,
> type=2},
> ExpStartupDelay {l= 105,t= 37,w= 16,h=
> 16,opt=8193,
> type=2},
> "ExpPlayWave" {l= 8,t= 8,w= 87,h=
> 20,opt=3,fwt=400
> },
> "ExpStartupDelay" {l= 4,t= 35,w= 100,h=
> 20,opt=3,fwt=400
> });
> Panel1.activate= true;
>
> PlayWave = new PlayWave (ExpPlayWave, "c:\windows\media\ding.wav");
>
> TimerStartupDelay= new OneShot (true, :05);
>
> ---------------
>
> In other words a signal received by PlayWave
> should be identical in both cases:
>
> !TimerStartupDelay->ExpStartupDelay->ExpPlayWave->PlayWave
>
> !TimerStartupDelay->ExpPlayWave->PlayWave
>
> In fact it is't in 4.5.1 build 18.
> It was OK with earlier Lookout versions/builds.
>
> I would mostly appreciate to hear from NI on the problem.
>
> We have many processes with timer values 'hidden'
> within nested expressions. And it used to work fine for years.
> I feel sick thinking of rewriting / debugging
> dozens of programs.
>
> Best Regards,
>
> Sergei
0 Kudos
Message 2 of 4
(3,670 Views)
Were you opening your process file using the LKS file? Try opening it using the L4P file.

Khalid
0 Kudos
Message 3 of 4
(3,670 Views)
Of course, it was L4P. I just used this LKS code as an example.

The problem is that we use this kind of startup in 24 process
loaded simultaneously. They all begin to "cry" at startup via
powerful loudspeaker.

The code works with 4.0 and 4.5.1 b9 but doesn't work with 4.5.1 b18.

Any thoughts?

Sergei

Khalid wrote:

> Were you opening your process file using the LKS file? Try opening it
> using the L4P file.
>
> Khalid
0 Kudos
Message 4 of 4
(3,670 Views)