
CONFIG C ommands - 6
CONFIG COM$
Tasking Statement
SYNTAX: CONFIG C OM$ n,terminator, length,XON ,echo
PURPOSE: To configure a communication port to interr upt when the progr ammed conditions are met.
REMARK S: The CONFIG COM $ statement is used in conjunction with the ON COM $ statement so that the
foreground program is interrupted when either a specific message length has been received or a
specified termination character has been received.
n = legal serial port number.
The terminator is equal to the termination character of the incoming string. This is normally a
carriage retur n (13) but it ma y be any character from 1 to 127. If you specify 0, C AMBASIC will
not test for a terminator.
In some cases there is no termination character. The length of the message is always the same. In
this case the length parameter should be set to the message length. T he range is 1 to 127 char acters.
If you specify “0”, CAMBASIC will not check for length.
The XON parameter enables or disables XON/X OFF protocol checking by the serial port. Setting
this param eter to ” 1” enables the pr otocol, and setting it to “ 0” disables the protocol.
The echo param eter determines when the in coming characters are to be echoed. W hen a “ 1” is
specified, the characters are echoed. Characters ar e not echoed when the parameter is “ 0”.
See the Multitasking Chapters for more inform ation.
RPC-2350 NOTE: The CAM BASIC statement BIT 128,4, 0 may need to be executed before you
will receive any characters. This command enables the CTS line to the sender.
RELATED: ON COM$, COM$
EXAMPLE: 10 CONFIG COM$ 2,13,0,0,0
This exam ple configur es COM2 so that the term inator is a ca rriage return. T here is no length
checking, XON/X OFF protocol and no character echo.
ERROR: < Data negative> – for n,terminator,length,XON ,echo
< Data out of range> – if n is not 1, 2 or 3; terminator or length > 127;
XON or echo > 1
Kommentare zu diesen Handbüchern