SerOut

Description:              Send Serial Port Byte. This statement sends a byte to the transmit buffer.

Returns:                    Nothing

Usage:                   Script

Format:                      SerOut(Port, Value)

Parameters:             Port    { numeric }  { required }  { no default: }

                                                Any numeric expression for the serial port number (opened with a ComPort function) or any stream value.

                                    Value    { numeric }  { required }  { no default: }

                                                Any numeric expression which gives the byte value to send. Value must be in the range 0 to 255.

Comments:               The byte will not be sent if the transmit buffer is full.

This statement may only appear in a script.

Example:

If MatchKeys(2, "t");

[

  SerOut(2, Cond(chkSum == calcChksum, 6, 21);

]

This waits until the operator presses the "t" key, then it compares chkSum to calcChksum. If equal, a 6 byte (ASCII ACK) is sent. If not equal, a 21 byte (ASCII NAK) is sent. The serial port used is 2.

See Also:

ComPort | SerCheck | SerIn | SerLen | SerRcv | SerRTS | SerSend | SerStrEsc | SerString | SerWait