<< viRequest VISA Integration Toolbox Error codes >>

VISA Integration Toolbox >> VISA Integration Toolbox > viWrite

viWrite

Writes synchronously data to device or interface

Calling Sequence

[status, writeCount] = viWrite(session, buf)

Arguments

status

a real.

writeCount

number of bytes actually transferred.

session

unique logical identifier of a session.

buf

a character string.

location of a data block to be sent to a device.

Description

The viWrite() operation synchronously transfers data. The data to be written is in the buffer represented by buf. This operation returns only when the transfer is terminated. Only one synchronous write operation can occur at a time.

Examples

[status, defaultRM] = viOpenDefaultRM();

// Write a command to device located at TCPIP0::ftp.ni.com::21::SOCKET
[status, instr] = viOpen(defaultRM, "TCPIP0::ftp.ni.com::21::SOCKET", viGetDefinition("VI_NULL"), viGetDefinition("VI_NULL"));
[status, count] = viWrite(instr, ":AUT")

viClose(instr);
viClose(defaultRM);

Report an issue
<< viRequest VISA Integration Toolbox Error codes >>