11-17-2015 12:22 PM
I'm new to LabView and I'm taking over someone else's program. I need to make a modification to switch the existing sensor for a new model, but I can't find where in the LabView VI the old sensor signal is used. I know it is in the "Aquire AI Data Loop" sub VI. But I do not see a DAQ assist there. Can someone tell me how the probe is integrated into the LabView proram here?
11-17-2015
12:26 PM
- last edited on
12-16-2024
05:12 PM
by
Content Cleaner
Looks like you need to dig into that Read AI Task VI. It does not look like an NI provided VI, so I'm thinking your answers are in there.
And since you are looking for the DAQ Assistant and it is not there, you should read this article and learn to use the DAQmx API: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
11-19-2015 04:22 PM
Hi Crossrulz,
Thank you for the article - I'm making my way through it now.
I expanded the "Read AI Task" to see if I could trace it back to the instrument, DAQ, or port that it is connected to but it looks like the only thing coming in is "queue in". Is there a way to expand the "queue in" that is connected to the AI data of the Read AI Task? I'm thinking that my instrument is in there but when I double click on it I'm only taken to the front panel. How can I access the contents of the queue?
11-19-2015 05:32 PM
11-20-2015 10:08 AM
cmorrow8, what Dennis_Knutson and crossrulz are saying is that you have to open up (in another window) the 'Read AI Task'. If you double-click on the 'Read AI Task' icon, it should open up another window. That window will be the front panel of the 'Read AI Task' vi. On the front panel, there is likely a field where you can select which device you want to be reading from.
Whoever wrote the code created a sub vi to package things together. In order to change what this vi is reading we have to go into the subvi to change the fields there.
For example, this is how the DAQ Assistant express vi looks like when it is opened.
Hope that helps!
Clemens | Applications Engineering | National Instruments
12-04-2015 03:45 PM
Hi Kemens,
Thank you for the reply. I opened the 'Read AI Task' and found an DAQmx Read called 'Analog 1D DBL N Chan 1samp' inside (see "Read AI Task" below).
Inside the DAQmx Read VI 'Analog 1D DBL N Chan 1samp' I found an array with task channels in. (See DAQmx Read VI below).
In NI MAX I found the Task that is reading the 0-5V analog voltage measurement from a conductivity probe using a 6009 DAQ.
I have a new probe that sends a 0-20 mA signal that I'm reading with a 9208 DAQ in a cDAQ 9171 chasis with a 9923 DSUB terminal block - and I set up a new task in NI MAX to that works.
I need a LabView program that reads from the voltage device and the current device, so I tried to add my new current device to the task reading the analog input voltage, but I get an error stating that "one or more devices do not support multidevice tasks" and it is referring to the 6009 DAQ. So I cannot use one task to read from both DAQs.
So my question is how do I add another task to this LabView program to read the current signal? Can I somehow add it to the existing "Read AI Task" VI or do I need another VI?
I read the article that Crossrulz references "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications" but my program is using Tasks created in NI MAX rather than creating virtual tasks with the DAQmx virtual channel, so I don't have the virtual channels to augment...
12-04-2015 05:08 PM
What does the front panel of your top level VI look like? The settings control is a cluster. Inside the subVI, it unbundles the task. So somewhere in the higher level VI is a Settings control that must have a task control inside of it where you determine which task name to run.
12-04-2015 06:54 PM - edited 12-04-2015 06:56 PM
Hi RavensFan,
Here is my front panel and the beginning section of the block diagram.
This is the top level VI.
Any idea where the setting control would be?
12-04-2015 07:19 PM
12-04-2015 10:13 PM - edited 12-04-2015 10:15 PM
If you aren't familiar with your front panel, I have no idea our you are capable of running it now.
The settings In cluster on the front panel has two controls in there that say AI task and DI task. Change them to other task names.
As Dennis said, you can create new tasks in MAX and would be able to pick them out of those dropdowns on your front panel. Or edit your existing tasks in MAX.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours