Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

mx-DAQ multiple tasks

Hello,

Im using LV7.1 with NI-Daq 7.4.

in my Application i use multiple tasks, a few for aquiring analog and digital input from my first 6024E and one to aquire digital input from my second 6024E.

In most of the time this works very well, but from time to time, when the mxdaq read VI for the second task is executing for the first time, an error message occurs. This erromessage tells me, that i passing an empty string instead of an task reference to the mxdaq read VI of my second card. After Reexecuting my App it works fine without creating error messages until I reboot. For me it looks like an initialization/synchronization problem. Both cards are properly installed and visible/testable in MAX.

For syncroniziation of these cards i use the same MX-DAQ clock source.

Perhaps i have to reconfigure the task initailization but i dont know what is wrong.

thank for help
0 Kudos
Message 1 of 4
(2,929 Views)
hi darastad,

do you've got an exact error code? or better: a screenshot of it?
can you test your application on another system?
the problem is not really reproducible, right?!
did you already try to reconfigure the task initailization or use different clock sources?

Greets!
0 Kudos
Message 2 of 4
(2,907 Views)
I'm guessing that the reason that you only see this sometimes is that it is a race condition between the read call and task creation. I've seen this problem before and the cause is usually that you are trying to read before your task is created. This can be caused by using an asynchronous process to create your channels/tasks apart from doing your multi-channel reads. To eliminate this problem I suggest you write your application in such a way that you create all of your tasks first, before trying to read from any of them. The easiest way to do this is to wire up your create task VI's in order before your reads, as these VI's will block until they complete task creation.

Hope this helps,
DB
0 Kudos
Message 3 of 4
(2,890 Views)
Hello, thanks for your help!
Meanwhile i think i solved the problem.
I found a problem in the initialization sequenz of my app, so your were right with your adwise. After creating a defined ini - sequenz the problem disappaired.
Sorry for wasting your time!
0 Kudos
Message 4 of 4
(2,870 Views)