Instrument Control Toolbox | ![]() ![]() |
Disconnect an instrument object from the instrument
Syntax
Arguments
obj |
An instrument object or an array of instrument objects. |
Description
disconnects fclose(obj)
obj
from the instrument.
Remarks
If obj
was successfully disconnected, then the Status
property is configured to closed
and the RecordStatus
property is configured to off
. You can reconnect obj
to the instrument using the fopen
function.
An error is returned if you issue fclose
while data is being written asynchronously. In this case, you should abort the write operation with the stopasync
function, or wait for the write operation to complete.
Example
This example creates the GPIB object g
, connects g
to the instrument, writes and reads text data, and then disconnects g
from the instrument using fclose
.
At this point, you can once again connect an instrument object to the instrument. If you no longer need g
, you should remove it from memory with the delete
function, and remove it from the workspace with the clear
command.
Functions
clear
, delete
, fopen
, instrhelp
, record
, stopasync
Properties
![]() | echoudp | fgetl | ![]() |