LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Other choise to while loop polling?

Hi!

 

I have worked with USB-bus oscilloscope and trying to build labview software using dll-librarys. Almost everything works BUT... how i can poll dll-library (*.vi) which is external "counter"? I know that dll is returning number of samples from scope hardware and i know number of those samples are 3072 blocks. Now when I polling that dll in while loop it returns just something (2999 or 3001 or 2989 or something like that). I think that dll returns that value which is exactly time in dll when while loop poll it? Hardwares speed is 50Msps 8-bit. How else i can poll that dll? Or other choises to while loop, where i have to poll something and when it returns something then do something...

 

Thx again 🙂

 

 

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

Here are two choices (could be more out there):  Active Polling or Event Registration

 

Active polling = use of while loop with your DLL calls.  This makes sense if you know there is always data available to retrieve.   Caveats include processor usage, which can affect UI response and processing.

 

Event Registration = use of Event Structure with Callback (e.g. Active X callback), such that your hardware notifies the OS when data is ready.  This makes sense if you are not always capturing data in your top level code and if your hardware driver includes callbacks.  Caveats include more complex programming (understanding of Active X, dynamic event registration, event structure, etc.)

 

If you're having trouble understanding how you might integrate these into your main application, in addition to these forums, there are also NI Certified Alliance Partners (like us) that can help you get going.

Message Edited by LabBEAN on 08-17-2009 12:33 PM

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 2 of 2
(3,193 Views)