LabJackU3
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
Citation pour cette source
Nathan Tomlin (2024). LabJackU3 (https://www.mathworks.com/matlabcentral/fileexchange/27597-labjacku3), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- Radar > Phased Array System Toolbox > Waveform Design and Signal Synthesis > Signal Propagation and Targets >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 |