Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 18 of 26

IRL Programming Reference Manual, pages 171 to 180

Pages 171 to 180 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 171

Q (Quit Subroutine)

7

If you execute a Q command when the program is not in a subroutine, a fatal error occurs and the program stops executing. Notes IRL v4.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.

Examples Q

: Quit subroutine.

Q#4=6

: If register #4 equals 6, quit the subroutine.

Q[A(2)]<#1 : If the length of the string in record 2 of file A is less : than the number stored in #1 then quit the subroutine. Q"Wrong box"=$0 : If the string in $0 is Wrong box, then quit the : subroutine. QA(0)>"starz"

: If the string in $0 is less than "starz", then quit : the subroutine. If A(0) = "start", then QA(0) is less : than "starz" so the argument is false and the program : does not quit the subroutine.

Q$2>="@100"

: The @ can be any letter, uppercase or lowercase. If : the string in $2 is greater than or equal to a100 to : z100 or A100 to Z100, then quit. If $2 = "L95", then : $2 is less than a100 to z100, and A100 to Z100, so : the argument is false and the program does not quit : the subroutine.

7-39

Page 172

R (Record)

R (Record) Purpose:

Copies the contents of a string register to the next available record in an open file, increments the record pointer, and clears the register.

Syntax:

R [a]

Parameters:

Return Value: Notes:

a is the source register and/or the target file in the following format: $n

Copy the string in $n to the next available location in default file 0, and then clear $n.

F

Copy the string in $0 to the next available record in file F, and then clear $0.

$nX

Store the string in $n to the next available record in file X, and then clear string $n.

None. If you do not select a modifier for a, the command uses the default register ($0) and default file 0. If the string register $n is empty, nothing is stored and the record pointer is not incremented. The program displays a message and terminates in any of these conditions: •

The default file buffer overflows.

•

The maximum number of records (65,535) for the default file is exceeded.

•

The specified number of records for a data file is exceeded.

Examples R

: Store the contents of register $0 in the next available : record of default file 0 (zero).

R$3

: Store the contents of register $3 in the default file 0.

RA

: Store the contents of register $0 in the next available : record of file A.

7-40

Page 173

S (Call Subroutine)

7

S (Call Subroutine) Purpose:

Performs a branch to a subroutine in the program, jumping the program pointer to .Label. Program execution returns from subroutine once a Q (Quit Subroutine) command is reached. The S command can be conditional.

Syntax:

S [expression] .Label

Parameters:

.Label is a defined label in the program that marks the beginning of a subroutine. expression is an optional numeric or string conditional expression. The Call Subroutine 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.

An S 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-41

Page 174

S (Call Subroutine)

When program execution jumps to the subroutine, the current location is stored until a Q (Quit Subroutine) command is reached. The program pointer returns to the statement immediately following the S command. A subroutine can call another subroutine or call itself recursively. The maximum number of nested subroutines is 20. Undeclared labels or subroutines without a Q command cause compiler errors. Do not use try to branch out of a subroutine with a G (Goto) command. A G command that points to a label outside the subroutine may cause a runtime error and is a poor programming technique.

Examples S.Left

: Jump to the subroutine .Left.

S#4=6.Step2

: If register #4 = 6, then branch to .Step2.

