LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ProcessSytemEvents

Hello,

i have upgrade from CVI 4 to CVI 5.0.1 and have several Problems to run my
old
programs written under CVI 4.0 with the Runtime Engine coming with CVI5.
My programs run much slower, then with CVI4.
I have compiled them under 5.0 but with no change.
I have find out that the problem occurs when i read something
from the comport (perhaps cause i use a while-loop).

For example:
In CVI4 the following code take about 3 second to complete, in CVI5 about 40
second.

while(!read_gps_wait_for( GPS_IDENT ) )
{
ProcessSystemEvents();
if (quit_program) return(0);
}

If i do not call ProcessSystemEvents() in the loop, the function need 3
second to complete,
but without ProcessSystemEvents() i can´t press a button to c
ancel.
Which is the difference between ProcessSystemEvents in CVI4 and in CVI5?
what was modified?
If i reinstall the RuntimeEngine coming with CVI4, everthing run fine.

Any help or advice would be appreciated and apology for my bad english

Best regards
Gregoire Diehl
0 Kudos
Message 1 of 3
(3,270 Views)
Gregoire,

The default sleep policy for CVI applications was changed in CVI 5.0.1. In
order to make CVI apps
behave better in a multitasking environment, the sleep policy was changed
from VAL_SLEEP_NONE to VAL_SLEEP_MORE.

You should read the SetSleepPolicy function panel help, and then decide on
which of the three values suits you best.

Luis Gomes
National Instruments

"Gregoire Diehl" wrote in message
news:3921152b@newsgroups.ni.com...
> Hello,
>
> i have upgrade from CVI 4 to CVI 5.0.1 and have several Problems to run my
> old
> programs written under CVI 4.0 with the Runtime Engine coming with CVI5.
> My programs run much slower, then with CVI4.
> I have compiled them under 5.0 but with no change.
> I have find out that the problem occurs wh
en i read something
> from the comport (perhaps cause i use a while-loop).
>
> For example:
> In CVI4 the following code take about 3 second to complete, in CVI5 about
40
> second.
>
> while(!read_gps_wait_for( GPS_IDENT ) )
> {
> ProcessSystemEvents();
> if (quit_program) return(0);
> }
>
> If i do not call ProcessSystemEvents() in the loop, the function need 3
> second to complete,
> but without ProcessSystemEvents() i can´t press a button to cancel.
> Which is the difference between ProcessSystemEvents in CVI4 and in CVI5?
> what was modified?
> If i reinstall the RuntimeEngine coming with CVI4, everthing run fine.
>
> Any help or advice would be appreciated and apology for my bad english
>
> Best regards
> Gregoire Diehl
>
>
>
>
Message 2 of 3
(3,270 Views)
Dear Mr. Gomes,

That was the note, i searched for.
If i change the Value back to VAL_SLEEP_NONE ,
everything run fine.

Thanks for the fast support
Gregoire Diehl
0 Kudos
Message 3 of 3
(3,270 Views)