SerOut
| Description: | Send Serial Port Byte. This statement sends a byte to the transmit buffer. |
| Returns: | Nothing |
Usage: ![]() |
Script Only. |
| Function Groups: | Serial Port, String and Buffer |
| Related to: | COMPort | SerCheck | SerIn | StrLen | SerRcv | SerRTS | SerSend | SerStrEsc | SerString | SerWait |
Format: ![]() |
SerOut(Port, Value) |
| Parameters: |
| Port |
| Required. Any numeric expression for the serial port number (opened with a ComPort function) or any stream value. |
| Value |
| Required. 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. |
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.
