Instrument Control Toolbox | ![]() ![]() |
Record data and event information to a file
Syntax
Arguments
obj |
An instrument object. |
' switch ' |
Switch recording capabilities on or off. |
Description
record(obj)
toggles the recording state for obj
.
record(obj,'
initiates or terminates recording for switch
')
obj
. switch
can be on
or off
. If switch
is on
, recording is initiated. If switch
is off
, recording is terminated.
Remarks
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 information while 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 instrument with fclose
.
The RecordName
and RecordMode
properties are read-only while obj
is recording, and must be configured before using record
.
For a detailed description of the record file format and the properties associated with recording data and event information to a file, refer to Debugging: Recording Information to Disk.
Example
This example creates the GPIB object g
, connects g
to the instrument, and configures g
to record detailed information to the disk file MyGPIBFile.txt.
Initiate recording, write the *IDN?
command to the instrument, and read back the identification information.
Terminate recording and disconnect g
from the instrument.
Functions
Properties
RecordMode
, RecordName
, RecordStatus
, Status
![]() | readasync | resolvehost | ![]() |