Main Content

值Received

Total number of values read from instrument

Description

值Receivedindicates the total number of values read from the instrument. The value is updated after each successful read operation, and is set to0after thefopenfunction is issued. If the terminator is read from the instrument, then this value is reflected by值Received.

If you are reading data asynchronously, use theBytesAvailableproperty to return the number of bytes currently available in the input buffer.

When performing a read operation, the received data is represented by values rather than bytes. A value consists of one or more bytes. For example, oneuint32value consists of four bytes.

Characteristics

Usage

Any instrument object

Read only

Always

Data type

Double

The default value is0.

Examples

Suppose you create a serial port object on a Windows®machine associated with the serial port COM1.

s = serial('COM1'); fopen(s)

If you write theRS232?command, and then read back the response usingfscanf,值Receivedis17because the instrument is configured to send theLF终结者。

fprintf(s,'RS232?') out = fscanf(s) out = 9600;0;0;NONE;LF s.ValuesReceived ans = 17

See Also

Functions

fopen

Properties

BytesAvailable