Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts about DAQmx MAX

Hi everybody,

I implemented a vi (attached) which is possible to change some DAQ properties. But some problems are happening.

  1. I tried use a Start Task after set a new configuration, but an error occurs (image0_task). I know that when using DAQ Assistant in a while loop for example, an embedded Start Task is called every iteration, using DAQmx MAX this also happens? So, it makes me think about if a Start Task is necessary. If is, how solve this error?
  2. I cannot stop this vi. When I press the stop button the properties returned to default but do not stop.
  3. I included a case structure forcing a Stop and Clear Task when press the stop button. When I press the stop button first, the properties returned to default without error. When I press the stop button a second time an error occur (image1_stop).
  4. About performance, using DAQmx MAX is possible reaches performance of classical DAQ vi´s (Create Virtual Channel, Timing, Task, Read, Write, etc….) or is similar to use DAQ Assistant?

Thank very much for any help/suggestion.

Andrea

 

Download All
0 Kudos
Message 1 of 4
(2,708 Views)

I'm sorry but I don't think there is very much in that VI that is correct. Your first major problem is using the run continuous button. That should never be used except in special debug circumstances. That is the reason your loop does not start. Second major problem I see is with the case statement. In order to change the rate, you should first stop the task. It would probably work better if the false case had the DAQmx Read. Don't use multiple instances of the task name. Use a single wire. I would put the task name outside the loop.

Message 2 of 4
(2,684 Views)

Hi Dennis!!!

 

Sorry, really the question about stop was terrible, simply went unnoticed.

 

About the Start Task, in your oppinion it is necessary? DAQmx MAX works like a DAQ Assistant? I put the Stop Task before set new configuration but the error continues.

 

What do you think, use multiple instances of the task name could be a problem? I use multiple instances only to avoid multiples lines.

 

My last question is, when I tried configure the device but the DAQmx is ignoring. I am using a property node DAQmx Channel and write the new sequency: Devx/ai0,Devx/ai1,Devx/ai2,Devx/ai3. Please, could you give me a hint?

 

Thank you very much.


Andrea

0 Kudos
Message 3 of 4
(2,675 Views)
The stop task is necessary. You cannot change the parameters of a task unless it is stopped. I would like to see what you have changed.

It may not hurt to to have the duplicate task names. I never create tasks in MAX. I prefer to have everything in the VI where I can see all of the settings and the task wire is used for data flow.
0 Kudos
Message 4 of 4
(2,666 Views)