资讯详情

游标传感器的Matlab支持包

MATLAB Support Package for Vernier SensorDAQ

Vernier SensorDAQ (www.vernier.com/sensordaq) is a USB data-acquisition interface. It can be used to gather data from Vernier sensors (www.vernier.com/sensors) and also includes terminals for analog and digital I/O.

This support package extends the capabilites of Data Acquisition Toolbox (R2011b or later), and allows you to access the following SensorDAQ capabilities:

* Vernier analog sensor measurements

* Analog I/O (using the terminals)

* Counter input

* Digital I/O

The support package uses Data Acquisition Toolbox's "Session-based Interface" (except for the digital I/O, which uses the Legacy interface and requires 32-bit MATLAB).

Sample usage:

% --- Read a Vernier Sensor ---

session = sdaq.createSession();

sdaq.addSensor(session, 1, sdaq.Sensors.Barometer);

% the scaling function converts raw voltage to physical units

scale = sdaq.getScaleFun(sdaq.Sensors.Barometer);

% get a single measurement, and convert to physical units

rawdata = session.inputSingleScan();

data = scale(rawdata);

% collect 2 seconds worth of data

session.DurationInSeconds = 2.0;

rawdata = session.startForeground();

data = scale(rawdata);

% --- Analog input ---

session = sdaq.createSession();

sdaq.addAnalogInput(session,0);

% collect 2 seconds worth of data

session.DurationInSeconds = 2.0;

data = session.startForeground();

标签: 传感器传给matlab

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台