Help needed for my data acquisition project
조회 수: 5 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
Derek
2012년 5월 18일
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!