The text of a manual · part 19 of 26
IRL Programming Reference Manual, pages 181 to 190
Pages 181 to 190 of 260
The original document is the PDF (666 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 9445, Intermec 9550, Intermec 9560 and Intermec 9512
Page 181
W (Wait)
7
W (Wait) Purpose:
Pauses before executing the next program instruction.
Syntax:
W [v]
Parameters: Return Value: Notes:
v is an optional time from 1 to 65 seconds. None. The default wait time is 1 second.
Examples W
: Wait one second before executing next instruction.
W9
: Wait nine seconds before executing next instruction.
7-49
Page 182
X (Transmit Data)
X (Transmit Data) Purpose:
Transmits data from modem, terminal, or communications port. IRL v4.X also uses the XF command to copy an open file to another DOS file. The new file includes a termination character after each record so that you can open and edit the file with a standard DOS text editor.
Syntax IRL v2.X:
X port protocol ,data [;time]
Syntax IRL v4.X:
X port protocol ,data [;time] XF data "filename" [append] [,char]
Parameters:
port selects the reader port: For IRL v2.X
For IRL v4.X
M Modem port T Terminal port
1 or M COM1 2 COM2 (J2010 and J2050 only) 4 or T COM4 (RF only)
protocol selects the protocol: P Transmit with protocol N Transmit with no protocol data specifies the data to transmit as follows: A...Z $n F(n) 0
Entire data file Any string register A specific record in a specific file Default data file
F specifies an IRL source data file to copy to a DOS filename. filename is a DOS path and filename enclosed in quotation marks. If you omit the path, the file is written to the same drive and directory as the other data files. Parameters:
append specifies whether to append data to a file: A Append data to filename. (Default setting) O Overwrite existing data in filename. If you omit append, then the data is appended to the file.
7-50
Page 183
X (Transmit Data)
7 char is the termination character for each record in the DOS file. The default character is a carriage return with linefeed. You can specify non-printable ASCII characters with \0xhh as described in the Notes below. time sets the transmit timeout period from 1 to 6500. The time limit is (time X 10) milliseconds. The transmit timeout applies only to transmissions with protocols involving CTS, XON/XOFF, or polling. If no poll, CTS or XON character is received within the time limit, the transmission is terminated. Each poll received restarts the timeout count. Return Value:
Register #0 (status register) indicates the result of the transmission: 0 1 2 3
Notes:
Successful transmit Transmit failed The user-defined timeout elapsed before the transmit completed Xmodem transmit failure
JANUS RF readers use COM4 as the terminal port. On a reader without a terminal port or COM4, the XTN and XTP commands are ignored. The value in the status register (#0) is set to zero (successful transmission). When protocol is selected, the current reader protocol is used. You can change the protocol using the Z command and the appropriate reader commands. When you transmit data to a port, you can send ASCII control characters using backslash (\) sequences. \n Line feed \b Backspace \r Carriage return \0xhh Any ASCII character, where hh is the hex value You can generate control characters using the \0xhh instruction, where hh represents the two hexadecimal digits for the desired character. For example, \0x7F is the Delete character. For a list of ASCII hex codes, see the ASCII chart in Appendix A.
Notes TRAKKER:
If a transmit timeout is specified, it overrides the default CTS timeout of 5 seconds.
7-51
Page 184
X (Transmit Data)
Notes IRL v4.X:
You must load a protocol handler to transmit files with this command. If a protocol handler is not loaded or it is not active, then the X command is ignored. You do not need a protocol handler to copy the file to disk. The PC Standard protocol handler does not support a timeout or termination character from an IRL command when you transmit with the No Protocol modifier (N). The PC Standard protocol handler does not support IRL a timeout when transmitting data.
Examples XTN,$0
: Send register $0 to the terminal without protocol.
XMN, A(#7) : Send the record in file A defined by register #7 to the : modem port without protocol. XMP,0;100
: Send the default file 0 to the modem with protocol. A : timeout occurs within one second if no poll occurs, no XON : is received, or CTS remains false.
XMP,Z
: Send file Z to the modem port with protocol.
DA(0)="\0x7F" : When this command and the next one are executed on the XTP,A : a JANUS RF unit, the DELETE character is sent out COM4.
7-52
Page 185
Y (Receive Data)
7
Y (Receive Data) Purpose:
Receives data from a modem or terminal port.
Syntax:
Y port protocol [,data] [;time]
Parameters:
port selects the reader port:
Parameters:
For IRL v2.X
For IRL v4.X
M T
1 or M 2 4 or T
Receive from modem port Receive from terminal port
COM1 COM2 (J2010 and J2050 only) COM4 (RF only)
protocol selects the protocol P Receive with protocol N Receive with no protocol data specifies the destination filename or the termination character. If you are receiving with protocol (P option), then data is a filename. If you are receiving without protocol (N option), then data is a termination character. A...Z 0 char
Specific data file Default data file 0 Any ASCII character
The termination character indicates the end of the data string when no protocol is selected. You can use backslash character sequences for ASCII control characters. \\ Backslash \n Line feed \b Backspace \r Carriage return \0xhh Any ASCII character, where hh is the hex value Parameters:
You can generate control characters using the \0xhh instruction, where hh represents the two hexadecimal digits for the desired character. For example, \0x7F is the Delete character. For a list of ASCII hex codes, see the ASCII chart in Appendix A. ;time Sets the receive timeout period from 1 to 6500. If the reader does not completely receive the data within (time X 10) milliseconds, the next statement is executed.
7-53
Page 186
Y (Receive Data)
For IRL v2.X, any partially accumulated input is discarded. For IRL v4.X, partially accumulated input is stored in $0. The timeout count is reset each time the input command receives one character of input. If you do not specify a timeout, the command waits indefinitely for input. Return Value IRL v2.X:
Register $0 or the specified file contains the input data. Register #0 (status register) indicates the result of the input: 0 1 2 3 4 5
Return Value IRL v4.X:
Input successfully received Timeout occurred before the data was fully received Overflow or termination character not found within 128 characters Parity error Protocol error Incorrect terminal mode (95XX readers must be in buffered or transparent mode when using YTP[...] or YTN[...].)
Register $0 or the specified file contains the input data. Register #0 (status register) indicates the result of the input: 0 1 2 3 4 5
Notes:
Input successfully received Timeout occurred before the data was fully received Termination character was not found within 250 characters Parity error Protocol error COM4 not connected (no RF available)
Data is appended to the contents of $0. If $0 is full, excess data is lost. All input is parsed for reader commands and valid reader commands are executed. If the Set Clock (/+) or Exit Program (/$) reader commands are the first characters of a message from the selected communications port, they are executed immediately. See your reader manual for details on a specific reader command. JANUS RF readers use COM4 as the terminal port. RF protocol is always used, so the N and P options are ignored. On a reader without a terminal port or COM4, the YTN and YTP commands are ignored, and the status register #0 indicates a successful receive (0).
7-54
Page 187
Y (Receive Data)
7
When you specify a termination character, input terminates when that character is first encountered and all preceding characters are appended to $0. If $0 is full before the termination character is encountered, then input is terminated and any remaining data is truncated. If you select N (no protocol) and do not specify a termination character, only the first character is stored in $0, unless the reader has a buffered modem and/or a terminal port. See your reader manual for more information. If you specify a destination file for data from a host (with YMP ,file), any existing data in the file is cleared, the input buffer is cleared, and all subsequent data from the host is placed record-by-record into the file until an EOF character occurs or a timeout indicates “end of file” (depending on protocol). Any data that does not fit into the file is discarded. Notes TRAKKER: Notes IRL v4.X:
A TRAKKER can receive data to a file only from the modem port and only with protocol (YMP ,file). The PC Standard protocol handler does not support a timeout or termination character from an IRL command when you receive with the No Protocol modifier (N). The PC Standard protocol handler does not support a timeout when receiving data. The receive timeout is fixed at 15 seconds to maintain DOS compatibility.
Examples YTN
: Receive terminal input, no protocol.
YMP
: Receive host input with protocol.
YMN,\0x20
: Receive host input without protocol, use space (20H) as : termination character.
YMP,C
: Receive host input and place into file C.
YMN,C
: Receive host input with the character 'C' being the : termination character. Place data into $0.
YMN,\r;1000 : Receive host input without protocol, use carriage return : as termination character, ten second message timeout.
7-55
Page 188
Z (Execute Reader Command)
Z (Execute Reader Command) Purpose:
Executes a reader control command (including batch configuration commands) from within an IRL program.
Syntax:
Z [string]
Parameters:
string is a string variable, or a literal string containing valid reader commands: $n String register F(n) Record n of file F "string" Literal string enclosed in quotation marks
Return Value: Notes:
None. The command string (string) can be any string. Only valid reader commands are executed, provided a reader command is in the first two characters of the string. IRL does not check the semantics of the reader command string. See your reader manual for information on valid commands.
Notes IRL v2.X:
When you use Z to change user-defined protocol characters, enter the actual character. For example, type Ctrl-F or use a backslash sequence. The IRL editor displays the ASCII control code representation <ACK> if you press Ctrl-F.
Examples Z"$+BV8$-" : Lower the beep volume. Z$3
: Executes command in $3.
ZB(2)
: Executes command in B(2).
Z"$+PG\0x06$-" : Set AFF character to ACK (\0x06 ASCII).
7-56
Page 189
A ASCII Charts