LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant vs. DAQmx

I am working on controlling 13 solenoid valves, one at a time, and a was wanting to know whether it is better to use the DAQ Assistant or use individual DAQmx for each solenoid valve?
 
Also,  what would be your recommendation to log data that corresponds to each valve as shown below?  I am debating using the ActiveX features to write them directly to an Excel spreadsheet or use the Write to a Measurement VI to a text file. Also, if you have links to examples, that would be much appreciated.
 
Valve     %CO2     Time (DD:HH:MM)
     1            10%       00:10:30
     2            9.5%      00:10:31
     3            9.75%    00:10:32
     ...            ........      .........
 
 
0 Kudos
Message 1 of 21
(8,421 Views)

How fast are you acquiring the data and for how long?  Will it be a continuous data acquisition?  Also, witht he DAQmx you can make a task (using the Measurement & Automation program), which will allow you to use just one DAQmx with all 13 channels.  I have used the DAQ Assisant and it is easy to use, but for fast continuous acquisitions, you may run into problems.

Writing to a Measurement VI has worked well for me and you can open it in excel afterwards.  Again, if you are aquiring alot of data quickly, a more efficient write to file may be needed.

However, looking at you example of the data, it appears that you ar collecting data slowly (on the order of minutes).  In this case, I would recommend the DAQ Assistant and the Write to Measurement VI for ease of use.  Using other options would give you more choice on how things are done, but would be more complex.

Hope this helps.

--Robert

Message 2 of 21
(8,407 Views)
The test will run for weeks at a time, and it will take about a minute for the CO2 measurement to stabilize.  Creating a Task in Measurement and Automation sounds good, but I have never used it before.  What is the learning curve for the program, and how easy is it to implement it into the main program?
 
 
0 Kudos
Message 3 of 21
(8,402 Views)

What you don't explain is what you are using to control the valves. Is this digital output? If you are using separate DAQ Assistants for this, then each task may be starting and stopping each time. You could combine all channels into a single DAQ Assistant and have comparable performance to the low level DAQmx functions with all channels in a single task. If you wanted separate tasks, then I would recomend using DAQmx and create/start the tasks outside your main loop. Close the tasks when the loop finishes.

p.s. To me, creating a task in MAX is silly. It's just as easy to create the task in the code.



Message Edited by Dennis Knutson on 07-21-2008 08:35 PM
Message 4 of 21
(8,399 Views)

They are 24 V solenoid valves.  We are going to use the NI 9472 to control the valves.  However, while we are waiting for this to arrive, we are currently using an old BNC-2120 that has 8 BNC Analog inputs, 2 analog outputs, and a 8 digital I/O port.

I've tried to use the DAQmx to simply send out a LabVIEW generated sine wave, but I receive an error 200288. I've also tried using the DAQ assistant to send out the same sine wave, and I try measuring it on an O-Scope, but all I get is noise.  I can use the DAQ assistant to get data from the BNC-2120 no problem, but cannot send analog or digital outputs correctly.  I've attached the two test VI's I was working on. Maybe I'm completely using these features incorrectly.  LabVIEW 7 was really easy to control individual inputs and outputs with AI Acquire Waveform.Vi and Write to Digital Line.VI, but I cannot find those features on 8.5. 

If I'm using these tools incorrectly, please tell me the proper way to use them.  I've tried using the LabVIEW help  menu, but that is like reading foreign language to me.

 

Download All
0 Kudos
Message 5 of 21
(8,375 Views)
You are probably used to using the high level traditional DAQ functions such as AO Generate Waveform. They actually call a variety of other functions and it is the similar functions in DAQmx that you are not calling. You are not doing any configuration at all. I would suggest you start with the shipping examples to see how to properly configure a task for sample rate, etc. You also use a predefined task in MAX and there is no telling how you have configured that since it is external to the code. There are some basic examples for analog out and digital. I'm not sure what you could have done wrong with the digital since you did not post that code. For the DAQ Assistant code, I'm not sure since I never use the assistant but you could try checking the Use Waveform Timing box. This is next to the Generation Mode selection.
0 Kudos
Message 6 of 21
(8,359 Views)
Okay, I've finally get a waveform off of the DAQ board.  I think what happened was I was using a frequency too low for the DAQ board to generate.  However, I am receiving an error 200016 after it runs for a few seconds.  Saying "Onboard Device Memory Underflow."  I'm not sure what that means.  It tells me to increase  the sampling rate and number of samples, but I still get the same error.

I've attached the update VI and the error.
Download All
0 Kudos
Message 7 of 21
(8,353 Views)
Please don't attach a 322 kB attachment of an .rtf file that is nothing but a small screenshot as a bitmap.  Just post the screenshot itself as a .png file.
0 Kudos
Message 8 of 21
(8,351 Views)
Sorry about that, I did that in a hurry. 

So, do you know what that error 200016 means, and how to correct it?  I receive the same error whenever I tried to run the example "Cont Gen Voltage Wfm-Int Clk.vi" that comes with 8.5.


0 Kudos
Message 9 of 21
(8,345 Views)
What is your actual DAQ board? The BNC-2120 is just a terminal block.
0 Kudos
Message 10 of 21
(8,336 Views)