LabJackU3

バージョン 1.0.0.0 (4.66 KB) 作成者: Nathan Tomlin
This function simplifies talking to a labjack U3.
ダウンロード: 996
更新 2010/5/12

ライセンスの表示

Must have MATLAB_LJUD.zip file from
http://labjack.com/support/ud/examples/matlab
and 'LJUD_Functions' folder must be on path or in the current directory

inputs:
op operation to perform, options are:
temperature - read internal temp in Kelvin
AnalogIn,N
read single-ended analog input from channel N
AnalogInDiff,N1,N2
read differential analog input from channels: N1-N2
AnalogOut,N1,N2
set analog output channel N1 (0 or 1) to voltage N2
DigitalIn,N - read 0 or 1 on channel N
DigitalOut,N1,N2
set channel N1 to digital value N2 (0 or 1)
StreamAnalogIn,N1,N2,N3
stream from channel N1 (can be array of multiple channels) at rate N2 samples/sec for total of N3 seconds

varargin - currently no options

examples:
T = LabJackU3('temperature')
% return internal temperature
V2 = LabJackU3('AnalogIn',2)
% return AIN2-GND voltage
V6to5 = LabJackU3('AnalogInDiff',6,5)
% return AIN6-AIN5 voltage
LabJackU3('AnalogOut',1,3)
% set DAC1 to 3 volts
D4 = LabJackU3('DigitalIn',4)
% read voltage of 0 or 1 on FIO4
LabJackU3('DigitalOut',5)
% set voltage to 0 or 1 on FIO5
[time,V1]=LabJackU3('StreamAnalogIn',1,1000,.3);
% stream AIN1 at 1000 Hz for 0.3 seconds
[time,Vs]=LabJackU3('StreamAnalogIn',[0,1],5000,1.5);
% stream both AIN0 & AIN1 at 5000 Hz for 1.5 seconds

引用

Nathan Tomlin (2024). LabJackU3 (https://www.mathworks.com/matlabcentral/fileexchange/27597-labjacku3), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2007a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersSignal Propagation and Targets についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0