VISA Write Function
- Updated2025-07-30
- 3 minute(s) read
Writes the data from write buffer to the device or interface specified by VISA resource name.

Inputs/Outputs
VISA resource name
—
VISA resource name specifies the resource to be opened. The VISA resource name control also specifies the session and class.
write buffer
—
write buffer contains the data to be written to the device.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
VISA resource name out
—
VISA resource name out is a copy of the VISA resource name that VISA functions return.
return count
—
return count contains the actual number of bytes written.
error out
—
error out contains error information. This output provides standard error out functionality. |
Whether the data is transferred synchronously or asynchronously is platform-dependent. Right-click the node and select Synchronous I/O Mode»Synchronous from the shortcut menu to write data synchronously.
When you transfer data from or to a hardware driver synchronously, the calling thread is locked for the duration of the data transfer. Depending on the speed of the transfer, this can hinder other processes that require the calling thread. However, if an application requires that the data transfer as quickly as possible, performing the operation synchronously dedicates the calling thread exclusively to this operation.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Instrument IO\Serial\Serial.lvproj
- labview\examples\Instrument IO\GPIB\GPIB with VISA functions.vi
VISA resource name
—
write buffer
—
error in (no error)
—
VISA resource name out
—
return count
—
error out
—