LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New to LabView.. Where is my device in LabView?

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?

0 Kudos
Message 1 of 12
(4,822 Views)

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


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 12
(4,817 Views)

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?

0 Kudos
Message 3 of 12
(4,747 Views)
You need to actually open the subVI called Read AI Task. Your idea of the DAQ configuration being in the queue is just silly.
0 Kudos
Message 4 of 12
(4,730 Views)

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. 

DAQ_Assistant_expanded.PNG

 

Hope that helps!

 


Clemens | Applications Engineering | National Instruments

Clemens | Technical Support Engineer | National Instruments
Message 5 of 12
(4,679 Views)

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...  

 

Download All
0 Kudos
Message 6 of 12
(4,553 Views)

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.

0 Kudos
Message 7 of 12
(4,525 Views)

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?

 

 

Download All
0 Kudos
Message 8 of 12
(4,510 Views)
If you need to read from another device, you would need to add a new task in MAX and new code to read it.
0 Kudos
Message 9 of 12
(4,489 Views)

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

0 Kudos
Message 10 of 12
(4,474 Views)