MATLAB Programming Example for U2500A USB Modular Data Acquisition (DAQ) module’s Digital IO

by

 

This program sets the USB DAQ module’s first 8 Digital IO ports as digital outputs

DIO_PutValue.m
out=daqhwinfo('agilentu2500');
out.ObjectConstructorName(:);
dio=digitalio('agilentu2500',0);
dio

addline(dio,0:7,'out')
data=25;
putvalue(dio.Line(1:8),data);
value=getvalue(dio.Line(1:8))

delete(daqfind);
delete(dio);
clear dio;

Contact us