S[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, then : branch to .Short. S$0="Wrong box".Wrong : If the string in register $0 is Wrong box, then : branch to .Wrong. SA(0)>"star".Label

: If A(0) is greater than "star", then branch to : .Label. If A(0) = "start", then the argument is : true and the program branches.

S$2<>"Part#".ALPHA

: If $2 is not equal to Part0 through Part9 then : branch to .ALPHA. If $2 = "PartA", then the : argument is true and the program branches.

7-42

Page 175

T (Time)

7

T (Time) Purpose:

Appends the current time to $0 or sets the system time using the value in $0.

Syntax:

T [t]

Parameters IRL v2.X:

t is one of these optional modifiers: A Appends the full time and date to $0 as >YY/MM/dd:hh:mm:ss. S

Parameters IRL v4.X:

Set the time to the contents of $0 (ddhhmmss).

t is one of these optional modifiers: A Appends the full time and date to $0 as >YY/MM/dd:hh:mm:ss. D Places the day of the year into #0 as YYYYDDD. YYYY is the year and DDD is the day from 1 to 366.

Return Value: Notes:

S

Set the time to the contents of $0 (ddhhmmss).

T

Places the number of seconds since midnight into #0.

None. If the reader is configured for time without seconds, the time string is set without seconds and appended to $0 without seconds (:ss). When you set the time, the data in $0 must be formatted as either "DDHHMMSS" or"DDHHMM" depending on the setting for seconds. If the data contains too few characters, zeros are added for missing characters. If the data contains too many characters, the excess characters are ignored. You can set the year and month (YY/MM) using the Set Clock reader command (/+) with the IRL Command Z.

Notes IRL v4.X:

On JANUS readers, seconds are always included in the time. You can use the set IM_IRL_NO_SECONDS=n environment variable to disable including seconds in the time. See Chapter 5, “Using IRL With JANUS Readers,” for help with setting environment variables.

7-43

Page 176

T (Time)

Examples T

: Append >dd:hh:mm:ss to $0 and configure the reader for : time with seconds.

TA

: Append >YY/MM/dd:hh:mm to $0, and configure the reader for : time without seconds.

TS

: Set the internal clock to the data in $0, and configure the : reader for time with no seconds. For example: : If $0 contains 012104, the clock is set to day 01, 21 : hours, 04 minutes, and seconds are disabled. : If $0 contains 012, the clock is set to day 01, 20 hours, : 00 minutes, and seconds are disabled. : If $0 contains 012160, the string is ignored because the : value for minutes (60) is invalid.

7-44

Page 177

U (Unedited Input)

7

U (Unedited Input) Purpose:

Receives unformatted data from the keypad, keyboard, or scanner and appends it to $0.

Syntax:

U [a b c] [;time]

Parameters:

a, b, and c are input modifiers. Choose up to three: E

Edited input. Reader commands, including multiread, are received and executed.

D Display incoming data. W Wand or scanner input only. Do not use with K. K Keypad or keyboard input only. Do not use with W. ;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. 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. Any value greater than 4 indicates the command was successful. For a detailed list of status codes, see the A (ASCII) command earlier in this chapter.

Notes:

Data is appended to the contents of $0. If $0 is full, excess data is lost. A U command without the E modifier does not check the input for reader commands. For example, if the Exit Program command (/$) is entered, the program does not exit. A limited set of reader commands is always edited from a host computer. Refer to your reader manual for details.

7-45

Page 178

U (Unedited Input)

The types of bar code symbologies that can be read with this command depend on the reader configuration. Your reader always accepts Code 39 input for reader commands. You can disable Code 39 data input. 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.

Examples U

: Wait for any input.

UD

: Wait for any input and display it.

UED

: Wait, edit input, and display it (same as A command).

UK

: Wait for any keyed input.

UW;#9

: Wait for time specified in register #9, then accept only : scanned data.

7-46

Page 179

V (Universal Input)

7

V (Universal Input) Purpose:

Accepts input from any source in any format.

Syntax:

V [a b c d e f g h] [;time]

Parameters:

a through h are optional modifiers. Choose up to eight, in any order: B

Beep after a good input.

D Display incoming data. E

Edit incoming data. Reader commands are parsed and executed.

K Keyed input (device dependent). M Modem (host) input. For IRL v4.X, use 1 instead of M to indicate the COM1 port. S

Scanner or wand input.

T

Terminal input. For IRL v4.X, use 4 instead of T to indicate the COM4 port.

P

Modem Protocol enabled (default).

N No Modem Protocol. 1

COM1. For IRL v4.X, use 1 instead of M to indicate the COM1 port.

4

COM4. For IRL v4.X, use 4 instead of T to indicate the COM4 port.

;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. 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

The input was received. The user-defined timeout elapsed before the data was fully received.

7-47

Page 180

V (Universal Input)

Return Value IRL v4.X:

Register $0 contains the input string. Register #0 (status register) indicates the result of the input. Any value greater than 4 indicates the command was successful. For a detailed list of status codes, see the A (ASCII) command earlier in this chapter.

Notes:

For information on protocols, see your JANUS user manual. 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. See your reader manual for details on a specific reader command. The types of bar code symbologies that can be read with this command depend on the reader configuration. Your reader always accepts Code 39 input for reader commands. You can disable Code 39 data input. Status values from 1 to 5 indicate host, terminal, keypad, or keyboard input. Status values from 6 to 16 indicate wand or scanner input.

Examples V

: Wait for any input.

VTMB

: Wait for terminal or modem input only, beep after input.

VDKSEB

: Wait for any input and edit. Display data and beep after : input. (Same as A command.)

VSMN;6000

: Wait 1 minute for scanner, wand, or modem input. No : protocol for modem.

7-48