08-06-2013 05:14 PM
First a little background:
I am a college student doing an internship at a university and my project for the summer involves load cells. I am planning to use LabVIEW as both a multimeter and a calculator that would convert the voltage given off by the load cell into the force exerted on the load cell.
Now here comes the situation:
I have gotten everything hooked up and the load cell is working fine when using a standard multimeter. The data acquisition card is also working fine (The dac is the Measurement Computing USB-2416) as it was reading the same voltages as the multimeter. So all that was left is to put a numerical indicator and use some block code to send the voltage amounts to the indicator.
But the problem is: I simply do not know how to make the proper coding and the Internet is of no help to me on this subject.
My first thought is to do something using AIn() like the first attached picture show, but that resulted in an error stating:
"This function can not be used with this board."
Which is odd, for I am sure this is the right function to get analog readings from the dac.
Then I do something like the second picture, which does not produce an error, but it does produce a value of 255, which is obviously not correct.
At that point, I went on the Internet to get some answers, only to return with no answers at all.
And now, I turn to you guys to help me, for I have a single big question:
Which blocks/code should I use to obtain a voltage from a dac like the Measurement Computing USB 2416 I am using?
Summary of details:
With that being said, can you guys help me out, please?
08-06-2013 05:35 PM
One first step is to go to the block diagram, right click, select: Measurement I/O -> NI-DAQmx -> DAQ Assistant. Place it on the block diagram. It should then ask you several questions about your setup.
08-06-2013 05:40 PM
Hmm....
I looked in Measurement I/O, but I do not see NI-DAQmx...
08-06-2013 05:48 PM
My mistake, I should have searched the forums, first. Here's an idea:
http://forums.ni.com/t5/LabVIEW/Are-there-drivers-for-the-MCC-USB-2416-and-USB-TC/td-p/1811302
08-06-2013 06:16 PM - edited 08-06-2013 06:18 PM
Hmm. Does InstaCal and the entire package counts as drivers? If so, then I already have the drivers if you are asking that.
But the DASYLab looks interesting...
08-06-2013 06:40 PM
I don't have those drivers or VIs installed. I should have kept my mouth shut about it. Are there any examples in the folder where the VIs are? (Create a project, add a VI that calls the AIn, then look at the Files View to see what folder they're in.)
08-07-2013 07:47 AM
If you installed the entire Measurement Computing MCC-DAQ CD, you will have installed the ULx for NI LabVIEW. It comes with a bunch of examples. It makes sense to open those examples, and use them as the starting point.
Take a look at the Quick Start for the ULx for LabVIEW - http://www.mccdaq.com/pdfs/manuals/QS%20ULx%20for%20NI%20LabVIEW.pdf
Also, the more comprehensive help: http://www.mccdaq.com/pdfs/manuals/lvulx.zip
As you can see, there are quite a few examples.
08-07-2013 08:17 AM
CJ is correct. I would have gone with this example:
C:\Program Files\National Instruments\LabVIEW 2012\examples\ULx\Analog In\Measure Slow Varying Signal.llb\ULx Cont Acq&Chart Samples-SW Timed.vi
or
C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\ULx\Analog In\Measure Slow Varying Signal.llb\ULx Cont Acq&Chart Samples-SW Timed.vi
if you are running 32 bit version.
Only because it is continuous, but the single sample one will also do the job.
Also there are 3 KB articles I wrote, on getting started with ULx and LV with MCC hardware:
http://kb.mccdaq.com/KnowledgebaseArticle50357.aspx
http://kb.mccdaq.com/KnowledgebaseArticle50358.aspx
http://kb.mccdaq.com/KnowledgebaseArticle50359.aspx
They all feature the 1608GX but will work for any mcc hardware.
08-07-2013 11:13 AM
An update:
I tried to run some examples related to reading analog signals, but all of them are coming up with the same error:
That is strange and fustrating, because the device clearly supports analog signals and inputs, judging from what InstaCal told me!
08-07-2013 12:37 PM
That is strange. I ran the example I suggested you try before and just now. it is working correctly wih the USB-2416. I tried with the '2416 configured for both voltage then temperature.
Did you run this particular example? ULx Cont Acq&Chart Samples-SW Timed.vi
It defaults to board 0, channel 0. Is the USB-2416 board 0 in InstaCal?
an important rule to note: NEVER have InstaCal and LabVIEW open at the same time. if you find you do, you need to close both, all the way, then start only the program you want to use. this is because the MCC drivers are not multi threaded. I suggest you close LabVIEW all the way down, then restart it and see if the problem goes away.
Best regards,
Jeff