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 9 of 12

EZBuilder Tutorial, pages 81 to 90

Pages 81 to 90 of 114

The original document is the PDF (3.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Intermec 2420, Intermec 2425 and Intermec 2481

Page 81

Testing Your Program on the Simulator

5

5. Click the Data tab in the Download Application dialog box to review the Parity Types, Data Bits, and Stop Bits.

6. On the Data tab screen, make sure the data settings shown on the screen and those shown on the terminal are the same. Change them if necessary. 7. Click the Validation tab in the Download Application dialog box to review the Validation settings.

8. On the Validation tab screen, make sure the Validation settings shown on the screen and those shown on your terminal are the same. Change them if necessary. Note: If the terminal’s Commands Via Serial Port shows Disabled, the terminal must be changed to “Enabled” with or without TMF. Also, the EOM#1 must be set (not blank).

5-11

Page 82

EZBuilder Tutorial

To download EZBuilder applications and files 1. Click Download when you have verified that the computer and terminal settings match. The Protocol Status dialog box appears, showing the progress of the download.

2. The Information dialog box appears when your program has successfully downloaded. Click OK to clear the message.

When your download is successful, you can test your program on the terminal in the same manner that you previously tested it on the computer. Congratulations! You have completed Exercise 18. Save your work before continuing.

Chapter Summary In this chapter, you learned how to build, test, and download your program. You also studied example applications. You have completed the EZBuilder Tutorial and are now ready to run your application. Be sure to read Appendix A to learn about using EZBuilder features.

5-12

Page 83

Testing Your Program on the Simulator

5

Where Do You Go From Here? After you have completed this tutorial and enhanced it to your satisfaction, you may want to develop your own application programs or you may want to learn more possibilities.

Using the Simulator Editor Icons have been created for the development tools located in your Intermec folder. Look in that folder and note these two items: •

Simulator Editor. This allows you to make changes to the Simulator characteristics. For example, you may want to mimic host data (mostly network replies) to debug your applications.

•

Simulator Editor Help. This provides help about Simulator characteristics that can be changed using the Simulator Editor.

Using the Example Applications Study the example applications that were included on the CD-ROM with your EZBuilder package. These will supply you with further EZBuilder features. Refer to the EZBuilder Getting Started Guide for descriptions of the examples.

Using the Online Help EZBuilder offers online help, as described in Chapter 1 of this tutorial. Now that you have some understanding of EZBuilder’s basic features, open a new application and experiment. Use online help to direct you into some new features.

5-13

Page 84

abc

Page 85

A Using EZBuilder Features

Page 86

This page is a scan with no text; see it in the PDF.

Page 87

Using EZBuilder Features

A

This chapter provides examples of how you can solve problems and accomplish common programming tasks using EZBuilder.

Using the Example EZBuilder Applications A variety of EZBuilder examples are included in the EXAMPLES directory of the EZBuilder CD-ROM. The following table provides a brief description of these applications. Examples of using some of the applications are also provided later in this chapter. This material assumes that you have a basic operating knowledge of EZBuilder and Microsoft Visual C/C++ version 1.5X.

EZBuilder Example Applications Name

Usage

DEMO

This application demonstrates the use of some less obvious characteristics of EZBuilder, such as setting a call in the application entry event to override the default of starting the application in the first menu that was defined. This application also shows how to create a login screen, how to compare a field's contents against a set of constant values or file data, how to move data from multiple fields into another field, and how to use one input field with data type codes that indicate into which other fields the input data is to be sent. Several other advanced techniques are included in this example application.

CLRFLDS2

This application clears the contents of all input fields on a screen. When the cursor leaves the last field and enters the first field again, all fields are emptied. You can set each field to clear on entry; however, this only clears the field that the cursor is in.

EZDIRTTCP

This application transmits data to an echo server and receives the response.

EZTFTP1

This application sets up a keypress action to send a file to a host. The filenames are static - they must be set at compile time and cannot be changed at runtime.

EZTFTP2

This application starts a transmit or receive by pressing a key. Using the approach described here, the application can transmit and receive files.

EZTFTP3

This application sets up a keypress action that begins the file transfer and sets filenames dynamically at run time.

A-3

Page 88

EZBuilder Tutorial

Example Application Summary (continued)

A-4

Name

Usage

FILEFND

This application demonstrates two ways to search through a file and find a record that matches a particular field. The first way is a simple linear search, which is slow and should only be used on fairly short files. The second way is a binary search, which is much faster for large files, but requires that the data in the file be sorted by the field of interest, and that the records be a fixed length.

FIN and WIP

These two applications are used to perform a physical inventory of a cut and sew manufacturer of curtains and bedding goods. FIN (Finished Goods) is used to scan cardboard boxes that store finished goods; the scan rate is more than one carton per second. WIP (Work in Progress) allows a rapid scan of bar coded tickets attached to the goods. Both applications build data files with location and item number data. WIP includes an optional quantity count (default = 00). These applications include examples of validity checking of input data.

JUMPRET

Jump Return shows you how you can call several levels deep and still return to a main screen/menu without going through the intermediate levels, and without overflowing the stack. Most of the screens are used to create an arbitrary number of layers below the main menu, but the information on how to get back is in the comments in the field in the screen RETURN_TO_MAIN.

PARSE

This application scans a single bar code with multiple fields and parses the multiple fields in the EZBuilder application. This approach assumes that each field within the bar code is a fixed length or is delineated by a character.

SCRLFILE

This application reads a file into a scrolling field and allows the user to select a particular record.

SHOWHEX

This application demonstrates using a user function from a userdeveloped library.

TCPDEMO

This application shows you how you can create an application that uses the direct TCP/IP socket interface feature on the DCS 30X. On the Trakker Antares terminal, you run TCPDEMO.IMP. The application sends a transaction to the server and requests a direct TCP/IP socket connection with a TCP/IP host. The DCS 30X acts as a pass-through server between the host and a Trakker Antares UDP Plus terminal running this EZBuilder application.

USERVAL

Demonstrates use of user function im_set_validation_callback, and the associated call back function to validate data as it is entered.

Page 89

Using EZBuilder Features

A

Example Application Summary (continued) Name

Usage

VTDEMO

This application provides a complete VT100 screen mapping demonstration using the DCS 30X and a Trakker Antares terminal. On the DCS 30X, run a sample host application. On the terminal, run VTDEMO.IMP. The DCS 30X contains the script file that provides the instructions for mapping the transaction fields from the terminal to the sample host application. When you run the demonstration, you can watch the transaction fields being mapped to the host application.

Working With User Functions and Libraries This section describes how to develop, build, and use a user library with EZBuilder. One of the actions that can be set for various action objects in EZBuilder is the user function. You can set a User Function for a given object using • a standard Microsoft C function.

• an Intermec Trakker Antares PSK function.

• in-line C statements.

• a user-defined function from a user-provided library.

If the functionality you want cannot be created with a C statement, a C function, or a PSK function, then you may want to develop custom functions to be called from an EZBuilder application. To create a custom function 1. Design, code, and test the function. 2. Build a static library from the function. 3. Make function calls at the desired locations in the EZBuilder application. 4. Configure EZBuilder to link with the static library when building your applications. 5. Build your application.

A-5

Page 90

EZBuilder Tutorial

Reviewing the Example Application Given a screen with two fields, show the data from the first field in the second field in a hex format. Set this process statement in the EZBuilder Object Manager. The EZBuilder application created for this example is on the EZBuilder CD-ROM with the filename SHOWHEX.IMP.

Even though these fields are set up as numeric, they are strings. If you look at the generated C code you will find declarations similar to the following: static char Screen0_Field0_F[SCREEN0_FIELD0_FL +1]; // static char Screen0_Field1_F[SCREEN0_FIELD1_FL +1]; // static char Screen0_Field2_F[SCREEN0_FIELD2_FL +1]; //

In this example, we will create a user function to • accept as arguments, pointers to the two fields, each one of which is a string.

• convert the first string to a long integer.

• convert the resulting long integer back to a string in hex format.

• place the result in the second field pointed to by the second argument.

Use Microsoft Visual C/C++ version 1.5X to develop a stand-alone application with the desired functions and header files. #include <stdlib.h> #include "imt24lib.h" #include <conio.h> #include "imstdio.h" void tohex(char *field1, /* pointer to first EZBuilder field */ char *fieldres /* pointer to the EZBuilder field to*/ /* place the results */ ) { long field1long; /* long integer version of first field */ field1long = atol(field1);

A-6

/* convert first to long

*/