From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can plot 2 channels through a DAQ assistant using NI 9239?

Hello

I am trying to record the pressure through a transducer by measuring the voltage. I have a old version for pressure transducer (see attached) that works, but I want to simplify by using the DAQ assistant. I am using NI 9239.

I have 2 channels connected (low and high pressure) so both should be plotted in a graph or numerically written.

When I run the new version it says device identifier invalid, empty string...

I attach both the old pressure transducer and the new DAQ assistant version so you can compare

I will appreciate your help

Thanks

Download All
0 Kudos
Message 1 of 16
(2,592 Views)

Your old version has a Pressure Transducer.vi has a subVI that you did not attach.  Without it, we can't see what is goin on inside of it.

 

In your new version, the task is looking at a device called "Pressure" and channels ai0 and ai1.  Is "Pressure" a valid name for your DAQ device?

0 Kudos
Message 2 of 16
(2,585 Views)

The device type set in the DAQ assistant is NI 9239. The old version correctly detects, so I dont know if hits `pressure` definition might affect?

 

Is the subvi attached the one you mean?

0 Kudos
Message 3 of 16
(2,570 Views)

No.  That looks just like the other old VI.  It is the same except you removed the timed while loop.

 

It uses a subVI called "pressure transducer".  It does something I can't tell because you haven't included it.  But it puts out a DAQ task wire that goes to the DAQmx Read (in this "subVI" and your original "Pressure Transducer Read and Write").  That subVI defines the channels used in the task.

 

If we can see that, then we can figure out how you defined the channels in the version that works vs. the one that doesn't.  In your non-working version you are looking at a channel called pressure/ai0  (and ai1).  If you don't have a device named pressure defined within your Measurement and Automation Explorer, then you'll get an error like the one you are describing.

0 Kudos
Message 4 of 16
(2,566 Views)
0 Kudos
Message 5 of 16
(2,562 Views)

No you don't.  That is the same VI you've been attaching all along.

 

Now the missing subVI is called "Pressure.vi"  Where is that?!!!!!!

 

This subVI defines the task.

 

Randomly shuffling file names around doesn't get you any closer to attaching the missing subVI.

 

0 Kudos
Message 6 of 16
(2,556 Views)

This is the pressure.vi

0 Kudos
Message 7 of 16
(2,551 Views)

That's better.  It calls a channel called Pressure/ai0 which is the same name you have defined within the DAQ Assistant.  So it can't be that.

 

Try setting up your DAQ assistant to only use that channel and not Pressure/ai1 to see if that works okay.

 

Also, try using your old version and add the 2nd channel by going Pressure/ai0:1  (This should really be a DAQ channel constant (purple) rather than a string.  You can create it by right clicking on that input of the DAQmx function.

0 Kudos
Message 8 of 16
(2,542 Views)

The new version does not work with only one channel either.

 

The old version it doesn't allow to me to add a new channel because the clone is already connected (and to me it seems that both channels are correctly set in the old version). The old one works good with two channels, the problem is in the new one.

0 Kudos
Message 9 of 16
(2,537 Views)

Maybe you need to reinstall your DAQ drivers.  There is no reason that the DAQ assistant should not work if you go in and pick the channels.

 

I have no idea what "clone" you are talking about when you say it is already connected.

 

In that paragrpah you are contradicting yourself when first you say "the old version doesn't allow me to add a new channel".  Then in the immediately following sentence you say "the old version works good with two channels".   Which is it?

 

Another troubleshooting task you could do with the new version is right click on the DAQ Assistant and choose Open Front Panel.  It will convert it to a normal subVI which you can then open and inspect.  See if it runs okay then, or at least you can poke and probe inside of it to see what is happening.

0 Kudos
Message 10 of 16
(2,533 Views)