OBSERVATION 6.2.6 If you pass as the parameter to the operation, the number of bytes VI_NULL retCount viBufWrite() transferred will not be returned. This may be useful if it is important to know only whether the operation succeeded or failed. 6.2.8 viScanf(vi, readFmt, arg1, arg2,...) Purpose Read, convert, and format data using the format specifier. Store the formatted data in the arg1, arg2 parameters. Parameters Name Direction Type Description vi IN ViSession Unique logical identifier to a session. readFmt IN ViString String describing the format for arguments. arg1, arg2 OUT N/A A list with the variable number of parameters into which the data is read and the format string is applied. Return Values This is the operational return status. It returns either a Type ViStatus completion code or an error code as follows. Completion Code Description VI_SUCCESS Data was successfully read and formatted into arg parameter(s). Error Codes Description VI_ERROR_INV_SESSION The given session or object reference is invalid (both VI_ERROR_INV_OBJECT are the same value). VI_ERROR_RSRC_LOCKED Specified operation could not be performed because the resource identified by has been locked for this vi 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 string is invalid. readFmt VI_ERROR_NSUP_FMT A format specifier in the string is not readFmt supported. VI_ERROR_ALLOC The system could not allocate a formatted I/O buffer because of insufficient system resources. Description This operation receives data from a device, formats it by using the format string, and stores the resultant data in the parameter list. The format string can have format specifier sequences, white characters, and arg ordinary characters. The white characters—blank, vertical tabs, horizontal tabs, form feeds, new
OBSERVATION 6.2.6 If you pass VI_NULL as the retCount parameter to the viBufWrite() operation, the number of bytes transferred will not be returned. This may be useful if it is important to know only whether the operation succeeded or failed. 6.2.8 viScanf(vi, readFmt, arg1, arg2,...) Purpose Read, convert, and format data using the format specifier. Store the formatted data in the arg1, arg2 parameters. Parameters Name Direction Type Description vi IN ViSession Unique logical identifier to a session. readFmt IN ViString String describing the format for arguments. arg1, arg2 OUT N/A A list with the variable number of parameters into which the data is read and the format string is applied. Return Values Type ViStatus This is the operational return status. It returns either a completion code or an error code as follows. Completion Code Description VI_SUCCESS Data was successfully read and formatted into arg parameter(s). Error Codes Description VI_ERROR_INV_SESSION VI_ERROR_INV_OBJECT The given session or object reference is invalid (both are the same value). 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 system resources. Description This operation receives data from a device, formats it by using the format string, and stores the resultant data in the arg parameter list. The format string can have format specifier sequences, white characters, and ordinary characters. The white characters—blank, vertical tabs, horizontal tabs, form feeds, new