Specifications

Section 12. Serial Input and Output Functions
12-8
The ComPort parameter specifies the communication port that should be
closed.
This instruction runs sequentially from the processing task sequencer,
regardless of whether the datalogger is in pipeline or sequential mode.
SerialFlush (ComPort)
The SerialFlush instruction is used to clear any characters in the serial input
buffer.
Syntax
SerialFlush ( ComPort )
Remarks
This instruction clears the buffer and leaves the port open. If the input buffer
should be cleared before each execution of SerialIn, place SerialFlush in the
code before the SerialIn instruction.
The ComPort parameter specifies the communication port buffer that should be
cleared.
This instruction runs sequentially from the processing task sequencer,
regardless of whether the datalogger is in pipeline or sequential mode.
SerialIn (Dest, ComPort, TimeOut, TerminationChar, MaxNumChars)
The SerialIn instruction is used to set up a communications port for receiving
incoming serial data.
Syntax
SerialIn ( Dest, ComPort, TimeOut, TerminationChar, MaxNumChars )
Remarks
Incoming data is stored in the destination array until the TerminationChar is
received, MaxNumChars value is met, or the TimeOut parameter is exceeded.
Incoming characters are buffered in ring memory, the size of which is
determined by the SerialOpen parameter. The buffer can be cleared using the
SerialFlush instruction.
The SerialIn instruction has the following parameters:
See the CRBasic Editor help for parameter details.
This instruction runs sequentially from the processing task sequencer,
regardless of whether the datalogger is in pipeline or sequential mode.
SerialInBlock (ComPort, Dest, MaxNumberBytes)
The SerialInBlock instruction stores incoming serial data. If set equal to a
variable or used in place of an expression, it will return the number of bytes
received.