viVScanf

NI-VISA

viVScanf

Purpose

Reads, converts, and formats data using the format specifier. Stores the formatted data in the parameters designated by params.

C Syntax

ViStatus viVScanf(ViSession vi, ViString readFmt, ViVAList params)

Visual Basic Syntax

viVScanf&(ByVal vi&, ByVal readFmt$, 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.

readFmt

IN

String describing the format to apply to params.

params

OUT

A list with the variable number of parameters into which the data is read and the format string is applied.

Return Values

Completion Codes Description

VI_SUCCESS

Data was successfully read and formatted into params parameter(s).

 

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 read operation because of I/O error.

VI_ERROR_TMO

Timeout expired before read operation completed.

VI_ERROR_INV_FMT

A format specifier in the readFmt string is invalid.

VI_ERROR_NSUP_FMT

A format specifier in the readFmt 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 viScanf(), except that the params parameters list provides the parameters rather than separate arg parameters.

Note  Because the prototype for this function cannot provide complete type-checking, remember that all output parameters must be passed by reference.

Related Topics

INSTR Resource

INTFC Resource

SERVANT Resource

SOCKET Resource

viScanf

viSScanf

viVPrintf

viVSScanf