Record data and event information to file
An instrument object.
Switch recording capabilities on or off.
record(obj) toggles the recording state
initiates or terminates recording for
switch can be
on, recording is initiated. If
off, recording is
This example creates the GPIB object
g to the instrument, and configures
record detailed information to the disk file MyGPIBFile.txt.
g = gpib('ni',0,1); fopen(g) g.RecordDetail = 'verbose'; g.RecordName = 'MyGPIBFile.txt';
Initiate recording, write the
*IDN? command to the instrument,
and read back the identification information.
record(g,'on') fprintf(g,'*IDN?') out = fscanf(g);
Terminate recording and disconnect
g from the
Before you can record information to disk,
obj must be
connected to the instrument with the
fopen function. A connected
instrument object has a
Status property value of
open. An error is returned if you attempt to record
obj is not connected to the instrument. Each
instrument object must record information to a separate file. Recording is
automatically terminated when
obj is disconnected from the
RecordMode properties are
obj is recording, and must be configured before
Introduced before R2006a