LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview as the active window disables 1 or 2 concurrent while loops

I am trying to get familiar with new mutltifunction DAQ hardware from IOtech - a DAQborad/2000.

I have a simple vi consisting of two while loops which should be running in parallel. One acquires analog input data, the other handles DAC outputs.

When I run the vi, the analog acquisition while loop runs fine, but the DAC while loop will not run if labview is the active window on the pc (frontpanel or diagram). If I make another window active, both loops will update as they should.

I can resize a windows explorer window to make it small, run my vi, make windows explorer the active window and see the vi running both loops and updating as it should in the background. If I use the "Highlight Executi
on" tool on the diagram screen, both loops run as they should.

Any ideas?

Thanks,
Mike
0 Kudos
Message 1 of 3
(2,640 Views)
> I am trying to get familiar with new mutltifunction DAQ hardware from
> IOtech - a DAQborad/2000.
>

Many third party drivers default to running in LV's UI thread, and if
they put the thread to sleep, other LV threads can run, but not the UI.
It is also possible that one of the loops is hogging while the other
is being starved.

So, I've got two suggestions to try. First try putting a delay of a few
ms in the busy loop. This might help with the starvation. The second
thing to try is to open up the IOTech VI and try setting the DLL node to
be reentrant. This will allow the node to run in any thread and not
force it into the UI thread. Beware that if the DLL isn't threadsafe,
this could lead to data corruption or crashes, and before leaving it s
et
this way, you should probably contact IOTech to see if their DLL is
threadsafe. If it is not, contact NI tech support and they can help you
determine if it is safe in this case to leave it running in other threads.

Greg McKaskle
0 Kudos
Message 2 of 3
(2,640 Views)
I'm having the exact same problem using IOTECH's Personal DAQ 56 board running on Windows 2000. Your question was dated August 2003, so I suspect you have already solved your problem. Our solution was to switch to the Windows 98 OS, but I would like very much to know what your solution was.
0 Kudos
Message 3 of 3
(2,640 Views)