08-17-2009 11:10 AM
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 🙂
08-17-2009 11:29 AM - edited 08-17-2009 11:33 AM
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.