主要内容

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

obj

IVI®configuration store object

'DriverSession'
'HardwareAsset'
'LogicalName'

Type of entry being added

'name'

Name of theDriverSession,HardwareAsset, orLogicalNamebeing added

'IOResourceDescriptor'

Tells the driver exactly how to locate the device this asset represents

“ModuleName”

IVI instrument driver or software module

'HardwareAssetName'

Unique identifier for hardware asset

'SessionName'

Unique identifier for asset driver session

'P1'

First optional parameter for added entry. Other parameter-value pairs may follow.

V1

Value for first parameter

struct

Structure defining entry to be added; field names are the entry parameter names

Description

add(obj, 'type', 'name', ...)adds a new entry oftypeto 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 ontype, additional arguments are required.typecan beHardwareAsset,DriverSession, orLogicalName.

add(obj, 'DriverSession', 'name', 'ModuleName', 'HardwareAssetName', 'P1', V1)adds a new driver session entry to the IVI configuration store object,obj, with name,name, using the specified software module name,ModuleNameand hardware asset name,HardwareAssetName. Optional parameter-value pairs may be included.

Valid parameters forDriverSessionare listed below. The default value for on/off parameters isoff.

Parameter

Value

Description

Description

Any character vector

Description of driver session

VirtualNames

structure

A struct array containing virtual name mappings

Cache

on/off

Enable caching if the driver supports it.

DriverSetup

Any character vector

This value is software module dependent

InterchangeCheck

on/off

Enable driver interchangeability checking, if supported

QueryInstrStatus

on/off

Enable instrument status querying by the driver

RangeCheck

on/off

Enable extended range checking by the driver, if supported

RecordCoercions

on/off

Enable recording of coercions by the driver, if supported

Simulate

on/off

Enable simulation by the driver

add(obj, 'HardwareAsset', 'name', 'IOResourceDescriptor', 'P1', V1)adds a new hardware asset entry to the IVI configuration store object,obj, with name,name, and resource descriptor,IOResourceDescriptor. Optional parameter-value pairs may be included.

Valid parameters forHardwareAssetare

Parameter

Value

Description

Description

Any character vector

Description of hardware asset

add(obj, 'LogicalName', 'name', 'SessionName', 'P1', V1)adds a new logical name entry to the IVI configuration store object,obj, with name,name, and driver session name,SessionName. Optional parameter-value pairs may be included.

Valid parameters forLogicalNameare

Parameter

Value

Description

Description

Any character vector

Description of logical name

add(obj, struct), wherestructis 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.

添加itions made to the configuration store object,obj, can be saved to the configuration store data file with the提交function.

Note

To get a list of options you can use on a function, press theTabkey 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, seeUsing Tab Completion for Functions.

Examples

Construct IVI configuration store object,c.

c = iviconfigurationstore;

添加a hardware asset with namegpib1, and resource descriptionGPIB0::1::INSTR.

add(c, 'HardwareAsset', 'gpib1', 'GPIB0::1::INSTR');

添加a driver session with nameS1, that uses the TekScope software module and the hardware asset with namegpib1.

add(c, 'DriverSession', 'S1', 'TekScope', 'gpib1');

添加a logical name to configuration store objectc, with nameMyScope, driver session nameS1, and descriptionA logical name.

add(c, 'LogicalName', 'MyScope', 'S1', ... 'Description', 'A logical name');

添加a hardware asset with the namegpib3, and resource descriptionGPIB0::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.

提交(c);

Version History

Introduced before R2006a