Main Content

instrid

Define and retrieve commands that identify instruments

Syntax

instrid
instrid('cmd')
out = instrid(...)

Arguments

cmd

The instrument identification command.

out

The list of commands used to locate and identify instruments.

Description

instrid returns the currently defined instrument identification commands.

instrid('cmd') defines the instruments identification commands to be the string cmd. Note that you can also specify a cell array of commands.

out = instrid(...) returns the instrument identification commands to out.

Examples

Set the identification command to *ID?.

instrid('*ID?')

Specify three new identification commands using a cell array.

instrid({'*IDN?','*ID?','IDEN?'})

Assign a list of current identification commands to an output variable.

id_commands = instrid;

Tips

The Instrument Control Toolbox™ instrhwinfo function uses the instrument identification commands as defined by instrid when locating and identifying instruments.

By default, Instrument Control Toolbox software uses the command *IDN?, which identifies most instruments. However, some instruments respond to different identification commands such as *ID? or *IDEN?.

If instrhwinfo does not identify a known instrument, use instrid to specify the identification commands the instrument will respond to. If instrid returns no commands, an instrument cannot be found.

Version History

Introduced before R2006a

See Also