viVPrintf

NI-VISA

viVPrintf

Purpose

Converts, formats, and sends the parameters designated by params to the device or interface as specified by the format string.

C Syntax

ViStatus viVPrintf(ViSession vi, ViString writeFmt, ViVAList params)

Visual Basic Syntax

viVPrintf&(ByVal vi&, ByVal writeFmt$, params as Any)

Resource Classes

GPIB INSTR, GPIB INTFC, GPIB-VXI INSTR, Serial INSTR, TCPIP INSTR, TCPIP SOCKET, USB INSTR, USB RAW, VXI INSTR, VXI SERVANT

Parameters

Name Direction Description

vi

IN

Unique logical identifier to a session.

writeFmt

IN

String describing the format to apply to params.

params

IN

A list containing the variable number of parameters on which the format string is applied. The formatted data is written to the specified device.

Return Values

Completion Codes Description

VI_SUCCESS

Parameters were successfully formatted.

 

Error Codes Description

VI_ERROR_INV_OBJECT

The given session reference is invalid.

VI_ERROR_RSRC_LOCKED

Specified operation could not be performed because the resource identified by vi has been locked for this kind of access.

VI_ERROR_IO

Could not perform write operation because of I/O error.

VI_ERROR_TMO

Timeout expired before write operation completed.

VI_ERROR_INV_FMT

A format specifier in the writeFmt string is invalid.

VI_ERROR_NSUP_FMT

A format specifier in the writeFmt string is not supported.

VI_ERROR_ALLOC

The system could not allocate a formatted I/O buffer because of insufficient resources.

Description

This operation is similar to viPrintf(), except that the params parameters list provides the parameters rather than separate arg parameters.

Related Topics

INSTR Resource

INTFC Resource

SERVANT Resource

SOCKET Resource

viPrintf

viSPrintf

viVScanf

viVSPrintf