| Instrument Control Toolbox | ![]() |
Specify if the bytes-available event is generated after a specified number of bytes are available in the input buffer, or after a terminator is read
Description
For serial port, TCP/IP, UDP, or VISA-serial objects, you can configure BytesAvailableFcnMode to be terminator or byte. For all other instrument objects, you can configure BytesAvailableFcnMode to be eosCharCode or byte.
If BytesAvailableFcnMode is terminator, a bytes-available event occurs when the terminator specified by the Terminator property is read. If BytesAvailableFcnMode is eosCharCode, a bytes-available event occurs when the End-Of-String character specified by the EOSCharCode property is read. If BytesAvailableFcnMode is byte, a bytes-available event occurs when the number of bytes specified by the BytesAvailableFcnCount property is available.
The bytes-available event executes the M-file callback function specified for the BytesAvailableFcn property.
You can configure BytesAvailableFcnMode only when the object is disconnected from the instrument. You disconnect an object with the fclose function. A disconnected object has a Status property value of closed.
Characteristics
| Usage |
Any instrument object |
| Read only |
While open |
| Data type |
String |
Serial, TCP/IP, UDP, and VISA-serial
{terminator} |
A bytes-available event is generated when the terminator is reached. |
byte |
A bytes-available event is generated when the specified number of bytes available. |
GPIB, VISA-GPIB, VISA-VXI, and VISA-GPIB-VXI
{eosCharCode} |
A bytes-available event is generated when the EOS (End-Of-String) character is reached. |
byte |
A bytes-available event is generated when the specified number of bytes available. |
Functions
Properties
BytesAvailableFcn, BytesAvailableFcnCount, EOSCharCode, Status, Terminator
| BytesAvailableFcnCount | BytesToOutput | ![]() |