| Data Acquisition Toolbox | Search  Help Desk |
| digitalio | Examples See Also |
Syntax
DIO = digitalio('adaptor', ID);
Arguments
adaptor |
Name of the hardware driver adaptor |
ID |
Device identifier |
DIO |
The digital I/O object |
Description
digitalio creates a digital I/O object. This device object exists both in the data acquisition engine and the MATLAB workspace. When the object is created:
adaptor is loaded and initialized.
digitalio accepts two input arguments. The input arguments are given below.| Description |
Supported Vendors and Devices | |
| National Instruments |
Hewlett-Packard |
|
adaptor |
nidaq |
hpvxi |
ID |
Device number |
Device ID |
ID must be specified as a double. For Hewlett-Packard hardware, ID can be specified as a double or a string.
If the values supplied to digitalio are incomplete or incorrect, or the referenced driver is not found, then an error is returned. To use the digital I/O object to perform data acquisition tasks, lines must be added with the addline function.
Example
National Instruments
To create a digital I/O object for a National Instruments device defined as device number 1DIO = digitalio('nidaq', 1);
Hewlett-Packard
To create a digital I/O object for a Hewlett-Packard (HP) VXI device with device ID 8 (slot 8)DIO = digitalio('hpvxi', 8);
AI = digitalio('hpvxi', [8 9]);
See Also
Functions
addline, analoginput, analogoutput