From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing Problems with Measurement Studio

Hello together,

I made a project ( ANSI C )with CVI 6 and converted it in Microsoft
Developer Studio 6 with the wizard of Measurement Studio. Nearly
everything works great but I have timing problems.
I get an external interrupt every 10 ms. This works great CVI, but in
Developer Studio, I doesn´t. It comes in ever 0 then 16 ms and so.

What do I make wrong ? Do I need special settings or additional libs
too ?

I hope someone can help me.


Thanks.


Regards Alex
0 Kudos
Message 1 of 3
(2,651 Views)
Hello Alex,

What do you mean by "external interrupt every 10 ms"? is this a software timer? or is this some hardware based interrupt that you are getting?

I belive the software timer should work no differently in the VC++, since we are just asking the OS for timer services. But for hardware interrupts may be different since the compiler may handle the interrupt installation differently.

Please give us some more details abut that interrupt.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 3
(2,651 Views)
Hi,

no this is not a software timer ... It is an ADDI-Data card, and there
I get an hardware interrupt. I found out, that both works great, with
CVI and VC++. I tested it with the clock()-function
In CVI, I get my 10 ms but nit in VC++. Then I measure with an oszi,
and the timing is well with both compilers.
The problem is, that I need ~ the correct time, that the program runs
correctly.
Do you now why I get different values with the clock()-function.
I made different test, only with an MFC application. The same code
with the clock()functions runs well under XP Home and NT, but not
under 2000 and Xp Prof.
I tested it with MSDEV 6 and .NET, the same thing ... 😞
I also used different time function as timegettime and the
queryhighperformance timer ...
I have
no idea, thats very strange ... Is there and bug under 2000 and
Xp Prof ?

Thanks

Alex

JuanCarlos wrote in message news:<50650000000500000076440100-1068850981000@exchange.ni.com>...
> Hello Alex,
>
> What do you mean by "external interrupt every 10 ms"? is this a
> software timer? or is this some hardware based interrupt that you are
> getting?
>
> I belive the software timer should work no differently in the VC++,
> since we are just asking the OS for timer services. But for hardware
> interrupts may be different since the compiler may handle the
> interrupt installation differently.
>
> Please give us some more details abut that interrupt.
>
> Regards,
>
> Juan Carlos
> N.I.
0 Kudos
Message 3 of 3
(2,651 Views)