Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Consecutive DAQ assistant calls

Solved!
Go to solution

Hello,

 

I am trying to work out something that is most likely simple.  Perhaps the problems stem from a bad initial design choice.   The VI (and subVIs) are being used to output a voltage, read another voltage and react accordingly.

 

To begin with the error I am getting is "Error -200547". 

 

Here is how the program works:

 

1.  MOVR.vi

 

This generates two analog output signals, controlled by the same waveform generator.  There is also a digital signal out, but I don't think this is the problem.  

 

2. MTUL.vi (and MDTL.vi)

 

These use MOVR and read another voltage.  Essentially, the voltage should be created until a limit is reached, and it then decides to stop.  

 

Both of these work as expected on their own.  

 

3.  IsoMeasure.vi

 

This is where the problems occur.  Basically, this VI take MTUL and MDTL and loops them in a for loop, changing the frequency each increment.  Observed performance is that MDTL will work, and attempt to start MTUL.  This is when "Error -200547" is thrown.  The error code appears to be understandable, but "autostart" is not clear to me by using the assistant.  

 

I would like to avoid using all of the daqMX code, but I will if I have to.  If that is the suggestion, a nice example is some way would be awesome.  If I can set the assistant to autostart, I guess that would help as well. 

 

Thanks for any leads.  I feel like this should work.

 

 

Download All
0 Kudos
Message 1 of 3
(3,177 Views)
Here is one more file.
0 Kudos
Message 2 of 3
(3,176 Views)
Solution
Accepted by drevniok

Hi drevniok,

 

The reason why you are getting this error is because you are trying to restart your DAQ Assistant multiple times in your application. One important thing to note is that a DAQmx task is configured and started only once whenever the DAQ Assistant is called for the very first time. Therefore, since you are stopping and starting the DAQ Assistant in your application , the second time you call the Assistant, it will not start the task. This is made more true by the fact that the DAQmx Write function inside the DAQ Assistant has its auto-start input set to False.

 

Using DAQ Assistant for Analog Output Returns Error -200547

 

That being said, the DAQ Assistant is mainly used as a quick and easy way to configure and use your DAQ device, however, it is somewhat limited in functionality compared to lower-level DAQmx VIs. This is one case which illustrates this limitation and therefore, I believe the best option around this issue would be to use the DAQmx VIs. LabVIEW has plenty of shipping examples that can help you get started with developing your application. These can be found in you NI Example Finder under the Help menu. The example I would like to point you to is the Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi under Hardware Input and Output » DAQmx » Analog Generation » Voltage.

 

One other resource I would like to point you to is the Getting Started with NI-DAQmx: Main Page, which are a collection of online tutorials on DAQmx programming.

 

I hope this helps.

 

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(3,151 Views)