LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer to fast

Hi all,

 

I've a problem with my pxi-system and I think its cvi based.
The controller is a NI PXI-8106(in Hypervisor mode) and I use CVI 10.0 with Real-Time module

Now I've detected problems with timing functions of my GUI (WinXP), e.g. Delay() and panel timers run too fast.
50 - 60 times faster than it should be!

The ni-example "counter" has the same behavior as my program.

 

But there is no similar problem with LabView programs, if I run the system in non-Hypervisor mode or
with timing function of the real time side(in Hypervisor mode)

 

Changing the "useDefaultTimer" option of the CVI runtime engine doesn't fix it...

 

Thanks for help

0 Kudos
Message 1 of 3
(2,909 Views)

HI HGrunberger,

 

If I understood you right, you say that setting a planel timer to, let's say, 1 second will cause the timer callback to be called 60 times per seconds? If so the behaviur is really akward and I could not find any behaviour alike in our support database.

Did you try using a Sleep() from the windows api? Do you observe then the same behaviour with it? Also, which version of Hypervisor qre you using?

 

Regards

______________
Florian Abry
Inside Sales Engineer, NI Germany
0 Kudos
Message 2 of 3
(2,837 Views)

Hi Natiy,

 

that's my problem, I've also tried 1000 sec and the callback is called several times per second.

Sleep() is seems to be only one, which runs with the right time periode.

 

But in the example "counter.c", if I replace the Delay(timeToSleep) with Sleep(timeToSleep * 1000), the panel displays a wrong slept time.

Dispite the time in reality was correct!(with hypervisor)

 

e.g. if I set 5 seconds to wait, the panel shows ~550 seconds slept, in real it lasts ~5 seconds.

For comparsion, the same test without hypervisor, the panel says 4.9998 seconds slept an it lasts also ~5 seconds in reality

 

And the numeric field "Ticks Per Second" shows 19.700.000 with hypervisor and 3.579.545 without hypervisor?!?

 

I use Hypervisor version 2.0 without any patch

 

Greetings

 

0 Kudos
Message 3 of 3
(2,811 Views)