LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What win API timer function is under the LabWindows CVI timer control?

Good Afternoon everyone!

 

What WinAPI function is the basis to LabWindows CVI timer control, what Win32 functions are suitable for SuspendTimerCallbacks and  ResumeTimerCallbacks analogue? 

I've tried some win API timers, but the combination on their resolution and operation does not much the LabWindows timer control. Hope that is not secret, just like the Rhonda Byrne's one.

 

grateful for any  your answers,

 

Armands Mezerins

 

 

 

0 Kudos
Message 1 of 9
(3,654 Views)

This page discusses CVI Asynchronous timers giving some informations on how they are implemented on various systems. Hope you can find satisfactory informations there.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 9
(3,646 Views)

LabWindows CVI timer control  that is called from the user interface thread is also based on multimedia timer?

0 Kudos
Message 3 of 9
(3,623 Views)

If you are referring to UI timer controls that you can drop down on a panel the answer is no: UI timer controls are executed in the user interface thread (normally the main thread). Thread blocking conditions (like when you move a window or even simply click on its title) block UI timers as well.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 9
(3,619 Views)

You right, I refer to UI timer controls, executed in user interface thread. At this moment I think that Waitable Timers ( called with function CreateWaitableTimer()) are the right choice. Do you think so?

0 Kudos
Message 5 of 9
(3,605 Views)

I have no experience on timers created using the Win32 APIs so I cannot argue about CreateWaitableTimer command.

Why are you looking at that command? Is there anything in CVI Async Timers that you are dissatisfied with?

As an alternative, you could consider moving your project to a multithreading pattern using CVI native functions in the Utility Library, which should be a bit simpler to program than Windows APIs.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 6 of 9
(3,596 Views)

I just have to write program for server, that makes some measurements and send them over network. the best example for that I have found in one CVI program, where timer control is used, but i have to write that in winapi functions, I have no choice. I think async timer functions are not suitable, but I'm in my learnning process now, and try to consider any other working possibilities. I'm grateful for any help and your assistance!

0 Kudos
Message 7 of 9
(3,559 Views)

I'd be surprised if the CVI Timer control used anything other than the Windows SetTimer() function.

--
Martin
Certified CVI Developer
0 Kudos
Message 8 of 9
(3,544 Views)

CVI timer control  has precision about 1ms, but WM_TIMER message and user timer functions  SetTimer() or KillTimer()  have precision about 10 - 15 ms, I'm trying waitable timers, I think they are somewhat close

0 Kudos
Message 9 of 9
(3,540 Views)