Page 2
The information contained herein is proprietary and is provided solely for the purpose of allowing customers to operate and/or service Intermec manufactured equipment and is not to be released, reproduced, or used for any other purpose without written permission of Intermec.
Warranty Information ix Cautions and Notes ix About This Manual ix Other Intermec Manuals xii Getting Started What Is the 5055 PSK? 1-3 Installing the Programmer’s Software Kit 1-3 Microsoft C/C++ Version Requirements 1-4 What’s Next? 1-5 Programming Guidelines What Is the PSK Library? 2-3...
Page 4
Using the Serial Port to Transfer Applications and Files 3-7 Converting Trakker Antares, 6400, and JANUS Applications to 5055 Applications Differences Between Trakker Antares, 6400, JANUS, and 5055 PSK Functions 4-3 Creating Compatible Applications 4-4 Compatible Functions 4-4 Using Status Code Macros 4-5...
Page 7
MSI 7-24 Parity 7-25 Postamble 7-25 Preamble 7-27 Start of Message (SOM) 7-28 Stop Bits 7-29 Time and Date 7-30 Time in Seconds 7-31 UPC/EAN 7-32 Status Codes Using the Status Code Return Values A-3 5055 Status Code Return Values A-3...
Page 8
5055 Programmer’s Software Kit Reference Manual Microsoft Visual C/C++ Settings Project Options B-3 Compiler Options: Code Generation B-3 Compiler Options: Memory Model B-4 Linker Options B-5 Directory Settings Example B-5 Full ASCII Charts Full ASCII Table C-3 Full ASCII Bar Code Chart C-6...
To receive a copy of the standard warranty provision for this product, contact your local Intermec sales organization. In the U.S. call 1-800-755-5505, and in Canada call 1-800-668-7043. If you live outside the U.S. or Canada, you can find your local Intermec support services organization on the Intermec Web site at www.intermec.com.
Page 10
Explains how to build, link, compile, and debug applications. Converting Trakker Antares, 6400, and JANUS Applications to 5055 Applications Explains the differences between the Trakker Antares, 6400, JANUS, and 5055 PSK functions. It provides guidelines for converting your applications. PSK Function Descriptions Explains the purpose and syntax for each function.
Page 11
The term refers to Programmer’s Software Kit. PSK refers to the language libraries and the associated manuals. operator The term refers to anyone who runs applications on the 5055. Conventions for Input From a Keyboard or Keypad You should be aware of these formatting conventions for representing input from a keyboard or keypad.
Page 12
Other Intermec Manuals You may need additional information when working with the PSK in a data collection system and for programming the 5055 computers, 6400 computers, Trakker Antares terminals, and JANUS readers. Please visit our Web site at www.intermec.com to download many of our current manuals in PDF format.
DOS applications on a PC, and then you download the application to a 5055. To learn more about your 5055, see the 5055 Data Collection PC User’s Guide (Part No. 961-054-017) and 5055 Data Collection PC Technical Reference (Part No. 978- 054-002).
5055 Programmer’s Software Kit Reference Manual 5. Follow the setup instructions on your screen. 6. When Setup prompts you to view the README file, choose Yes. This file may contain information that was not available when this manual was printed.
You can order Microsoft Visual C/C++ Enterprise Edition v1.52 from Intermec (Part No. 590224). Microsoft Version v1.0 v1.5x v4.x v5.x What’s Next? Once you have installed the PSK library functions, you can begin creating your programs. Use this table to help you decide what to do next.
Intermec functions and valid Microsoft C functions. What Is the PSK Library? The 5055 PSK is a library of C functions for programming the 5055 working in DOS. You can program a 5055 to display prompts and error messages, to collect and display data, and to transmit data to a DCS 30X or a host.
5055 Programmer’s Software Kit Reference Manual Example: Receiving Data From the NET Port or From the Keyboard (continued) char input[1024]; // Input buffer (input from network must be 1024 characters) IM_ORIGIN source; // Source(s) where input is to come from IM_STATUS status;...
Example: Setting Input Mode and Source // This segment sets the 5055 in programmer mode to accept a string of characters. // The string is NOT sent until you press Enter, and you can use backspace to // make a correction before pressing Enter.
5055 Programmer’s Software Kit Reference Manual Sound Function Use the im_sound function anytime to make the 5055 beep. You can use this function to control the volume, pitch, and duration of the 5055 beep. Example: Sound // This segment beeps a high note, pauses 5 seconds, and then beeps a low note.
IM_DECTYPE symbol; // Symbology status = im_receive_input(IM_LABEL_SELECT, IM_INFINITE_TIMEOUT, if ( IM_ISSUCCESS(status)) im_get_label_symbology( &symbol); if ( IM_ISERROR(status)) im_message(status); System Functions Use the system functions to control the 5055 configuration or to set an event timer. im_command im_event_wait im_set_time_event Programming Guidelines &source, input);...
5055 Programmer’s Software Kit Reference Manual Certified Microsoft C Functions This table lists all Microsoft C functions that work with the PSK library functions. The PSK does not support C++, classes, application-wide constructors or destructors, or Windows functions. Note: The PSK requires Microsoft Visual C/C++, Professional Edition v1.0 or v1.5x, which can create 16-bit DOS applications.
Page 27
Certified Microsoft C Functions (continued) acos asctime asin atan atan2 atof atoi atol bsearch calloc ceil clock cosh cputs ctime difftime errno exit fabs fclose fcloseall feof ferror fflush fgetc fgets If you seek beyond the end of file (EOF), fseek returns an error. C display functions will not wrap the line or scroll the display;...
5055 Programmer’s Software Kit Reference Manual Buffer Manipulation Functions Use the buffer manipulation functions to work with areas of memory, byte by byte. A buffer is similar to a character string, but is not terminated with a NULL character (\0).
File Functions Use the file functions to manage file input and output (I/O), such as writing characters to an open file. clearerr fgetc fclose fgets feof fopen ferror fprintf Math Functions Use the math functions to perform various mathematical operations and to convert numbers to ASCII strings and vice versa.
5055 Programmer’s Software Kit Reference Manual String Functions Use the string functions to manipulate ANSI character strings. _fstrcat _fstrcmp _fstrcpy _fstrcspn _fstricmp _fstrlen _fstrlwr _fstrncat _fstrncmp _fstrnicmp _fstrnset Time Functions Use the time functions to retrieve or set the system time. You can use a variety of formats for time.
Unsupported Microsoft C/C++ Functions The following Microsoft C++ functions are not supported from within the PSK but may be used when developing applications. Support for these functions is via the Microsoft tools. _access _dos_allocmem _arc _dos_close _arc_w _dos_commit _arc_wxy _dos_creat _bdos _dos_creatnew _bios_disk...
4. From the Project menu, choose Build. 5. Run and debug the program. 6. Download the application to the 5055. See the procedure in “Using the Serial Port to Transfer Applications and Files” later in this chapter. 7. Run the application on the 5055. From the directory where you loaded the 5055 application, type the application name and press Enter.
4. From the Project menu, choose Build. 5. Run and debug the program. 6. Download the application to the 5055. See the procedure in “Using the Serial Port to Transfer Applications and Files” later in this chapter. 7. Run the application on the 5055.
Building Your Own Program From a Command Line You can build your program from the command line (DOS prompt) instead of from within the Microsoft Visual C/C++ environment. Your compile options for the application to run on the 5055. CFLAGS Settings Required for a Successful Compile Setting /FPi The following examples show the correct settings to use.
The PSK includes a FileCopy utility for transferring files and applications between your PC and a 5055 connected to your PC serial port. FileCopy was installed on your PC when you ran the PSK setup program. The FileCopy utility is installed at Target_Directory/ about using the application.
Page 42
5. To download a file to the 5055, start To upload a file from the 5055, start 6. Click Download to copy the file from the PC to the 5055, or click Upload to copy the file from the 5055 to the PC.
Page 43
Converting Trakker Antares, 6400, and JANUS Applications to 5055 Applications...
Differences Between Trakker Antares, 6400, JANUS, and 5055 PSK Functions The 5055 supports full qwerty keypad input as well as bar code scanning from an attached scanner. The Trakker Antares PSK, 6400 PSK, and 5055 PSK only support Microsoft C/C++.
Note: Be sure that when you compile your program you set the appropriate options for the destination. JANUS PSK, 6400 PSK, and 5055 PSK make files use the 80386 compiler option. Trakker Antares PSK make files use the 8086/8088 compiler option.
Converting Trakker Antares, 6400, and JANUS Applications to 5055 Applications Compatible Functions (continued) im_free_space im_get_config_info im_get_cursor_xy im_get_display_mode im_get_display_size_physical im_get_display_size_virtual im_get_display_type im_get_input_mode im_get_label_symbology im_get_label_symbologyid im_get_length im_get_tx_status im_input_status Note: Incompatible functions and suggested alternatives are listed later in this chapter. For more information, see “Converting Trakker Antares and 6400 Applications to 5055 Applications”...
Renaming a Function The Trakker Antares PSK and 6400 PSK replace some C functions with Intermec functions. For example, im_clear_screen() in the Trakker Antares PSK replaces the Borland C clrscr() function.
Applications.” Converting JANUS Applications to 5055 Applications The JANUS PSK library provides many functions that are not part of the 5055 PSK. If you use any of the incompatible functions, you must change your program or create an include file that traps the unsupported functions.
Page 50
5055 PSK does not support COM2. References to COM4 are treated as NET port by the IM5055.H include file. 5055 does not need to link or unlink to use communications ports. Do not use. Not supported on 5055. Do not use.
5055 PSK has a larger maximum for timeout. See “Setting Timeout Values” later in this chapter. Not supported on 5055. Do not use. Use im_transmit_buffer. 5055 does not need to link or unlink to use communications ports. Do not use. 5055 PSK Display Mode Syntax #include “im5055.h” IM_STATUS im_get_display_mode...
JANUS devices require Programmer mode to use the PSK functions and to execute Interactive Reader Language (IRL) commands. Programmer mode is the default mode for 5055, and it works with all of the keypad input functions. The 5055 does not support IRL commands.
This chapter describes the syntax and parameters for each function in the 5055 Programmer’s Software Kit (PSK) library. Understanding the Function Descriptions The function descriptions in this chapter use these conventions: • The descriptions refer to many named constant variables, such as IM_COM1. These variables always appear in uppercase and are described in IM5055.H.
im_cancel_rx_buffer im_cancel_rx_buffer Purpose: This function clears the receive buffer of the designated communications port. Syntax: #include "im5055.h" IM_STATUS im_cancel_rx_buffer (IM_COM_PORT port_id); IN Parameters: The port_id parameter identifies the communications port as follows: IM_COM1 IM_COM2 IM_NET OUT Parameters: None. Return Value: This function returns one of the standard status codes defined in Appendix A, “Status Codes.”...
IM_TRANSMIT_COMPLETE Attempted to cancel, but message was already sent. IM_NET_ERROR Unknown network error. Notes: This function provides compatibility with the JANUS PSK functions. It is not intended for newer applications and has no effect on the 5055. See Also: im_transmit_buffer Example No example.
im_clear_screen im_clear_screen Purpose: This function erases the entire display and moves the cursor to the upper left corner (home). The display font remains the same. Syntax: #include "im5055.h" void im_clear_screen (void); IN Parameters: None. OUT Parameters: None. Return Value: None. Example See example for im_command.
This function sends reader and configuration commands to the 5055. For example, you can use this function to set the contrast or change the baud rate on the 5055. For a list of reader and configuration commands, see Chapter 6, “Reader Command Reference,” and Chapter 7, “Configuration Command Reference.”...
im_cputs im_cputs Purpose: This function places a string on the screen with the specified attribute at the current cursor location without appending a carriage return and line feed (CR LF) to the string. Syntax: #include "im5055.h" IM_STATUS im_cputs (IM_UCHAR far * string, IM_ATTRIBUTES a ttrib );...
im_cputs_ex Purpose: This function places a string on the screen with the specified attribute at the current cursor location without appending a carriage return and line feed (CR LF) to the string. The cursor remains on the last character of the string. Syntax: #include "im5055.h"...
im_erase_display im_erase_display Purpose: This function erases a portion of the display. Syntax: #include "im5055.h" void im_erase_display (IM_ERASE_CONTROL erase ); IN Parameters: erase Flag that specifies the area to erase and is one of these constants: IM_ALL Erases the entire screen. IM_CURS_TO_END Erases from the current cursor position to the end of the display.
im_erase_line Purpose: This function erases a portion of the current line. Syntax: #include "im5055.h" void far im_erase_line (IM_ERASE_CONTROL fErase ); IN Parameters: fErase Flag that specifies the area to erase and is one of these constants: IM_CURS_TO_END Erases from the current cursor position to the end of the line. IM_START_TO_CURS Erases from the start of the line to the current cursor position.
im_event_wait im_event_wait Purpose: This function waits for one or more events and returns a flag indicating that the event occurred or a timeout occurred. Syntax: #include "im5055.h" IM_STATUS im_event_wait (IM_UINT timeout , IM_ORIGIN far * source ); IN Parameters: timeout Numeric value or a constant: 1 to 65534 ms Numeric range.
im_file_duplicate im_file_duplicate Purpose: This function copies an existing file. Syntax: #include "im5055.h" IM_STATUS (IM_UCHAR * source , IM_UCHAR * destination ) IN Parameter: source Pointer to the source file name. The file name must contain the drive letter and the name. destination Pointer to the destination file name.
Page 67
im_file_duplicate (continued) /* Duplicate the current executable file */ iStatus = im_file_duplicate("c:filesys.bin", "c:im_xxx.bin"); printf("copy: %x\n", iStatus); getch(); /* Check new available free space of file system */ iStatus = im_free_space("c:", &lDisk_space); im_cputs("New free Space:” ,IM_NORMAL) printf(“%ld\n", lDisk_space); getch(); /* Display file's time stamp */ iStatus = im_file_time("c:filesys.bin", <ime);...
im_file_size im_file_size Purpose: This function returns the size of the target file. Syntax: #include "im5055.h" IM_STATUS im_file_size (IM_CHAR *fname , IM_LONG *size ) IN Parameters: fname A pointer to IM_CHAR. This variable points to a string that must include the drive letter and filename.
im_file_time Purpose: This function returns the time stamp of the target file. Syntax: #include IM_STATUS im_file_time (IM_CHAR * fname, time_t far * ltime ) IN Parameters: fname Pointer to IM_CHAR. This variable points to a string that must contain a drive letter and a file name.
im_fmalloc im_fmalloc Purpose: This function allocates a memory block larger than 64K. Syntax: #include "im5055.h" void far *im_fmalloc (IM_ULONG lsize ) IN Parameters: lsize Size of memory in bytes to allocate. OUT Parameters: None. Return Value: This function returns one of these values: Far void pointer Allocation was successful.
Page 71
im_free_mem Purpose: This function returns free memory block information. Syntax: #include "im5055.h" void im_free_mem (IM_ULONG *largest , IM_ULONG *ltotal ) IN Parameters: None. OUT Parameters: largest Pointer to an unsigned long. This function places the amount of the largest available free memory block here. ltotal Pointer to an unsigned long.
im_free_space im_free_space Purpose: This function returns the amount of storage space, in bytes, available on the terminal drive you specify. Syntax: #include "im5055.h" IM_STATUS im_free_space (IM_CHAR *drive, IM_LONG *freespace ) IN Parameters: drive Pointer to IM_CHAR. This variable is a drive letter on the terminal. OUT Parameters: freespace Pointer to IM_LONG.
Purpose: This function retrieves the current 5055 configuration information string and its length. The command code is passed in as a string, and the current configuration is returned in the same string. For a list of reader and configuration commands, see Chapter 6, “Reader Command Reference,”...
im_get_cursor_style im_get_cursor_style Purpose: This function returns the style used to display the cursor. Syntax: #include "im5055.h" IM_CURS_TYPE im_get_cursor_style (void); IN Parameters: None. OUT Parameters: None. Return Value: This function returns a flag indicating cursor style: IM_UNDERLINE Single underline. IM_NO_CURSOR No cursor displayed. Notes: The only supported cursor style is IM_UNDERLINE.
im_get_cursor_xy Purpose: This function retrieves the current cursor position. Syntax: #include "im5055.h" IM_STATUS im_get_cursor_xy (IM_USHORT far *row, IM_USHORT far *col); IN Parameters: None. OUT Parameters: row Pointer to the vertical position. The top of the display is row 0. col Pointer to the horizontal position. The left edge of the display is column 0. Return Value: IM_OK Success.
im_get_display_mode im_get_display_mode Purpose: This function returns the display font, character height and width, and scrolling and wrapping status. Syntax: #include "im5055.h" IM_STATUS im_get_display_mode (IM_FONT_TYPE far * font , IM_UCHAR far * phys_width , IM_UCHAR far * phys_height , IM_BOOL far * scroll, IM_BOOL far * wrap );...
Current setting for the number of rows in the physical display. charswide Current setting for the number of columns in the physical display. Return Value: None. Notes: The default physical display for the 5055 is 80 columns by 25 rows. See Also: im_get_display_mode, im_get_display_type, im_set_display_mode im_get_display_size_physical 5-25...
Purpose: This function gets the hardware display type for the 5055. Syntax: #include "im5055.h" IM_STATUS im_get_display_type (IM_DISPLAY_TYPE * type ); IN Parameters: None. OUT Parameters: type The constant returned is IM_CRT_80X25 (5055 display). Return Value: IM_SUCCESS Success. See Also:...
Purpose: This function provides compatibility with the JANUS PSK functions. This function retrieves the current input mode setting. Input modes affect how the 5055 interprets and stores input. Syntax: #include "im5055.h" IM_MODE im_get_input_mode (void); IN Parameters: None. OUT Parameters: None.
im_get_label_symbology im_get_label_symbology Purpose: This function gets the symbology, such as Code 39, from the most recently scanned label. Call this function after receiving data using im_receive_input or im_receive_field. Syntax: #include "im5055.h" IM_STATUS im_get_label_symbology (IM_DECTYPE far * symb ); IN Parameters: None.
im_get_label_symbologyid im_get_label_symbologyid Purpose: This function gets the AIM symbology ID, such as ]A0, from the most recently scanned label. Call this function after receiving data using im_receive_input or im_receive_field. Syntax: #include "im5055.h" IM_STATUS im_get_label_symbologyid (IM_UCHAR far * symb ); IN Parameters: None.
im_get_length Purpose: This function returns the length of the string received from the designated source by the most recent input function (im_receive_input, im_receive_field, or im_receive_buffer). Syntax: #include "im5055.h" IM_USHORT im_get_length (IM_ORIGIN source ); IN Parameters: source Specifies the source of the input. Choose one of these constants: IM_LABEL_SELECT Label selected.
im_get_postamble im_get_postamble Purpose: This function retrieves the current postamble. Syntax: #include "im5055.h" IM_STATUS im_get_postamble (IM_UCHAR * post_string , IM_USHORT * length ); IN Parameters: None. OUT Parameters: The post_string parameter is the buffer containing the postamble. The length parameter is the length of the postamble. Return Value: IM_SUCCESS Notes:...
im_get_preamble Purpose: This function retrieves the current preamble. Syntax: #include "im5055.h" IM_STATUS im_get_preamble (IM_UCHAR * pre_string , IM_USHORT * length ); IN Parameters: None. OUT Parameters: pre_string Buffer containing the preamble. length Length of the preamble. Return Value: IM_SUCCESS Success. Notes: The buffer must be large enough to contain the preamble string.
im_get_screen_char im_get_screen_char Purpose: This function returns the character at the current cursor position in the 80 x 25 display. Syntax: #include "im5055.h" IM_STATUS im_get_screen_char (IM_UCHAR far *char ); IN Parameters: None. OUT Parameters: char Pointer to the variable for the retrieved character. Return Value: IM_SUCCESS Success.
im_get_text Purpose: This function returns a rectangular section of text and its attributes from the 80 x 25 display. You specify a starting row and column and ending row and column. Syntax: #include "im5055.h" IM_STATUS im_get_text (IM_USHORT start_col, IM_USHORT start_row, IM_USHORT end_col, IM_USHORT end_row, IM_DISPLY_TEXT_S far *text_array );...
Page 88
im_get_text im_get_text (continued) Example /********************* im_get_text ***********************************/ #include "im5055.h" IM_DISPLAY_TEXT_S tArray[100]; IM_UCHAR sArray[100]; IM_STATUS status; void main() im_clear_screen(); /* Print text to be retrieved and put at different location */ for (x = 0; x < 2; x++) im_cputs("AaA",IM_NORMAL); im_puts("BbBbBbBbBbBb",IM_NORMAL); im_cputs("CcC",IM_NORMAL);...
im_get_tx_status Purpose: This function returns the status of the last call to im_transmit_buffer. Syntax: #include "im5055.h" IM_STATUS im_get_tx_status (IM_COM_PORT comport ); IN Parameters: comport Desired communications port: IM_COM1 COM1 input. IM_COM2 COM2 input. IM_NET Network input. None. OUT Parameters: Return Value: This function returns one of these codes: IM_COMM_INUSE Communications port in use.
Page 90
im_get_tx_status im_get_tx_status (continued) Example /********************** im_get_tx_status *****************************/ #include <string.h> #include "im5055.h" void main(void) char szBuffer[1024]; IM_STATUS iStatus, xStatus; IM_USHORT iCommLength; IM_COM_PORT portid; im_clear_screen(); portid = IM_NET; /* transmit buffer and get return status */ xStatus = im_transmit_buffer(portid, strlen(szBuffer),szBuffer,IM_ZERO_TIMEOUT); /* get status of the last call to im_transmit_buffer */ iStatus = im_get_tx_status(portid);...
im_input_status Purpose: This function provides compatibility with the JANUS PSK functions. This function checks to see if any input buffers have data and returns the buffer identification. Syntax: #include "im5055.h" IM_ORIGIN im_input_status (); IN Parameters: None. OUT Parameters: None. Return Value: This function returns one or more of these constants: IM_NO_SELECT No input buffer has data.
IM_APPLI_BEEP Application controls the beep. You code the application to sound a beep when your program design requires one. IM_WEDGE_BEEP Beeps occur automatically. The 5055 always beeps when data is entered. display Determines if the data is displayed as it is entered. The display parameter is one of these constants: IM_DISABLE Disable display of data.
Page 93
im_irl_v (continued) IN/OUT source Determines which input sources are allowed. When the IRL V command Parameters: returns, source indicates where the data came from. When both keypad and label inputs are allowed, the source always returns keypad because it is possible for keyed and scanned data to be intermixed.
Page 94
im_irl_v im_irl_v (continued) IM_CODE_128 Code 128 bar code. IM_I_2_OF_5 Interleaved 2 of 5. IM_MSI MSI bar code. IM_PLESSEY Plessey bar code. IM_UPC Universal Product code. Return Value: This function returns one of these codes: IM_SUCCESS Successfully received input. IM_TIMEDOUT A timeout occurred. Example /********************* im_irl_v **************************************/ #include <conio.h>...
IM_ISERROR Purpose: This macro determines if the return status code from another PSK function is an error (either fatal or nonfatal). Syntax: #include "im5055.h" IM_ISERROR( status ); IN Parameters: status Any PSK function that returns a status code. OUT Parameters: None.
IM_ISGOOD IM_ISGOOD Purpose: This macro determines if the return status code from another PSK function is a success. For more information, see “Status Code Macros” in Chapter 2. Syntax: #include "im5055.h" IM_ISGOOD( status ); IN Parameters: status Any PSK function that returns a status code. OUT Parameters: None.
IM_ISSUCCESS Purpose: This macro determines if the return status code from another PSK function is either success or warning. Syntax: #include "im5055.h" IM_ISSUCCESS( status ); IN Parameters: status Any PSK function that returns a status code. OUT Parameters: None. Return Value: This function returns one of these codes: Nonzero See Also:...
IM_ISWARN IM_ISWARN Purpose: This macro determines if the return status code from another PSK function is a warning. Syntax: #include "im5055.h" IM_ISWARN( status ); IN Parameters: status Any PSK function that returns a status code. OUT Parameters: None. Return Value: This function returns one of these codes: Nonzero See Also:...
im_message Purpose: This function displays the error message associated with a specific status code returned by a PSK function. Use this function to display additional information about status codes during application development. Syntax: #include "im5055.h" void im_message(IM_USHORT status_code ); IN Parameters: status_code Standard status code returned from various PSK functions.
im_putchar im_putchar Purpose: This function places a character at the current cursor position with the specified attribute. Syntax: #include "im5055.h" IM_STATUS im_putchar (IM_UCHAR char, IM_ATTRIBUTES a ttrib ); IN Parameters: char Specifies the character to be displayed attrib Specifies the display attribute for the character. Choose one of these constants: IM_NORMAL Plain text.
im_puts Purpose: This function places a string on the screen with the specified attribute at the current cursor location with the specified attribute and appends a carriage return and line feed (CR LF) to the string. Syntax: #include "im5055.h" IM_STATUS im_puts (IM_UCHAR far * string, IM_ATTRIBUTES a ttrib );...
im_put_text im_put_text Purpose: This function places a rectangular section of text on the display at the specified starting row and column and ending row and column. Syntax: #include "im5055.h" IM_STATUS im_put_text (IM_USHORT start_col, IM_USHORT start_row, IM_USHORT end_col, IM_USHORT end_row, IM_UCHAR far *text_array ); IN Parameters: start_col Starting column.
im_receive_buffer Purpose: This function receives the contents of a data buffer from the serial communications port. Syntax: #include "im5055.h" IM_STATUS im_receive_buffer (IM_COM_PORT port_id , IM_USHORT length , IM_UCHAR far *data_buffer , IM_LTIME timeout , IM_USHORT far *comm_length ); IN Parameters: port_id Identifies the communications port.
Page 104
im_receive_buffer im_receive_buffer (continued) Notes: This function does not return until an end of message, a buffer is full, a timeout occurs, or an error occurs. If no EOM character is defined, the function returns after a character is received. To receive data from the radio network, im_receive_buffer requires that you provide radio parameters such as the terminal number, host identification, or LAN identification one time per application.
im_receive_byte Purpose: This function receives one byte of data through the designated communications port. This function is identical to MS-DOS INT 14H service 02H. Syntax: #include "im5055.h" IM_STATUS im_receive_byte (IM_COM_PORT port_id , IM_UCHAR * receive_byte ); IN Parameters: The port_id parameter identifies the communications port as follows: IM_COM1 IM_COM2 OUT Parameters:...
Page 106
("PC function\n"); im_cputs ("Ctrl Z to finish at\n", IM_NORMAL); printf ("host\n"); /* Phimec protocol handler must NOT be installed ...*/ while (1) /* Call Intermec function */ status = im_receive_byte(com_port, &inchar); if ( IM_ISERROR(status)) printf("st: %xH\n", status); im_message(status); else im_putchar (inchar, IM_NORMAL);...
im_receive_field Purpose: This function manages an input field area on the screen. You can specify display attributes for the field and control the length of the input data. Syntax: #include "im5055.h" IM_STATUS im_receive_field (IM_ORIGIN iAllowedSource , IM_UINT iTimeout , IM_ATTRIBUTES iAttribute IM_ULONG iFlags IM_SHORT iAllowedLength IM_ORIGIN far *lpReturnedSource ,...
im_receive_field im_receive_field (continued) IM_RETURN_ON_FULL If the input data fills the field, display the truncated data, and then exit the field. IM_RETURN_ON_FUNCTION If a function key is pressed, then display all of the data entered into the field and return the data in lpReturnedString. IM_DISPLAY_ONLY Display the field and its attributes without waiting for input.
Page 109
im_receive_field (continued) When iAllowedSource is set to IM_COM1_SELECT and iTimeout is set to IM_INFINITE_TIMEOUT, this function performs as if timeout were set to IM_INFINITE_NET_TIMEOUT. To receive data from the radio network, im_receive_field requires that you provide radio parameters such as the terminal number, host identification, or LAN identification at one time per application.
Page 110
im_receive_field im_receive_field (continued) void main (void) IM_ULONG iSetup = IM_DISPLAY_ONLY, iPassFlags, ii=0; IM_STATUS iStatus; IM_ORIGIN iSource; /* set up display */ im_clear_screen(); /******************************************************************************** *******/ /* loops through once to display prompts and fields then comes back through to gather /* input. If validation fails stays in field until validation passes. /******************************************************************************** *******/ im_set_cursor_xy( aScreen[ii].iRow, aScreen[ii].iCol );...
Page 111
This parameter can be a string in quotes or a far pointer to a variable containing the filename. 5055_file Is the drive letter and filename for saving the file on the 5055 PC. This parameter can be a string in quotes or a far pointer to a variable containing the filename.
im_receive_input im_receive_input Purpose: This function gets input from the source and places it into the received buffer. You can use the im_get_length function after this function to get the input length. Syntax: #include "im5055.h" IM_STATUS im_receive_input (IM_ORIGIN iAllowedSource , IM_UINT iTimeout , IM_ORIGIN far *lpReturnedSource , IM_UCHAR far *lpReturnedString );...
Page 113
im_receive_input (continued) IM_COM1_SELECT COM1 selected. IM_COM2_SELECT COM2 selected. IM_NET_SELECT Network selected. lpReturnedString Pointer to the variable where the data is placed. Return Value: This function returns one of these codes: IM_SUCCESS Success. IM_TIMEDOUT Timeout occurred. Notes: If input from more than one source is received before this function is called, the first available input is returned in this order: label, keypad, and COM1.
Page 114
im_receive_input im_receive_input (continued) if (source == IM_LABEL_SELECT) printf("\nLabel input:\n"); else if (source == IM_KEYBOARD_SELECT) printf("\nKeybd input:\n"); /* Display input data */ printf("%s\nInput length: %d\n", input, length); else /* input error */ printf("input error\n"); /* Upper case first char of input for simplifying to test input */ input[0] = toupper(input[0]);...
im_rx_check_status Purpose: This function directs the active protocol handler to check the communication port buffer status variable to determine if the application program has accepted the previous data. Syntax: #include "im5055.h" IM_STATUS im_rx_check_status (IM_COM_PORT port_id ); IN Parameters: The port_id parameter identifies the communications port as follows: IM_COM1 COM1.
im_set_cursor_style im_set_cursor_style Purpose: Defines the style used to draw the cursor. Syntax: #include "im5055.h" IM_STATUS im_set_cursor_style (IM_CURS_TYPE cursor ); IN Parameters: cursor Flag that is one of these constants: IM_UNDERLINE Single underline. OUT Parameters: None. Return Value: This function returns one of these codes: IM_SUCCESS Success.
im_set_cursor_xy Purpose: This function sets the current cursor position. Syntax: #include "im5055.h" IM_STATUS im_set_cursor_xy (IM_USHORT rowNum , IM_USHORT colNum ); IN Parameters: rowNum Vertical position. The top of the display is 0. colNum Horizontal position. The left edge of the display is 0. OUT Parameters: None.
im_set_display_mode im_set_display_mode Purpose: This function sets the character height of the display. Scroll and wrap parameters are included for compatibility with other PSKs, such as JANUS, 6400, and Trakker Antares. Syntax: #include "im5055.h" IM_STATUS im_set_display_mode (IM_FONT_TYPE font , IM_BOOL scroll IM_BOOL wrap );...
Purpose: This function sets the 5055 input mode to Wedge, Programmer, or Desktop. These modes affect how the 5055 interprets and stores input. Syntax: #include "im5055.h" IM_STATUS im_set_input_mode (IM_MODE mode ); IN Parameters: mode Specifies the mode. Choose one of these constants: IM_PROGRAMMER Input is returned as a string (default).
Purpose: Each time you press a key, the 5055 can emit a click. This function enables or disables the keyclick. Syntax: #include "im5055.h" IM_STATUS im_set_keyclick (IM_CONTROL keyclick_status ); IN Parameters: The keyclick_status parameter is one of these constants: IM_ENABLE Enable the keyclick.
im_set_time_event Purpose: This function starts a timer that runs from 0 to 65,534 ms. After reaching the upper limit, a timeout event occurs that can be recognized by the im_event_wait function or any of the input functions. Syntax: #include "im5055.h" IM_STATUS im_set_time_event (IM_USHORT iTimeout ) IN Parameters:...
IM_USHORT duration, IM_USHORT volume) ; IN Parameters: pitch Specifies the frequency of the beep you want the 5055 to make. Either enter a number from 20 to 8189 to indicate the pitch, or choose one of these constants: IM_HIGH_PITCH 2400 Hz.
Purpose: This function places the application and 5055 in standby mode for a specific period of time to save the battery power. Syntax: #include "im5055.h" IM_STATUS far im_standby_wait (IM_USHORT iTimeout ); IN Parameters: iTimeout Specifies the amount of time to wait in standby mode. Enter a number from 1 to 65,535 (resolution of 10 ms) to indicate the length of the timeout in milliseconds.
im_status_line im_status_line Purpose: This function briefly displays an error message in the status line without wrapping or scrolling the display. The status line is displayed until a key is pressed or a time out occurs. The original contents of the line reappear after the message is erased. Syntax: #include "im5055.h"...
im_transmit_buffer Purpose: This function transmits the contents of a data buffer through the serial communications port. This function continues operating until the buffer transmission is complete or until an error status is detected. Syntax: #include "im5055.h" IM_STATUS im_transmit_buffer (IM_COM_PORT port_id , IM_USHORT length , IM_UCHAR far *data_buffer, IM_LTIME timeout );...
This function returns one of the standard status codes defined in Appendix A, “Status Codes.” Notes: This function requires the PC standard protocol handler Intermec recommends using im_transmit_buffer (with a user_length of one) instead of using im_transmit_byte. You can use this function for an acknowledgement. See Also:...
Page 128
(" to be transmitted\n"); printf (" <ESC> to quit\n"); /* Phimec protocol handler must NOT be installed ...*/ while ((outchar = getche()) != '\x1B') /* Call Intermec function */ status = im_transmit_byte( com_port, outchar); if ( IM_ISERROR(status)) im_message(status); 5-76...
This function returns one of these codes: IM_SUCCESS Successful. IM_INVALID_PORT The port is unknown. Notes: The host must be set up to send a file (using XMODEM protocol) to the 5055 for this function to execute successfully. See Also: im_xm_transmit_file...
Page 130
im_xm_receive_file im_xm_receive_file (continued) istatus = im_xm_receive_file(Rxfilename,IM_COM1); printf("\nistatus for receive is %x \n", istatus); im_message(istatus); if(istatus == IM_OK) im_cputs("\nReceive file success\n", IM_NORMAL); im_message(istatus); else im_cputs("\nReceive File Error: im_message(istatus); getch(); im_clear_screen(); im_puts("Enter any character for beginning of transmit file ", IM_NORMAL); getch(); Test im_xm_transmit_file function istatus = im_xm_transmit_file(Txfilename,IM_COM1);...
This function returns one of these codes: IM_SUCCESS Successful. IM_INVALID_PORT The port is unknown. Notes: The host must be set up to receive a file (using XMODEM protocol) from the 5055 for this function to execute successfully. See Also: im_xm_receive_file Example See example for im_xm_receive_file.
This function returns one of these values: IM_SUCCESS Successful. IM_INVALID_PORT The port is unknown. Notes: The host must be set up to send a file (using XMODEM-1K protocol) to the 5055 for this function to execute successfully. See Also: im_xm1k_transmit_file...
Page 133
im_xm1k_receive_file (continued) getch(); Test im_xm1k_receive_file function istatus = im_xm1k_receive_file(Rxfilename,IM_COM1); printf("\nistatus for receive is %x \n", istatus); im_message(istatus); if(istatus == IM_OK) im_cputs("\nReceive file success\n", IM_NORMAL); im_message(istatus); else im_cputs("\nReceive File Error: im_message(istatus); getch(); im_clear_screen(); im_puts("Enter any character for beginning of transmit file. "); getch();...
This function returns one of these values: IM_SUCCESS Successful. IM_INVALID_PORT The port is unknown. Notes: The host must be set up to receive a file (using XMODEM-1K protocol) from the 5055 for this function to execute successfully. See Also: im_xm1k_receive_file Example See example for im_xm1k_receive_file.
You can use Accumulate mode to collect data from a series of bar code labels and enter them as a single label. When you put the 5055 in Accumulate mode, the 5055 will collect all scanned bar code labels in the 5055’s buffer until you scan either the Enter or Exit Accumulate mode command.
Page 138
Up to 250 characters can be held in the buffer. If the data record count exceeds 250 characters, the data is truncated. If you reset the 5055 (software or hardware reset), you exit Accumulate mode, the entire buffer is cleared, and all data accumulated is lost.
3. Scan this bar code label to exit Accumulate mode and enter the data record. Exit Accumulate Mode *-/* *-/* Enter Accumulate Mode Purpose: Enters Accumulate mode. You can accumulate data from a series of bar code labels and enter them as a single label. From COM Port: Not supported Scan:...
Purpose: This command must precede any configuration command. If you enter a valid string, the 5055 configuration is modified and the 5055 sounds a high beep. For help on the configuration commands, see Chapter 7, “Configuration Command Reference.” From COM Port: $+ command[ $+ command]...[ $+ command]...
To save the current configuration to reader command. Save Configuration to File Purpose: Saves the current runtime configuration to the drive. Each time you start a PSK application, the 5055 is set to the configuration stored TR5055.CFG From COM Port: Scan: Save Configuration to File *.+1*...
• Run Program • Transmit File XMODEM • Transmit File XMODEM-1K Abort Program Purpose: Aborts or exits the current application, and the 5055 returns to DOS. From COM Port: Scan: Abort Program */$* */$* Delete File Purpose: Deletes a file from a drive on the 5055.
Page 143
Delete File (continued) Scan: 1. Scan this bar code label: Enter Accumulate Mode / Delete File *+/..--* *+/..--* 2. Scan the bar code label(s) for the file you want to delete. You can scan labels from the “Full ASCII Table” in Appendix C. The label must use this format: drive:filename 3.
Receive File XMODEM Purpose: Receives a file from the host computer through the serial port and saves it on the 5055. On the host, you need to transmit the file using a serial communications package that supports XMODEM protocol (i.e., Windows 3.1 Terminal or Win95 Hyperterminal).
Receive File XMODEM-1K Purpose: Receives a file from the host computer through the serial port and saves it on the 5055. On the host, you need to transmit the file using a serial communications package that supports the XMODEM-1K protocol (i.e., Windows 3.1 Terminal or Win95 Hyperterminal).
Run Program Purpose: Runs the specified program or application that is stored on the 5055. From COM Port: // drive:filename where: drive: filename Scan: 1. Scan this bar code label: Enter Accumulate Mode / Run Program *+///* *+///* 2. Scan the bar code label(s) for the application you want to run. You can scan labels from the “Full ASCII Table”...
Transmit File XMODEM Purpose: Transmits a file from the 5055 through the serial port and saves it on the host computer. On the host, you need to receive the file using a serial communications package that supports the XMODEM protocol (i.e., Windows 3.1 Terminal or Win95 Hyperterminal).
Transmit File XMODEM-1K Purpose: Transmits a file from the 5055 through the serial port and saves it on the host computer. On the host, you need to receive the file using a serial communications package that supports the XMODEM-1K protocol (i.e., Windows 3.1 Terminal or Win95 Hyperterminal).
The configuration that you specify is active only through an application built with the PSK library. For more information on the 5055 BIOS, see the 5055 Data Collection PC Technical Reference (Part No. 978- 054-002).
5055 Programmer’s Software Kit Reference Manual Configuration Commands Listed by Category The following table lists the configuration commands you may need to set for bar code symbologies, operations, or serial port device communications. Bar Code Symbologies Codabar Code 39 Code 128...
Configuration Commands Listed by Category (continued) Communications Baud Rate Configuration Commands Via Serial Port Data Bits End of Message (EOM) Flow Control Handshake LRC (Longitudinal Redundancy Check) Parity Poll (Polling) Start of Message (SOM) Stop Bits Timeout Delay Entering Variable Data in a Configuration Command You can enter variable data for many of the configuration commands.
Page 156
T, scan this label: Note: To use the bar code labels in Appendix C, you must configure the 5055 to use Code 39 in Full ASCII mode. For help, see “Code 39” later in this chapter.
Append Time Purpose: Appends the time to data records that are transmitted from the 5055. You can also use the Time in Seconds command to append the time in hours and minutes only, or hours, minutes, and seconds. The time is appended to each data record in the form HH:MM:SS.
5055 Programmer’s Software Kit Reference Manual Baud Rate Purpose: Sets the baud rate for the serial port on the 5055. The baud rate must match the baud rate of the device (i.e., the host computer) that the 5055 is communicating with through the serial port.
Acceptable values for data are one or two digits, corresponding to: First digit Second digit Default: Disabled Note: The configuration CD20 is not permitted for consistency with other Intermec products. Configuration Command Reference Beep Volume Normal *$+BV2* *$+BV2* Disabled Enabled...
The character set is uppercase A to Z, 0 to 9, dollar sign ($), period (.), slash (/), percent (%), space ( ), plus (+), and minus (-). The maximum character length for a label is 23 characters. The 5055 decodes three types of ASCII: • Code 39 non-full ASCII •...
Page 161
The $ and % are valid Code 39 characters in the non-full ASCII character set. However, the 5055 will not decode this label if it is configured for full ASCII because the data is not represented by valid full ASCII character pairs. To decode the label correctly, you need to configure the 5055 for mixed-full ASCII.
Page 162
5055 Programmer’s Software Kit Reference Manual Code 39 (continued) Use this table to help configure your 5055. Code 39 Option Non-full ASCII Full ASCII Mixed-full ASCII Syntax: CBdata Acceptable values for data must be three digits, corresponding to: First digit:...
*$+CH0* Notes: If you configure Standard Code 128, the 5055 will not decode Function Code 1 characters in the first position of a bar code label. Any subsequent Function Code 1 characters are translated to the ASCII GS control character as a separator for variable length fields.
5055 Programmer’s Software Kit Reference Manual Command Processing Purpose: Command processing allows you to disable or enable reader commands. You may want to disable reader commands to prevent a user from accidentally entering a command or to use data that would otherwise be treated as a command. Any bar code label that contains the 2- to 4-character commands for Command Processing is treated as a reader command unless the command is disabled.
Page 165
Command Processing (continued) To disable or enable specific reader commands, perform these steps: 1. Scan this bar code: Enter Accumulate Mode / Command Processing *+/$+DC* *+/$+DC* 2. Scan the bar code to disable or enable one reader command. Abort Program */$* */$* Default/Save Configuration...
Page 166
4. Repeat Steps 2 and 3 to disable or enable another reader command. Note: You can accumulate up to 250 characters in the buffer. If the data accumulated exceeds 250 characters, you will hear an error beep and the 5055 will reject the last bar code read.
Configuration Commands Via Serial Port Purpose: Allows you to control the data the 5055 receives through the serial port. You can set this command to execute reader and configuration commands received through the serial port, or treat all data as data without checking for special command syntax. There are two options: Disabled All data received through the serial port is treated as data.
5055 Programmer’s Software Kit Reference Manual Data Bits Purpose: Sets the number of data bits the 5055 uses when communicating with another device (i.e., host computer) through the serial port. Syntax: IIdata Acceptable values for data are: 7 data bits...
Display Font Type Purpose: Selects the type or size of font that is used on the 5055 screen. You can set a regular size font (6x9), a font with double-height characters (6x18), or a font with double-width and double-height characters (12x18).
Attaches an EOM to the end of a data block to indicate the end of data transmission to and from a 5055. When EOM is disabled, the 5055 communicates in Character mode. When EOM is enabled, the 5055 communicates in Frame mode.
Page 171
End of Message (EOM) (continued) 2. Scan one or two bar codes for data from the “Full ASCII Table” in Appendix C. 3. Scan this bar code: Exit Accumulate Mode *-/* *-/* PSK Example: im_command (“$+PF\x03”,5); will set EOM for the serial port to ETX. Configuration Command Reference 7-21...
5055 Programmer’s Software Kit Reference Manual Interleaved 2 of 5 Purpose: Enables or disables decoding of Interleaved 2 of 5 (I 2 of 5) symbology. I 2 of 5 is a high-density, self-checking, continuous numeric symbology. It is mainly used in inventory distribution and the automobile industry.
I 2 of 5 Case Code (either 6 or 14 characters). Keyboard Clicker Purpose: Enables or disables the keyboard clicks. The 5055 sounds a click each time you press a key or decode a row of a two-dimensional symbology. Syntax:...
5055 Programmer’s Software Kit Reference Manual Purpose: Enables or disables decoding of MSI symbology. MSI code is similar to Plessey code. MSI code includes a start pattern, data characters, a check digit, and a stop pattern. The check digit is always transmitted.
(see the example). Note: To scan a bar code label that includes quotes, you must configure the 5055 to use Code 39 in Full ASCII mode. For help, see “Code 39” earlier in this chapter.
Page 176
5055 Programmer’s Software Kit Reference Manual Postamble (continued) Default: Disabled (no characters) Scan: To disable the postamble, scan this bar code: Disable Postamble *$+AE* *$+AE* To set the postamble to an ASCII character string: 1. Scan this bar code: Enter Accumulate Mode / Set Postamble...
(see the example). Note: To scan a bar code label that includes quotes, you must configure the 5055 to use Code 39 in Full ASCII mode. For help, see “Code 39” earlier in this chapter.
SOM is the first character in a message sent to or received from the host computer through the 5055’s serial port. SOM cannot equal the same value that is set for EOM. You cannot set SOM to any of these values: •...
Start of Message (SOM) (continued) To set SOM to an ASCII character: 1. Scan this bar code: Enter Accumulate Mode / Set SOM *+/$+PE* *+/$+PE* 2. Scan a bar code for data from the “Full ASCII Table” in Appendix C. 3.
5055 Programmer’s Software Kit Reference Manual Time and Date Purpose: Sets the time and date on the 5055. Syntax: DBdata Acceptable values for data are 12 digits corresponding to: 00-99 01-12 01-31 01-12 00-59 00-59 Default: 920101120000 Scan: To set the time and date: 1.
If you enable the Append Time command, you can enable the Time in Seconds command to append the seconds to each transaction transmitted from the 5055. To append the time in hours and minutes, disable the Time in Seconds command.
5055 Programmer’s Software Kit Reference Manual UPC/EAN Purpose: Enables or disables decoding of UPC-A, UPC-E, EAN-8 and EAN-13. When enabled, supplementals are auto-detected and are transmitted. UPC Preamble of System and Country Codes are detected and transmitted. Check digits for UPC-A and UPC-E are detected and transmitted.
The next table lists the status code return values and the error message text provided by im_message. The status codes are in hex. Note: The status codes are IM_USHORT (unsigned short) values. 5055 Status Code Return Values Status Code Message Text...
Page 186
5055 Programmer’s Software Kit Reference Manual 5055 Status Code Return Values (continued) Status Code Message Text 0x063 UDP+: Msg received bigger than buffer 0x064 UDP+: Msg already transmitted 0x065 UDP+: Invalid param block 0x066 Network is inactive or improperly configured...
Page 187
5055 Status Code Return Values (continued) Status Code Message Text 0x0A2 Table is full 0x0A3 Index out of range 0x0A4 Time value at that index is zero 0x0A5 Pointers do not match 0x0A6 Requested row value not supported 0x0A7 Requested column value not supported...
Page 188
5055 Programmer’s Software Kit Reference Manual 5055 Status Code Return Values (continued) Status Code Message Text 0x123 No table space available for message 0x134 Invalid file descriptor pointer 0x135 Task not suspended 0x136 Not owner of stream 0x137 Stream access error 0x138 Color requested >...
Page 189
5055 Status Code Return Values (continued) Status Code Message Text 0x20A Label length less than min 0x20B Incorrect check digit 0x20C Output string too short 0x20D Leading margin not found 0x20E Invalid start or stop pattern 0x20F Not enough counts for whole label...
Page 190
5055 Programmer’s Software Kit Reference Manual 5055 Status Code Return Values (continued) Status Code Message Text 0x22A PSK coding error 0x22B Network error 0x22C Network error 0x22D Informational Follow cursor mode not enabled 0x231 Data transmitted before cancel request accepted...
This appendix shows the settings for Microsoft Visual C/C++ v1.5. Project Options Note: These examples use Microsoft Visual C/C++, Professional Edition v1.5. Your screen may look different. Compiler Options: Code Generation Microsoft Visual C/C++ Settings...
This appendix contains a full ASCII chart and charts of Code 39 bar code labels that you can scan with the 5055 computer. Full ASCII Table This table lists the ASCII characters and their binary, hexadecimal, and Code 39 equivalents.
Page 201
Notes for the Full ASCII Table Bit positions are 76543210. This column lists the hexadecimal value. This column lists the ASCII character. SP is the SPACE character. The Code 39 characters /P through /Y may be interchanged with the numbers 0 through 9. %T may be interchanged with %X or %Y or %Z.
Full ASCII Bar Code Chart The charts in this section list the Code 39 bar code label for each ASCII character. To use these bar code labels, you must configure the 5055 to use Code 39 in Full ASCII mode.