58
EM1500 Configuration
Special Characters in a Token
If an expect token starts with an “&” character, this has special meaning: the “&” is
stripped off the expect token, and no timeout is applied. This is useful for “auto
answer” scripts where there is an indefinite wait time.
If a send token is prefixed with “#” then the CRLF that is normally appended to the
token, when sent, is suppressed. To send just a CRLF, specify “#\r\n” as the send
token.
If an expect token is prefixed with “#” (after the “&”, if any) then the comparison is
performed in a case-insensitive manner, otherwise the expect token must be matched
exactly. No CRLF is expected, unless you explicitly specify it, e.g., “login:\r\n”.
Either a send or expect token may be prefixed with “@” (after the “&” or “#”, if any).
This sets a pause timer of 1.5 seconds which has to time out before the send token is
sent, or before incoming data are examined for matching the expect token. Incoming
data are discarded during the pause interval, so this feature should be used with cau-
tion when prefixing an expect token, since the expected data may be discarded during
the pause!
The token sequence is separated by white space. If it is desired to include whitespace
in a token, then the token should be wrapped in single quote characters.
A backslash (\) character in a token denotes an “escape sequence” for inserting special
characters, as follows:
\nnn
From 1 to 3 octal digits (0-7). This sequence represents the octal value
of a character e.g. \377 represents the decimal character number 255;
\1 represents control-A. If fewer than 3 octal digits are intended, then
the next character must not be an octal digit.
\r\n
Represents carriage return followed by newline. Other special charac-
ters modelled after C syntax: \r CR; \n NL; \b BS; \t TAB; \f FF.
Any other character following the backslash stands for itself, e.g., \\ specifies a single
backslash, \' stands for a single quote. A single backslash at the end of a token is a
syntax error.
String sizes
Send and expect strings are limited in size to 30 characters.
This size is counted after performing any escape sequences and string substitutions.
You must be careful not to exceed this limit since there is no indication of exceeding
this limit: any extra data are quietly discarded and only the first 30 characters will be
matched.
Error handling
If the script has syntax errors, they may not be discovered until the script executes.
Current syntax errors are unbalanced quotes and trailing unescaped backslash. If there
is an error in the script, then polling will be turned off.
Содержание EM1500
Страница 14: ...10 www rabbit com Introduction...
Страница 22: ...18 www rabbit com Getting Started...
Страница 76: ...72 www rabbit com EM1500 Configuration...
Страница 90: ...86 www rabbit com EM1500 Specifications...
Страница 104: ...100 www rabbit com Serial and TCP Protocols...
Страница 118: ...114 www rabbit com EM1500 FAQ...