The text of a manual · part 12 of 26
IRL Programming Reference Manual, pages 111 to 120
Pages 111 to 120 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 111
Using IRL With JANUS Readers
5
For example, this command opens file U as an undimensioned file: OU
Note: C, D, and I commands can use undimensioned files as source files, but not as destination files. If you specify an undimensioned file as the destination, the IRL program will generate a syntax error when compiled.
Specifying the Path for IRL Files The IRL Desktop uses the current directory as the path for program and data files. However, if the current drive is C or D, the first writable drive on the reader becomes the path. You can change the directory or view the current paths using the menus in the IRL Desktop. You can control where IRL files are stored by specifying a default directory path for IRL programs and data files in your AUTOEXEC.BAT file. To set the path for IRL programs •
Add a command with this format to your AUTOEXEC.BAT file: set IM_IRLPROG=[drive:][\directory]
For example: set IM_IRLPROG=e:\sales\programs
You can set IM_IRLPROG to any available drive, even one that you cannot write to. To set the default path for IRL data files •
Add a command with this format to your AUTOEXEC.BAT file: set IM_IRLDATA=[drive:][\directory]
For example: set IM_IRLPROG=e:\sales\data
5-11
Page 112
IRL Programming Reference Manual
If you set IM_IRLDATA to a drive that cannot be written to, the reader defaults to the drive that was current when you opened the IRL Desktop. If that drive cannot be written to, IRL uses the first writable drive on the reader. If you specify the path for a data file within an O command, that path overrides the default path. You cannot specify a path for File 0 with the O command. To view or change the current path for IRL programs and data files •
Choose Change Dir from the File menu. The reader displays the current paths for IRL programs and data files. You can view the paths and exit the screen, or you can change the paths.
Resuming an IRL Program You can exit an IRL program, perform other functions (such as execute DOS commands, run other IRL programs, or put the reader in Suspend mode), and then resume the IRL program exactly where you left off. For more information, see your JANUS user’s manual.
Increasing Available Memory If you see the message “Insufficient memory” when you try to run an IRL program from the IRL Desktop, you do not have enough conventional memory available to run the program and the IRL Desktop. You may be able to free up more conventional memory by following the suggestions in your JANUS user’s manual.
5-12
Page 113
Using IRL With JANUS Readers
5
JANUS-Specific IRL Features Although all IRL commands are described in Chapter 7, “IRL Command Descriptions,” this section lists the IRL commands and options that are useful only on JANUS readers.
Using the IRL Z Command You can execute JANUS reader commands from an IRL program using the IRL Z command. When an IRL program reaches a Z command, it executes the command and continues with the next IRL program statement. If the Z command is not valid, nothing happens. This table lists the reader commands that you can execute with a Z command in an IRL program: Reader Command
IRL Z Command
Change configuration
Z“$+command”
Backlight control
Z“%.data”
Laser on
Z“/.”
Laser off
Z“/%”
Protected field
Z“\x09message”
Set clock
Z“/+ time”
For a description of these reader commands, see your JANUS user’s manual.
Determining the Status of the NiCad Battery Pack You can use the IRL F (Function) command to determine the amount of power that remains in the JANUS reader’s NiCad battery pack. The FP command places the percentage of battery life into the status register (#0). The value ranges from 0 to 100, in increments of 10. For example, a value of 100 indicates that the battery is 100% fully charged.
5-13
Page 114
IRL Programming Reference Manual
Displaying Messages on the Reader To display messages on the JANUS reader while IRL programs are running, you can use the protected field message command. Your message will appear on the bottom line of the reader display, preceded by a tab, and right-justified. To display a message on the reader •
Execute this command in an IRL program: Z"\x09message" where message can contain up to 20 characters (10 characters if the display is set to double-wide characters). You can clear a protected field message by sending another protected field message that contains no data (""). You can also clear a protected field message by exiting the IRL program.
Setting the Reader’s Internal Clock Use the Set Clock command to adjust the JANUS reader’s internal clock. You need to set the clock after you replace the backup battery and when you adjust the clock for Daylight Savings Time. To adjust the reader’s clock •
Execute this command in an IRL program: Z"/+ time" where time must be in one of these formats: YY/MM/DD:HH:MM:SS MM/DD:HH:MM:SS HH:MM:SS MM:SS SS
5-14
Page 115
Using IRL With JANUS Readers
5
Displaying Reverse Video and Blinking Prompts Use the IRL P (Prompt) command to enable reverse video and blinking for prompts and input that are displayed by the IRL program on the JANUS reader. To display reverse or blinking text •
Execute this P command in your program: P"stext" where s is one of these mode switches: \V Reverse video (white characters on a black background) \v
Normal video (black characters on a white background)
\F
Enable blinking
\f
Disable blinking text is the text you want to format You can use more than one video mode switch in a single P command. Your settings remain in effect until you change them with the corresponding disable switch.
For Example: •
A P command with the \V option causes all subsequent characters to be displayed in reverse video until another P command with the \v option returns the display to normal video.
•
A P command with the \F option causes all subsequent characters to blink until another P command with the \f option disables the blinking.
The following command displays the words “Enter the” in reverse video and the word “quantity” in both reverse video and blinking: P"\VEnter the \Fquantity" All subsequent prompts and input are displayed in blinking reverse video until you issue another P command that changes the display characteristics. You can add the \v and \f options at the end of the P command to return to normal video display mode.
5-15
Page 116
IRL Programming Reference Manual
Using the Enhanced Time Command Use the T (Time) command for these tasks: •
Place the number of seconds since midnight into the status register (#0) with the TT command. Use this value to compare the times of different events.
•
Place the day of the year into the status register (#0) with the TD command. The value is formatted as YYYYDDD, where YYYY is the century and DDD is the day from 001 to 366 (accounting for a leap year). If you convert the contents of #0 to a string register, you can strip off the century to create YYDDD or strip off the entire year to create DDD. Many manufacturing facilities use the day of the year for record keeping instead of a date (mm/dd/yy).
Transmitting EOF as a Separate Record in IRL IRL normally transmits an EOF (End of File) by appending it to the last record in a file. You can also send an EOF as a separate record by defining the environment variable IM_IRL_SEPARATE_EOF on the JANUS reader. If you set the EOF environment variable to any value, the EOF is transmitted as a separate record after the last record in the file. For example: set im_irl_separate_eof=1
You can make this a permanent or temporary change: •
To permanently define the EOF environment variable for all your IRL programs, add the EOF command to a batch file, such as IRL.BAT or AUTOEXEC.BAT. Remember to restart IRL (if you use IRL.BAT) or reboot the reader (if you use AUTOEXEC.BAT) to have this change take effect.
•
To temporarily define the EOF environment variable, type the EOF environment variable command at the DOS prompt. The command takes effect immediately and lasts until you reboot the reader.
Using Floating Point Registers IRL version 4.1 provides 10 floating point registers, numbered %0 through %9. Use these floating point registers to perform arithmetic operations using dollars and cents. The floating point registers:
5-16
• accept values from ±1.7 x 10-308 through ±1.7 x 10308.
• accept positive and negative numbers.
• have a precision of 15 digits.
Page 117
Using IRL With JANUS Readers
5
Some IRL commands use numeric registers for file indexing, file size, setting input lengths, and other functions. You cannot use floating point registers in these commands. Also, you must specify timeouts with numeric registers, not floating point registers. For more information, see Chapter 7, “IRL Command Descriptions.”
Protecting Program Files Use the EZ (Exit) command to write-protect a program file under MS-DOS. You can view the file, but you cannot edit or delete it. To delete the file, change the read-only bit using the DOS ATTRIB command. For more information, refer to your DOS manual.
Creating a DOS-Text Data File You can transfer a data file to a DOS text file with a new name and format. The XF (Transmit File) command appends a carriage return/line feed to the end of each record in the DOS text file. You can edit this file with any DOS editor. For example, you can collect data and transfer it to a file that you open later in your word processor to complete a monthly report.
5-17
Page 118
IRL Programming Reference Manual
Differences Between 944X and JANUS Readers If you are familiar with the Intermec 944X TRAKKER, you need to be aware of some differences between the 944X and JANUS readers. Feature
Differences
Buffer size
The 944X communications buffer holds 255 characters maximum. Input data is truncated to 128 characters when it was moved to the default string register $0. With IRL 4.X, the default string register $0 holds 250 characters.
Protocol
PC Standard protocol does not support a timeout and termination character from an IRL command when you transmit or receive with the No Protocol modifier (N). Also the PC Standard protocol handler does not support a timeout when transmitting data . The receive timeout is fixed at 15 seconds to maintain DOS compatibility.
Timeout
The 944X has a 5-second default timeout on CTS false with the XM command. The default is disabled on the JANUS reader. You configure a default timeout with the Transmit Abort Timeout reader configuration command.
Function keys
The 944X beeps a warning if you press F1 through F10 when entering any data. The JANUS readers accept F1 through F10 after data.
Protocol handler
Compiling a program after it is downloaded
5-18
Do not use a Z command to configure an active protocol handler on a JANUS. If you must configure a communications protocol, use this sequence of Z commands: Z"$+IS1"
:Select COM port
Z"$+PA9"
:Active Protocol=None
Z"..."
:Configure the protocol parameters
Z"$+PAn"
:Active Protocol=n
The 944X reader displays the message Compiling as it compiles a downloaded program. The JANUS reader does not display a message when you compile a program.
Page 119
Using IRL With JANUS Readers
5
IRL Reader Commands You can use these JANUS reader commands only from the IRL Desktop: •
IRL File, Clear
•
IRL File, Receive
•
IRL File, Transmit
•
IRL Program, Download
•
IRL Program, Exit
•
IRL Program, Resume
•
IRL Program, Run
The commands are described in your JANUS user’s manual.
5-19