The text of a manual · part 16 of 26
IRL Programming Reference Manual, pages 151 to 160
Pages 151 to 160 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 151
F (Function Output)
7
F (Function Output) Purpose:
Turns status light LEDs on and off. On the 9560, the F command also controls relays and reports their status. On JANUS readers, the F command retrieves the remaining battery life.
Syntax IRL v2.X:
F n...n
Syntax IRL v4.X:
FP
Parameters:
n is the output control bit, one bit per LED. 0 Turn off the LED. 1 Turn on the LED. X Return control of LED to the reader The P option returns the remaining battery life for JANUS readers only.
Return Value IRL v2.X:
None.
Return Value IRL v4.X:
The status register #0 contains the remaining battery life as a percentage (0 to 100) in increments of 10%.
Notes:
If the reader has fewer LEDs than the statement has control bits, the least significant control bits are used. If the reader has more LEDs than there are control bits in the statement, the remaining LEDs are unaffected. This command has no effect on readers without LEDs. Once an IRL program has control of an LED, the program retains control (even after the reader is powered off) until you use the X option to return control to the reader.
Notes IRL v2.1:
You can also use this command to set the relays and check the sense inputs on the 9560 Industrial Transaction Manager. See your 9560 User’s Manual for instructions.
7-19
Page 152
F (Function Output)
Examples F01000
: On a reader with only four LEDs, this statement with five : control bits turns on LED 1 and turns off LEDs 2, 3, and 4 : because the least significant control bits are used.
FX11
: Returns control of LED 1 to the reader and turns on LEDs 2 : and 3, which remain under IRL controll.
F0X
: Turns off LED 1 and returns control of LED 2 to the reader.
7-20
Page 153
G (Goto)
7
G (Goto) Purpose:
Performs a branch in program, jumping the program pointer to the first instruction following the label. The Goto command can be conditional.
Syntax:
G [expression] .Label
Parameters:
.Label is a label defined in the program. expression is an optional numeric or string conditional expression. The Goto command is performed if the expression is true. Expressions are in this form: a operator b For numeric expressions, a and b are numeric registers, floating point registers, string lengths [$n], or literal numbers. For string expressions, a and b are string registers, file records, or literal strings. You can use these wild card characters in a literal string: ? Any alphanumeric character # Any number @ Any letter (uppercase or lowercase) operator is one of these conditional operators:
Return Value:
Notes:
All Versions
IRL v2.2 and Higher
< = >
<= less than or equal <> not equal >= greater than or equal less than equal greater than
None.
A G command without an expression always branches from the program sequence to the specified label. The relative value of an alphanumeric character or punctuation mark is determined by its hexadecimal value. For a list of ASCII hex codes, see the ASCII chart in Appendix A.
7-21
Page 154
G (Goto)
Notes: IRLv4.X
When you use floating point registers in a comparison, the first operand must be a floating point register. The second operand may be either a floating point register or a numeric value. If you use a value, it must include a decimal point as part of the value. A label starts with a period, which is the same character as a decimal point. For the G command to distinguish between the value and the label, the value must include a decimal point. The value 123.00 may be written as 123. or as 123.00.
Examples G.Left
: Go to the label .Left (unconditional).
G%1<123.45 .123
: Go to the label .123 if %1 is less than 123.45.
G[A(2)]<#1.Short : If the length of the string in record 2 of file A is : less than the number stored in register #1, the : program branches to the label .Short. G$0="Wrong box".Wrong : If the string in the register $0 is "Wrong box," : the program branches to the label .Wrong. GA(0)>"star".Label
: If A(0) = "start", then A(0) is greater than : "star". The the program branches to the label : .Label.
GA(0)>"starz".Label
: If A(0) = "start", then A(0) is less than : "starz". The program does not branch to the : label .Label.
G$2<>"Part#".ALPHA
: If $2 = "PARTA", then $2 is not equal to PART0 : through PART9. The argument is true and the : program branches to the label .ALPHA.
7-22
Page 155
H (File Position)
7
H (File Position) Purpose:
Either sets or finds the record location for the next implicit R (Record) command.
Syntax:
H a= b
Parameters:
Set Record Location: a b
Filename (A - Z) Numeric register or literal number
Find Record Location: a b Return Value: Notes:
Numeric register Filename (A - Z)
None. This command is only valid on files that have been previously opened. The maximum record location is the last record number in the file. When a file is full, it still returns the last record number. Check the last record for a value other than null to indicate a file full condition.
Examples HA=0
: The next write to A will be to record 0 (zero). All : previous records in file A are purged.
HB=#1
: The next write to File B will be to the record defined by : the value of register #1. All records above the new record : location are cleared.
H#7=Z
: Save the next record location of file Z in register #7.
7-23
Page 156
I (Insert)
I (Insert) Purpose:
For IRL v2.X, appends a literal string to the contents of a string register. For IRL v4.X, inserts string data anywhere in a file, appends data to the end of a file or a string register, or deletes a record from a file.
Syntax IRLv2.X:
I [$n] "string"
Syntax RLv4.X:
I [dest] [act] data
Parameters IRLv2.X:
$n is the target string register. If you omit $n, the default register $0 is used. "string" is the alphanumeric string, enclosed in quotation marks.
Parameters IRLv4.X:
dest is the destination. If you omit dest, then default register $0 is used. dest is one of these options: A .. Z Dimensioned data file $n String register act is the optional action, insert or delete: In Dn
Inserts the data before record n in file dest Deletes record n in file dest (if it exists)
data is the data to insert and is one of these options: "string"Alphanumeric string enclosed in quotation marks $n String register $n Return Value: Notes:
None. For compatibility with earlier versions of IRL, you can specify "string" without quotation marks. Without the quotation marks, all information after the I command is appended, even comments. If the insert string fills the string register, the excess characters are lost. IRL v2.X holds 128 characters. IRL v4.X holds 250 characters. If you specify an undimensioned file as a destination for I, the compiler generates a syntax error.
7-24
Page 157
I (Insert)
7
Examples I"Hi Mom!"
: Appends Hi Mom! to the contents of $0 (default register).
I$2"Hi Dad" : Appends Hi Dad to the contents of register $2. IAI25"Done" : IRL v4.X. Inserts Done into file A before record 25. IBI30$0
: IRL v4.X. Inserts the contents of $0 into file B before : record 30.
ICD35
: IRL v4.X. Deletes record 35 in file C (if it exists).
7-25
Page 158
K (Keyboard Input)
K (Keyboard Input) Purpose:
Accepts input from the keypad or keyboard and places the ASCII characters into string register $0. Readers running IRL 2.X accept up to 128 characters. Readers running IRL 4.X (JANUS readers) accept up to 250 characters.
Syntax IRL v2.X:
K [len, len, len] [;time] K [len, len, len, len, len ] | [mask] [;time]
Syntax IRL v4.X: Parameters:
len is a number or numeric register that indicates an acceptable length for input data. The reader only accepts input that matches one of the specified lengths. For example, K4 only accepts data that is 4 characters long. For IRL v2.X, you can set up to three lengths. For IRL v4.X, you can set up to five lengths. The lengths can be a fixed value (such as 10) or a range (such as 2-4). For example, A 2-4,10 accepts a string that is two, three, four, or ten characters long. You cannot specify a length and a data mask. If you omit len, then data of any length is accepted. mask is a data mask that only accepts input that matches the format you define with wild card characters. ? Any alphanumeric character # Any number @ Any letter (uppercase or lowercase) For example, the following command only accepts input that contains three letters, a dash, and three numbers. A"@@@ - ###" You cannot define a length and a mask in the same statement. If you omit len and mask, then data of any length is accepted. ;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-26
Page 159
K (Keyboard Input)
7
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. Return Value IRL v2.X
Register $0 contains the input string. Register #0 (status register) indicates the result of the input: 0 1
Return Value IRL v4.X:
The input was received. The user-defined timeout elapsed before the data was fully received.
Register $0 contains the input string. Register #0 (status register) indicates the result of the input: 0 5
Input timeout Keypad input
For a detailed list of input status codes, see the A (ASCII) command in this chapter. Notes:
Data 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. See your reader manual for details on a specific reader command. All valid data is shown on the reader display. When you specify an entry length, the program only accepts input of that length. When you specify more than one length, the program only accepts input that matches one of the specified lengths. When you use a numeric register to define a fixed-length entry, values greater than the maximum length (128 or 250) are treated as 128 and 250, depending on the IRL version.
Notes IRL v4.X:
You can use the set IM_IRL_STAT=n environment variable to use the IRL v2.X return values on JANUS readers. See Chapter 5, “Using IRL With JANUS Readers,” for help with setting environment variables.
7-27
Page 160
K (Keyboard Input)
Examples K
: Accepts variable-length input with no timeout.
K6,3,2
: Accepts entries six, three, or two characters long.
K#2,6;6500 : Accepts input the length of the value in register #2 : or input that is six characters long. Timeout is 65 sec. K"@@@-###" : IRL 4.X. Accepts input that contains three letters, a : dash, and three numbers.
7-28