
44
Agilent VISA User’s Guide
3
Programming with VISA
Using Non-Formatted I/O
There are two non-buffered, non-formatted I/O functions that
synchronously transfer data called
viRead
and
viWrite
. Also, there are
two non-formatted I/O functions that asynchronously transfer data
called
viReadAsync
and
viWriteAsync
. These are raw I/O functions
and do not intermix with the formatted I/O functions.
Non-Formatted I/O Functions
The non-formatted I/O functions follow. For more information, see the
viRead
,
viWrite
,
viReadAsync
,
viWriteAsync
, and
viTerminate
functions in the
VISA Online Help
.
viRead
.
The
viRead
function synchronously reads raw data from the
session specified by the
vi
parameter and stores the results in the
location where
buf
is pointing. Only one synchronous read operation
can occur at any one time.
viRead(
vi
,
buf
,
count
,
retCount
);
viWrite
.
The
viWrite
function synchronously sends the data pointed
to by
buf
to the device specified by
vi
. Only one synchronous write
operation can occur at any one time.
viWrite(
vi
,
buf
,
count
,
retCount
);
Refer to the Agilent VISA help file for specific infomraiton on these
and other VISA functions such as
viReadAsync
and
viWriteAsync
.
Example: Using Non-Formatted I/O Functions
This sample
program illustrates using non-formatted I/O functions to communicate
with a GPIB device. This example program is intended to show specific
VISA functionality and does not include error trapping. Error trapping,
however, is good programming practice and is recommended in your
VISA applications. See “Trapping Errors” in this chapter for more
information.
Содержание E2094S
Страница 6: ...6 Agilent VISA User s Guide ...
Страница 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Страница 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Страница 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...
Страница 144: ...144 Agilent VISA User s Guide Glossary ...