04-27-2016 08:06 AM
Hello,
I am using LabVIEW with a DAQmx (USB 6353) and I want to do an acquisition of current. For that I have a shunt resistor. But I would like to pass the resistor value in parameter of the acquisition task. Do you know if it is possible ?
Thank you
Solved! Go to Solution.
04-27-2016 08:30 AM
Don't use the DAQ assistant. You can use it to setup your task but then right click on it and convert it to DAQmx code.
The DAQmx Create Channel VI has an input for the external shunt resistor value.
04-27-2016 08:34 AM
Yes, it is possible. How do I know? [I've never tried to measure Current before, and have never used a USB 6353]. I used MAX.
Do you know about MAX, NI's Measurement and Automation eXplorer, whose icon on your desktop looks like this? You use MAX to "explore" your devices, test them, then design Tasks to do what you want to do.
Here's what I did (and what you should do). I opened MAX, plugged in a 6353, then opened Data Neighborhood to define a new DAQmx Task. I said I wanted to Acquire Signals, Analog Input, Current, using the NI-6353 and specifying ai0. It then showed the following screen:
You'll see that this is set to use an External Shunt Resistor of 249 Ohms. If you are using a different resistor, you can enter its value here. Now, if you save this as a Named Task, it will save all of the parameters you specify, so when you go to configure DAQmx and put down the DAQmx Start function as your first function, you can create a Task Constant on the upper left input, click the little Triangle to have it show you the MAX Tasks you've saved, choose the "Current Task" you created, and it will set everything you see above.
If you need to change anything at Run Time, you can also do that using Property Nodes. To learn more, do a Google search for "Learn 10 Functions in NI-DAQmx" and read the excellent White Paper that explains this in greater detail.
Bob Schor