Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

connect

Connect device object to instrument

Syntax

connect(obj)
connect(obj,'update')

Arguments

obj

A device object or an array of device objects.

update

Update the state of the object or the instrument.

Description

connect(obj) connects the device object specified by obj to the instrument. obj can be an array of device objects.

connect(obj,'update') updates the state of the object or the instrument. update can be object or instrument. If update is object, the object is updated to reflect the state of the instrument. If update is instrument, the instrument is updated to reflect the state of the object. In this case, all property values defined by the object are sent to the instrument on open. By default, update is object.

Examples

Create a device object for a Tektronix® TDS 210 oscilloscope that is connected to a National Instruments® GPIB board.

g = gpib('ni',0,2);
d = icdevice('tektronix_tds210',g); 

Connect to the instrument.

connect(d)

List the oscilloscope settings that can be configured.

props = set(d);

Get the current configuration of the oscilloscope.

values = get(d);

Disconnect from the instrument and clean up.

disconnect(d)
delete([d g])

Tips

If obj is successfully connected to the instrument, its Status property is configured to open. If obj is an array of device objects and one of the objects cannot be connected to the instrument, the remaining objects in the array will be connected and a warning is displayed.

Introduced before R2006a

Was this topic helpful?