add
Add entry to IVI configuration store object
Syntax
add(obj, '
type
',
'name', ...)
add(obj, 'DriverSession',
'name', 'ModuleName', 'HardwareAssetName', 'P1
',
V1)
add(obj, 'HardwareAsset',
'name', 'IOResourceDescriptor', 'P1
', V1)
add(obj, 'LogicalName',
'name', 'SessionName', 'P1
', V1)
add(obj, struct)
Arguments
| IVI® configuration store object |
| Type of entry being added |
| Name of the |
| Tells the driver exactly how to locate the device this asset represents |
| IVI instrument driver or software module |
| Unique identifier for hardware asset |
| Unique identifier for asset driver session |
| First optional parameter for added entry. Other parameter-value pairs may follow. |
| Value for first parameter |
| Structure defining entry to be added; field names are the entry parameter names |
Description
add(obj, '
adds a new entry of type
',
'name', ...)type
to the IVI configuration store object, obj
, with name,
name
. If an entry of type, type
,
with name, name
, already exists an error will occur. Based on
type
, additional arguments are required.
type
can be HardwareAsset
,
DriverSession
, or LogicalName
.
add(obj, 'DriverSession',
'name', 'ModuleName', 'HardwareAssetName', '
adds a new driver session entry to the IVI configuration store object, P1
',
V1)obj
, with name,
name
, using the specified software module name,
ModuleName
and hardware asset name,
HardwareAssetName
. Optional parameter-value pairs may be
included.
Valid parameters for DriverSession
are listed below. The
default value for on/off parameters is off
.
Parameter | Value | Description |
---|---|---|
| Any character vector | Description of driver session |
| structure | A struct array containing virtual name mappings |
|
| Enable caching if the driver supports it. |
| Any character vector | This value is software module dependent |
|
| Enable driver interchangeability checking, if supported |
|
| Enable instrument status querying by the driver |
|
| Enable extended range checking by the driver, if supported |
|
| Enable recording of coercions by the driver, if supported |
|
| Enable simulation by the driver |
add(obj, 'HardwareAsset',
'name', 'IOResourceDescriptor', '
adds a new hardware asset entry to the IVI configuration store object, P1
', V1)obj
, with name,
name
, and resource descriptor,
IOResourceDescriptor
. Optional parameter-value pairs may be
included.
Valid parameters for HardwareAsset
are
Parameter | Value | Description |
---|---|---|
| Any character vector | Description of hardware asset |
add(obj, 'LogicalName',
'name', 'SessionName', '
adds a new logical name entry to the IVI configuration store object, P1
', V1)obj
, with name,
name
, and driver session name,
SessionName
. Optional parameter-value pairs may be
included.
Valid parameters for LogicalName
are
Parameter | Value | Description |
---|---|---|
| Any character vector | Description of logical name |
add(obj, struct)
, where
struct
is a structure whose field names are the entry
parameter names, adds an entry to the IVI configuration store object, obj
, of the specified
type with the values contained in the structure.
Additions made to the configuration store object, obj
, can be
saved to the configuration store data file with the commit
function.
Note
To get a list of options you can use on a function, press the Tab key after entering a function on the MATLAB® command line. The list expands, and you can scroll to choose a property or value. For information about using this advanced tab completion feature, see Using Tab Completion for Functions.
Examples
Construct IVI configuration store object, c
.
c = iviconfigurationstore;
Add a hardware asset with name gpib1
, and resource description
GPIB0::1::INSTR
.
add(c, 'HardwareAsset', 'gpib1', 'GPIB0::1::INSTR');
Add a driver session with name S1
, that uses the TekScope
software module and the hardware asset with name gpib1
.
add(c, 'DriverSession', 'S1', 'TekScope', 'gpib1');
Add a logical name to configuration store object c
, with name
MyScope
, driver session name S1
, and
description A logical name
.
add(c, 'LogicalName', 'MyScope', 'S1', ... 'Description', 'A logical name');
Add a hardware asset with the name gpib3
, and resource
description GPIB0::3::ISNTR
.
s.Type = 'HardwareAsset'; s.Name = 'gpib3'; s.IOResourceDescriptor = 'GPIB0::3::INSTR'; add(c, s);
Save the changes to the IVI configuration store data file.
commit(c);
Version History
Introduced before R2006a