Help needed for my data acquisition project

1 view (last 30 days)
Yu Wang
Yu Wang on 12 Dec 2011
Kindly looking for help on my data acquisition project. Thanks a lot! I’m using the data acquisition toolbox of MATLAB to write a program to control a data acquisition device; in this case, I’m using minilab1008.
For example, I write some codes below. I need to use this particular analogue output channel to turn on or off a power supply unit. The power supply unit is 0-5 volts analogue programmable. Thus I think a 5V will turn it on while a 0V will turn it off. (correct me if I’m wrong, thx!!!)
ao=analogoutput('mcc',0);
ch=addchannel(ao,1);
putsample(ao, 5); %i don’t know whether the “5” here can represent 5 volts or not.
But analogue output channels have two properties: OutputRange and UnitsRange. For analogue output objects, the data is scaled when it is queued in the engine with the putdata function according to the formula below.
scaled value = (original value)(output range)/(units range)
The output range is constrained by the OutputRange property, which specifies the gain and polarity of the analogue output channels. UnitsRange is to scale the data to reflect particular engineering units.
I’m very confused by these terminologies. I have no ideas about how to decide the values of OutputRange and UnitsRange?

Answers (1)

Derek
Derek on 18 May 2012
You can call daq.getDevices to get information about the output capabilities of your hardware. For example, when I call this for my NI PCI it tells me I have two analog output channels that have a range of -10 to +10 volts (with measurement type 'Voltage') and a range of sampling rates from 0.1 to 2857142.9 scans/ second. In addition it tells me about the other capabilities of the device such as analog input and counter IO. And yes, 5 volts can power many devices and 0 volts would indeed provide no power. I'm not sure how this plays into triggering your power supply. In fact if your DAQ device can output 5v then it could be used as a power supply by itself.
Hope this helps. Cheers

Categories

Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!