2342.
342.book Page i Thursday, July 22, 2004 8:35 AM PSC Inc 959 Terry Street Eugene, Oregon 97402 Telephone: (541) 683-5700 Fax: (541) 345-7140 An Unpublished Work - All rights reserved. No part of the contents of this documentation or the procedures described therein may be reproduced or transmitted in any form or by any means without prior written permission of PSC Inc. or its wholly owned subsidiaries ("PSC").
2342.book Page i Thursday, July 22, 2004 8:35 AM CONTENTS Software End User License Agreement .................................................. vii Introduction ........................................................................................... 1 Document Overview ......................................................................................................... Style Conventions ...........................................................................................................
2342.book Page ii Thursday, July 22, 2004 8:35 AM User Interface ......................................................................................................... Menus and Toolbars ........................................................................................... PPG Toolbar Buttons .......................................................................................... Program Nodes Toolbar ......................................................................................
2342.book Page iii Thursday, July 22, 2004 8:35 AM View Menu .................................................................................................................... 38 Show Calling Function .............................................................................................. 38 Show Frame/Subroutine Nodes.................................................................................. 38 Toolbar .........................................................................................
2342.book Page iv Thursday, July 22, 2004 8:35 AM Information to Output Tab .................................................................................. Special Commands ............................................................................................ Next Node ........................................................................................................ Verify Nodes ...........................................................................................................
2342.book Page v Thursday, July 22, 2004 8:35 AM Template Uses ........................................................................................................ Creating a Template ................................................................................................ Modifying an existing template .................................................................................. Template Example: Modifying Inventory .....................................................................
2342.book Page vi Thursday, July 22, 2004 8:35 AM Example Frames ................................................................................. 135 Setting the Date and Time ............................................................................................ Changing the Auto-Off Timeout...................................................................................... Displaying the Contents of a Register .............................................................................
2342.book Page vii Thursday, July 22, 2004 8:35 AM PSC Inc. PT Program Generator (PPG) Software End User License Agreement NOTICE TO END USER: PSC is providing you with a license for the Software you have acquired, subject to the terms and conditions of this Agreement. If you use the Software, you will be deemed to have accepted the terms and conditions of this Agreement.
2342.book Page viii Thursday, July 22, 2004 8:35 AM (PPG) Software End User License Agreement 2. Intellectual Property. End User acknowledges that the Software constitutes valuable trade secrets of PSC and that the Software is protected by intellectual property laws and treaties.
2342.book Page ix Thursday, July 22, 2004 8:35 AM PT Program Generator 5.3 PSC shall have no liability to End User for claims of infringement based upon 1) the use of the Software in combination with any product which PSC has not either furnished or authorized for use with such Software, 2) the use of any Software designed, manufactured, or modified to the specifications of End User, or 3) End User's customization or modification of the Software. 5.
2342.book Page x Thursday, July 22, 2004 8:35 AM (PPG) Software End User License Agreement NOTES x PT Program Generator (PPG) v5.
2342.book Page 1 Thursday, July 22, 2004 8:35 AM Chapter 1 Introduction This document assumes that you are familiar with Microsoft Windows®. If you do not know how to launch applications, select menu options, or use dialog boxes, please refer to your Microsoft Windows documentation before proceeding with PPG.
2342.book Page 2 Thursday, July 22, 2004 8:35 AM Introduction • Example Frames on page 135, contains sample code for commonly used functions. • The PPG Library on page 159, describes the applications that come with PPG. • PPG System Commands on page 163, identifies the system commands that can be used with PPG. • ASCII/Hex Conversion Table on page 167, contains a table of ASCII charac- ters for your reference.
2342.book Page 3 Thursday, July 22, 2004 8:35 AM Style Conventions Windows Controls Words in Bold are selections that appear in the PPG program, such as frame names, subroutine names, node names, file, field, template, and register names, menu options, buttons, dialog boxes, field names, and radio-buttons. Words in Bold separated by an arrow (>) are menu actions you make in the order provided. For example, File > Run means select the File menu and then select Run from that menu.
2342.book Page 4 Thursday, July 22, 2004 8:35 AM Introduction NOTES 4 PT Program Generator (PPG) v5.
2342.book Page 5 Thursday, July 22, 2004 8:35 AM Chapter 2 Getting Started Overview Refer to this section as you prepare to install and use the PT Program Generator (PPG). The following general topics are covered: • • Before You Start on page 6 • • • What’s New in PPG v5.0? on page 6. • • • • • • PPG System Requirements on page 6. Registering Your Copy of PPG on page 6. PPG Installation on page 6 Required Hardware on page 6. Operating Systems on page 7. Supported Portables on page 7.
2342.book Page 6 Thursday, July 22, 2004 8:35 AM Getting Started Before You Start What’s New in PPG v5.0? The following features are new to this version of PPG: • PPG v5.0 works with PSC’s Falcon PT40. • Improved user interface provides buttons to access program nodes and controls. • Double-byte language support for Chinese Simplified and Chinese Traditional characters. PPG License Agreement Review the license agreement; it gives you permission to copy the program files for backup purposes only.
2342.book Page 7 Thursday, July 22, 2004 8:35 AM PPG Installation • Video - VGA • A CD-ROM drive • A serial port (for loading your program into a portable) Operating Systems PPG works with the following Microsoft® Windows® operating systems: • Windows® 98 (SP5) • Windows® 2000 (full double-byte functionality) • Windows® Me (SP5) • Windows® NT (SP6) • Windows® XP (full double-byte functionality) Supported Portables PPG v 5.0 only supports the PSC Falcon PT40.
2342.book Page 8 Thursday, July 22, 2004 8:35 AM Getting Started 7. Finally, a message that PPG has been successfully installed is displayed. 8. Press Finish to exit the installation. Upgrading to PPG v5.0 If you want to upgrade to PPG v5.0, complete the instructions in Installing PPG on page 7. By default, PPG v5.0 is installed in a different default location on your PC’s hard drive than PPG v4.5, so it is possible to have both versions installed at the same time. Prior PPG version source files (*.
2342.book Page 9 Thursday, July 22, 2004 8:35 AM Overview of PPG 2. The PPG window opens as illustrated in Figure 1 with a new, blank PPG application. Figure 1. The PPG Window Exiting PPG To exit PPG, select File > Exit from the menubar or double-click on the Control-menu box. A dialog appears, asking if you want to save any changes to the current file. Select Yes to save changes or No to discard them. Overview of PPG Use PPG to construct and design an application for your PSC portable.
2342.book Page 10 Thursday, July 22, 2004 8:35 AM Getting Started PPG Tutorial To become familiar with PPG, complete the PPG Tutorial on page 99, or access the PPG Tutorial via the on-line help. Program Files Executable Programs Following is a list of executable programs that are installed on your PC during the installation of PPG: PPG PPG is the PT Program Generator application. This is the application you use to create programs for a PSC portable.
42.book Page 11 Thursday, July 22, 2004 8:35 AM Overview of PPG sample3.scr sample3.scr is an expanded version of sample2.scr that includes review and edit capabilities. (This is the program that was loaded with your portable when you first got it.) sample4.scr sample4.scr is an application which illustrates multiple frame levels. This example is useful as a model for designing complex applications. PPG also comes with some example frames and files, discussed in Example Frames on page 135.
2342.book Page 12 Thursday, July 22, 2004 8:35 AM Getting Started Click this Button To Copy the selected node to the clipboard. Copy Refer to Copy (Ctrl+C) on page 35. Paste the cut or copied node to the flow chart. Paste Refer to Paste (Ctrl + V) on page 35. Open the Print dialog box. Print Refer to Printing a File (Ctrl+P) on page 26.) Open the PPG online Help file. Help Refer to PPG Help (F1) on page 47.
2342.book Page 13 Thursday, July 22, 2004 8:35 AM Overview of PPG Navigation If your flow chart is larger than the PPG window, use the scroll bars and cursor keys to scroll different areas into view. (refer to Figure 3 on page 13). Or use your mouse to expand the window size by clicking and dragging on the beveled lower right corner of the PPG window.
2342.book Page 14 Thursday, July 22, 2004 8:35 AM Getting Started For information on working in application windows, including using scroll bars and selecting menu commands, refer to your Microsoft Windows documentation. Generating the Program Refer to PPG Application Design on page 15 for an overview of using PPG to create a PDT application, starting with a flow chart of your data-collection process. Creating & Using Nodes on page 49 provides details on each program node type.
2342.book Page 15 Thursday, July 22, 2004 8:35 AM Chapter 3 PPG Application Design Overview This chapter provides an overview of the process of designing and building an application using PPG. The following topics are covered: • • Designing the Application on page 15. • Application Output on page 15. • Application Structure on page 16 Node Types and the Parent-Child Relationship on page 17. • Creating Function Nodes on page 18 • Creating Operation Nodes on page 18 • Actual vs.
2342.book Page 16 Thursday, July 22, 2004 8:35 AM PPG Application Design Application Structure Next you must decide what you want the program to do. Draft a program flow chart with pencil and paper, while keeping in mind the following ideas and concepts. Follow them as steps if you like: 1. List the major actions the user may take. These may include reading data from the scanner, uploading data from the PDT, and storing data in a file. 2. For each major action, define each step.
2342.book Page 17 Thursday, July 22, 2004 8:35 AM Node Types and the Parent-Child Relationship • For example, an application with collect and store functions would be broken up into a collection function and a storage function. • For example, a storage function may contain steps to verify the data meets certain criteria, store the data in a file and track the amount of data stored. This may, depending on the complexity of each step, be broken up into functions which perform each step.
2342.book Page 18 Thursday, July 22, 2004 8:35 AM PPG Application Design Creating Function Nodes Once you’ve designed the basic program structure, the next step in generating a portable program is to define each Function Node. Function Nodes are frames or subroutines and are used to organize the steps and work of Operation Nodes. Most developers start by creating Function Nodes. Frames contain a set of program steps that are collected and ordered in a logical structure.
2342.book Page 19 Thursday, July 22, 2004 8:35 AM Node Types and the Parent-Child Relationship Actual vs. Virtual Display The Falcon PT40's actual display screen is a window to a larger display area called the virtual display (refer to Figure 4). Most applications you will use will fit into the actual display. However, applications can sometimes contain data longer than the default 6 line by16 character view of the actual display. Figure 4. Virtual vs.
2342.book Page 20 Thursday, July 22, 2004 8:35 AM PPG Application Design The virtual display maintains the latest lines of data once all lines of the virtual display are full. The oldest lines of data are “pushed off the top” as new data is added at the bottom. Defining Program Flow After you create all the nodes, connect the program pieces together using Link Nodes to define the flow of the program. Links are shown on the PPG display with arrows which point from one step to the next.
2342.book Page 21 Thursday, July 22, 2004 8:35 AM Additional Resources Figure 5. Application Generation, Data Flow & Transfer Process Additional Resources Before or after you complete the application design, to understand better how to work with PPG to design and to create custom applications for your PSC Falcon PT40, complete the PPG Tutorial on page 99. Refer to Sample Program Files on page 10 for information on the four (4) sample files included with the PPG software.
2342.book Page 22 Thursday, July 22, 2004 8:35 AM PPG Application Design NOTES 22 PT Program Generator (PPG) v5.
2342.book Page 23 Thursday, July 22, 2004 8:35 AM Chapter 4 The PPG Menubar Overview This section discusses the PPG menubar, located at the top left of the user interface. The following menu items are reviewed: • File Menu on page 23. • Edit Menu on page 34. • View Menu on page 38. • Create Menu on page 40. • Window Menu on page 44. • Help Menu on page 47. Refer to Menus and Toolbars on page 11 for a brief overview of the PPG menubar.
2342.book Page 24 Thursday, July 22, 2004 8:35 AM The PPG Menubar To access File menu items, click on File > and then the menu item you want to use from the menubar as shown in Figure 6. Or use the appropriate keyboard short cut, indicated on the same line as the menu item. Many standard Windows keyboard shortcuts can be used. For example, to print, press Ctrl + P simultaneously; to save, press Ctrl + S simultaneously. Figure 6. File Menu Like most software programs, PPG stores data in files.
2342.book Page 25 Thursday, July 22, 2004 8:35 AM File Menu Opening an Existing File (Ctrl+O) To open an existing program source file, select Open from the File menu, or use the keyboard shortcut: Ctrl+O.This action opens the Open dialog, as shown in Figure 7. Figure 7. The Open Dialog By default, the File list shows all program source (.scr) files in the PPG directory. If the file you want is located elsewhere, choose the drive and directory from those lists, or type them in the input box.
2342.book Page 26 Thursday, July 22, 2004 8:35 AM The PPG Menubar If a file of that name already exists in the specified directory, a dialog box appears, asking if you want to replace the existing file. Select Yes to replace the file or No to return to the Save As dialog box, where you can give the file another name or place it in another location.
2342.book Page 27 Thursday, July 22, 2004 8:35 AM File Menu Figure 9. The Print Dialog Press OK to send the displayed frame to the printer. Only one view of a flow chart can be printed at a time. Page Setup Select File > Page Setup to change the printing options. (Refer to Figure 10 on page 28.
2342.book Page 28 Thursday, July 22, 2004 8:35 AM The PPG Menubar Figure 10. The Page Setup Dialog Press OK when you are finished modifying the Page Setup options. Download (Ctrl+D) Use this feature after you have finished creating your flow chart. Select File > from the menubar to compile the program and download it onto the portable. The PPG Compiler window opens, downloads the file and then closes, automatically.
2342.book Page 29 Thursday, July 22, 2004 8:35 AM File Menu Figure 11. The Customize Application Dialog 2. Change the desired settings as explained below: PDT Options Default PDT type Click on the arrow to access the fields’ pull-down lists. Determines the PSC portable defaults. Select from one of two PSC portable types. Default Language Determines the language and font size in which prompts appear on the PDT.
2342.book Page 30 Thursday, July 22, 2004 8:35 AM The PPG Menubar Appearance Font You can change the appearance of nodes with these fields. Press the Font Select button to open the Font dialog box shown in Figure 12 to change the font and size displayed in the flow chart. Figure 12. Font Dialog Box Your font changes affect all text in the flow chart, not just the selected node or frame. All objects in the current flow chart are affected immediately.
2342.book Page 31 Thursday, July 22, 2004 8:35 AM File Menu Figure 13. Customize Options dialog 4. Select OK to apply the setting changes to all new applications. • • Press No to apply your changes only to the current application. Press Cancel to cancel your changes. Customize Display (Ctrl+Y) File > Customize Display from the menubar to open the Display Options dialog box, as shown in Figure 14 on page 31. Figure 14.
2342.book Page 32 Thursday, July 22, 2004 8:35 AM The PPG Menubar Grid Each flow chart has a grid background, which is useful in organizing the nodes. You can customize the grid to meet your needs. Snap to grid Enable Snap to grid to organize the flow chart so that nodes automatically snap to the nearest grid point when they are moved. If this feature is not enabled, nodes are free-floating. View grid points Enable this option to display grid points on the flow chart window.
2342.book Page 33 Thursday, July 22, 2004 8:35 AM File Menu Fill color Select a fill color for the node from the pull-down list. Default = White. Outline color Select a outline color for the node from the pulldown list. Default = Navy. More Colors... Startup Show PPG Toolbar Click on More Colors... to open a standard Windows dialog box for creating custom colors. Select the checkbox to enable this feature when PPG opens. Enable to display the File toobar.
2342.book Page 34 Thursday, July 22, 2004 8:35 AM The PPG Menubar Exit (Alt+F4) Select File > Exit from the menubar to exit PPG. If you have made changes since the last time you saved the file, PPG will prompt you to save the file. Edit Menu The following topics are covered in this section: • Selecting Objects on page 34. • Moving Objects on page 35. • Cut (Ctrl+X) on page 35. • Copy (Ctrl+C) on page 35. • Paste (Ctrl + V) on page 35. • Delete (Del) on page 36.
2342.book Page 35 Thursday, July 22, 2004 8:35 AM Edit Menu box is the desired size and shape, release the mouse button. All objects within the box are selected. You may then cut or copy all the selected objects and place them somewhere else, or drag all the selected objects with the mouse to a new location. Moving Objects To move an object from one frame or program to another, select it and choose Edit > Cut. To copy an object, select Edit > Copy.
2342.book Page 36 Thursday, July 22, 2004 8:35 AM The PPG Menubar Delete (Del) To delete a node or frame, select it and choose Edit > Delete from the menubar or press the Delete key. The object is removed along with any associated Links. CAUTION PPG has no Undo command to reverse actions you make accidentally. For that reason, it's a good idea to use the Cut command instead of the Delete command to remove nodes and frames.
2342.book Page 37 Thursday, July 22, 2004 8:35 AM Edit Menu Operation Nodes For Operation Nodes you can also access the Properties dialog using the following methods: • Point to the node and double click with the left mouse button. • Point to the node and click the right mouse button to activate a popup menu; select Properties. The Operation Node’s Properties dialog box opens, showing the assigned name and other node information. Figure 18 illustrates one type of properties dialog box.
2342.book Page 38 Thursday, July 22, 2004 8:35 AM The PPG Menubar View Menu To access View menu items, select View > and then the specific menu item below you want to use from the menubar: • • • • • Show Calling Function on page 38. Show Frame/Subroutine Nodes on page 38. Toolbar on page 39. PPG Explorer on page 40. Status Bar on page 40. Show Calling Function Select View > Show Calling Function to show the parent frame of an open child frame.
2342.book Page 39 Thursday, July 22, 2004 8:35 AM View Menu Toolbar The PPG Toolbars can be turned on and off by toggling the appropriate menu items. Use these features to customize the way your copy of PPG looks and behaves. Select View > Toolbar from the menubar. Figure 21. View Toolbars menu PPG Select View > Toolbar > PPG. Selecting this menu item toggles the PPG Toolbar on and off. Program Nodes Select View > Toolbar > Program Nodes.
2342.book Page 40 Thursday, July 22, 2004 8:35 AM The PPG Menubar PPG Explorer Select View > PPG Explorer to toggle the PPG Explorer on or off. You can also click on the small X at the top right of the Explorer window to close it. The Explorer window is dockable, which means you can reposition it to other locations. To move it, click on the double bar at the top of the Explorer. Hold the left mouse button down and drag the window to the desired location.
2342.book Page 41 Thursday, July 22, 2004 8:35 AM Create Menu • • • • • • • • • Input (Ctrl+Alt+I) on page 42. • • • • Register on page 43. Output (Ctrl+Alt+O) on page 42. Verify (Ctrl+Alt+F) on page 42. Copy (Ctrl+Alt+C) on page 42. Modify (Ctrl+Alt+Y) on page 43. Math (Ctrl+Alt+M) on page 43. Call (Ctrl+Alt+L) on page 43. Link (Ctrl+Alt+N) on page 43. Data on page 43. File on page 43. Template on page 43. Field on page 43.
2342.book Page 42 Thursday, July 22, 2004 8:35 AM The PPG Menubar Function Nodes Frame (Ctrl+Alt+F) For a thorough discussion of Frames, refer to Frames on page 50. Subroutine (Ctrl+Alt+S) For complete information on Subroutines, refer to Subroutines on page 51. Operation Nodes Menu (Ctrl+Alt+U) nodes present a group of options on the portable’s screen. They allow the user to select an option by pressing a function key. For complete information on Menus, refer to Menu Nodes on page 55.
2342.book Page 43 Thursday, July 22, 2004 8:35 AM Create Menu Modify (Ctrl+Alt+Y) nodes change the contents of a given register or file. Refer to Modify Nodes on page 67. Modify Math (Ctrl+Alt+M) Math nodes perform basic mathematical functions on the contents of a register or file. Refer to Math Nodes on page 69. Call (Ctrl+Alt+L) Call nodes branch to a subroutine. Upon completion, the subroutine returns to the calling node. Refer to Call Nodes on page 72.
2342.book Page 44 Thursday, July 22, 2004 8:35 AM The PPG Menubar Window Menu To access Window menu items, select Window > and the desired menu item: • • • Cascade Windows on page 45. Tile Windows on page 45. Filename [Frame] on page 46. Figure 23. Window Menu Select More Windows... at the bottom of the Window menu to view a list of open frames if you have more than nine (9) frames open. Figure 24. More Windows... Dialog 44 PT Program Generator (PPG) v5.
2342.book Page 45 Thursday, July 22, 2004 8:35 AM Window Menu Cascade Windows Select Windows > Cascade from the menubar to arrange open windows as overlapping tiles. Refer to Figure 25 on page 45, to view cascading windows. Figure 25. Windows Arranged by Cascading Tile Windows Select Windows > Tile from the menubar to arrange open windows as nonoverlapping tiles. Refer to Figure 26 on page 46, to view tiled windows.
2342.book Page 46 Thursday, July 22, 2004 8:35 AM The PPG Menubar Figure 26. Windows Arranged by Tiling Filename [Frame] Select Windows > Filename [Frame] from the menubar to bring a window hidden behind other windows to the top or to expand a minimized Frame. 46 PT Program Generator (PPG) v5.
2342.book Page 47 Thursday, July 22, 2004 8:35 AM Help Menu Help Menu To access Help menu items, select Help > and then the specific menu item you want to use from the menubar: • • PPG Help (F1). About PPG.... Figure 27. Help Menu PPG Help (F1) Select Help > PPG Help to access the main Help menu. You can also press or the Help button on many Dialogs for context sensitive PPG Help anywhere within the PPG application. About PPG...
2342.book Page 48 Thursday, July 22, 2004 8:35 AM The PPG Menubar NOTES 48 PT Program Generator (PPG) v5.
2342.book Page 49 Thursday, July 22, 2004 8:35 AM Chapter 5 Creating & Using Nodes Overview This section contains the following topics: • • • User’s Guide Flow Chart Levels on page 50. • Frames on page 50. • Subroutines on page 51. Creating New Nodes on page 53. • Menu Nodes on page 55. • Display Nodes on page 56. • Input Nodes on page 57. • Output Nodes on page 60. • Verify Nodes on page 63. • Copy Nodes on page 66. • Modify Nodes on page 67. • Math Nodes on page 69.
2342.book Page 50 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Flow Chart Levels After creating an empty application with the File New command, start in the main frame level. Nodes at this level should include frames and subroutines defining major steps in the application. Take advantage of the parent-child relationship to organize the application in a logical and maintainable fashion.
2342.book Page 51 Thursday, July 22, 2004 8:35 AM Flow Chart Levels 1. Select Create > Frame from the menubar. A new frame appears in the lower right corner of the frame window. The new frame is assigned a default name. 2. To position the frame, point to it, hold down the left mouse button, and drag the frame with the mouse. When the frame is positioned where you want it, release the mouse button. If you're creating several frames, you can create a single frame node as described above.
2342.book Page 52 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Figure 31 on page 52 shows the Frames level of a program that contains three subroutines: one for counting the data collected in a file, one for verifying that data, and one for displaying the data. Call nodes within the program frames jump to the subroutines as needed. Subroutine nodes can be placed anywhere in the application.
2342.book Page 53 Thursday, July 22, 2004 8:35 AM Creating New Nodes 2. To position the subroutine, move the pointer to it, hold down the left mouse button, and drag the subroutine with the mouse. When the subroutine is positioned where you want it, release the mouse button. Since subroutines aren’t Linked to other objects, their locations are optional. Normally, they are placed to one side of the frame. 3.
2342.book Page 54 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes 2. To position the node, move the pointer to it, hold down the left mouse button, and drag the node with the mouse. When the node is positioned where you want it, release the mouse button. 3. To give the node a more useful name, double-click on it with the left mouse button, select Edit > Properties from the menubar. • Or select Properties from the menu which appears when you point to the node and click the right mouse button.
2342.book Page 55 Thursday, July 22, 2004 8:35 AM Creating New Nodes Each node type also contains properties unique to its type. For more details on each node type, all operation nodes are described in this section in the order that they appear on the PPG toolbar and the PPG menubar. Menu Nodes A Menu node presents a group of options on the portable’s screen and allows the user to choose one of those options by pressing a function key.
2342.book Page 56 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes • Or you can get a combination of Chinese characters and one of the system fonts. Enter menu text here, including titles or prompts you want to display. In general, each line of the screen is associated with one portable function key, although it is possible to have more than one function per line. Activate only the keys you want to use.
2342.book Page 57 Thursday, July 22, 2004 8:35 AM Creating New Nodes Figure 33. The Dialog Box for a Display node Input Nodes Input nodes specify how the portable will receive data. You can use the dialog box for an Input node to indicate which sources of input (scanner, data keys, etc.) you want to accept. Figure 34.
2342.book Page 58 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Input From Tab (Next Nodes) Scanner Allows data input from the bar code scanner. The program proceeds without waiting for the user to press the ENTER key. Data Key Allows data input from the portable’s data keys (all the keys except the four function keys, through ). The program waits for the user to press the ENTER key. Key Allows data input from any of the function keys.
2342.book Page 59 Thursday, July 22, 2004 8:35 AM Creating New Nodes Figure 35. Input Node: Track Size Tab An Input Size register is predefined for your convenience. Display Tab The Echo to Display option determines whether the received data is displayed on the portable’s screen. Figure 36. Input Node: Display Tab When this option is selected, you are prompted to specify how and where data is displayed. You can select either the current cursor location or a specific position.
2342.book Page 60 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Store Info Tab Data Destination specifies where to store the input data. Figure 37. Input Node: Store Info Tab To specify placement of the data in a register (refer to Using a Register as a Destination on page 79), select Register in the Data Destination pull-down list. To store the data in one field of the register, select Field from the Write Type pull-down list.
2342.book Page 61 Thursday, July 22, 2004 8:35 AM Creating New Nodes Figure 38. The Output Node Properties Dialog You can send a constant value or the contents of a register or file. When sending data to the system, you can use special commands that sound a beep, set the system date or time, or reconfigure the portable. You can also send commands to the display to reposition the cursor or erase the display. Figure 38 on page 61 shows an Output node properties dialog.
2342.book Page 62 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Information to Output The Information to Output options specify the data or command to be transmitted (string), or the register or file containing the data. Refer to Registers on page 78 and Files on page 81. Special Commands You can use an Output node to send special commands to the portable's display or operating system.
2342.book Page 63 Thursday, July 22, 2004 8:35 AM Creating New Nodes Erase screen, return cursor to home position Move up one or more rows Move down one or more rows Move right one or more columns Move left one or more columns Display text on screen [ NO OPERATION ] Depending upon which operation you select, one or more parameters may be required. 4. Fill in the appropriate values and select OK. You may combine multiple Output commands in a single command string.
2342.book Page 64 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes ? Any single character. @ Any alphabetic character. # Any numeric character. ~, Any field (any sequence of characters up to the specified delimiter, which can be any character, in this case, a comma). Figure 40 on page 64 shows the Verify Information tab of the Verify node proper- ties dialog. Verify Information Tab Figure 40.
2342.book Page 65 Thursday, July 22, 2004 8:35 AM Creating New Nodes Verify Options Tab Figure 41. Verify Node Verify Options Tab Data Type Data type allows you to select the type the data should match ASCII values ASCII values (hex values 20 to 7F) include alpha-numeric characters and symbols (such as brackets, commas, dollar sign, and slash). Refer to ASCII/Hex Conversion Table on page 167 for a table of ASCII values.
2342.book Page 66 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes None Requires no match; it tests only on the basis of type. Constant Compares the value in the data source to a constant value Range Verifies that the value in the data source falls between an upper and a lower value Register name Verifies that the value in the data source matches the value in a specified register (refer to Registers on page 78, for details on specifying a register location.
2342.book Page 67 Thursday, July 22, 2004 8:35 AM Creating New Nodes Figure 43. The Copy Node Properties Dialog Copy From Tab Data Source indicates the data to be copied—either a constant or the contents of a register or file. If you choose Constant, you are prompted for a number or text string. If you choose Register or File, you are prompted to specify a loca- tion. For more information, refer to Registers on page 78 and Files on page 81. Copy To Tab indicates where the data is copied.
2342.book Page 68 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Figure 44. The Modify Node Properties Dialog Data to Modify Data source specifies the location of the data to modify. If you choose Register, select a register from the displayed Register list box. To modify only one field of the register, select the Field type and select the Template and Field name from the displayed list boxes (refer to Registers on page 78). If you choose File, select the file name from the pull-down list.
2342.book Page 69 Thursday, July 22, 2004 8:35 AM Creating New Nodes Reverse Reverses the order of data in the specified register. For example, if the register value were 123456, this option would reverse the order of characters in the string to 654321. Delete Erases the data from the specified register, field or file. Clear 8th Bit Ensures that specified data is in seven-bit ASCII format. If the data is stored in eight bits, this options clears the eighth bit.
2342.book Page 70 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes For example, you could multiply the contents of the default register by 3 and store the results in a register called Triple. Rather than supplying a constant (such as 3), you could specify another register that contains the number you want to multiply, add, subtract, or divide by. Figure 45 on page 69 shows the dialog box for a Math node.
2342.book Page 71 Thursday, July 22, 2004 8:35 AM Creating New Nodes Operand 2 Tab The Operand 2 tab lets you specify a constant value or a file or register containing the second operand for the mathematical operation. The location of Operand 2 is displayed near the bottom of the dialog. Figure 47. Math Node: Operand 2 Tab For more information on files and registers, refer to Registers on page 78 and Files on page 81.
2342.book Page 72 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes Next Nodes Tab Next specifies the node to branch to if the math operation passes and where to branch to if it fails. A math operation will fail only if you attempt to divide a value by zero or operate on a nonnumeric value. Figure 49. Math Node: Next Nodes Tab Operation (Mathematical Function) At the bottom of the Math Node Properties dialog (refer to Figure 45 on page 69), there is an Operation section, shown in Figure 50.
2342.book Page 73 Thursday, July 22, 2004 8:35 AM Creating New Nodes Figure 51. Call Node Properties Dialog Call Subroutine Click on the down-arrow button to the right of the input box to display a list of all subroutines within the program. Select the subroutine you want to Call, and then select OK. A Call to a subroutine executes the specified subroutine and then returns to the node following the Call node.
2342.book Page 74 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes To draw a jointed Link (a Link with one or more bends), point to the source node, move the pointer to where you want the first joint to be, click the mouse again, and draw the next leg of the Link. Click inside a frame or node to complete the Link. Adjusting Links To adjust an existing Link, move the arrow pointer to the Link's arrowhead or joint, and hold down the left mouse button.
2342.book Page 75 Thursday, July 22, 2004 8:35 AM Automatically Generated Nodes Automatically Generated Nodes Start Nodes Start nodes point to the first node in each frame. The are created automatically by PPG when a frame or a subroutine is created. Exit Nodes Exit nodes indicate where the frame ends and returns to its parent frame. Exit nodes are created automatically by PPG when you create a Link from one frame to another.
2342.book Page 76 Thursday, July 22, 2004 8:35 AM Creating & Using Nodes NOTES 76 PT Program Generator (PPG) v5.
2342.book Page 77 Thursday, July 22, 2004 8:35 AM Chapter 6 Managing Data Overview This section discusses methods for controlling data flow, data handling, and data organization. The following topics are covered: • Controlling Data Flow on page 78. • Registers on page 78. • • • User’s Guide • Using a Register as a Source on page 78. • Register Fields on page 79. • Using a Register as a Destination on page 79. • Specifying a Register Field on page 80.
2342.book Page 78 Thursday, July 22, 2004 8:35 AM Managing Data Controlling Data Flow There are four tools you can use to control the flow of data: Table 2. Data Flow Tools Tool Description Registers Stores data temporarily. When you scan or enter a string of data, it is usually placed in a register before it is copied into a portable file. You can also use registers to store user response to a prompt, the index of a record in a file, and so on.
2342.book Page 79 Thursday, July 22, 2004 8:35 AM Registers Figure 52. The Source Register Options To view a list of existing registers, click on the arrow to the right of the register list. To select one of these registers, click on it. To create a new register, click on the New Register button. Register Fields To select a specific field in the register, select the Field checkbox. This will display a list of templates and fields within the register.
2342.book Page 80 Thursday, July 22, 2004 8:35 AM Managing Data Write Type To select how the data is stored in the register, select the write type from one of these options: Insert Insert places the data at the beginning of the register, before any existing data. Overwrite Replace replaces any data previously stored in the register. Append Append adds the data to the end of the register, after any existing data.
2342.book Page 81 Thursday, July 22, 2004 8:35 AM Files Register Example: Parsing Data You own a catalog business. When you ship packages out, you scan a label that includes the destination region. The first character of each label identifies this destination region as North, West, South, or East. Customize the application so it divides data into four separate files by region.
2342.book Page 82 Thursday, July 22, 2004 8:35 AM Managing Data Using a File as a Source From the Data Destination pull-down list, select File to make additional options available, as shown in Figure 55). Figure 55. Source File Options Select from the File pull-down list, or press the New File button to create a new file. Enable the Record checkbox to see additional options.
2342.book Page 83 Thursday, July 22, 2004 8:35 AM Files Index Index lets you indicate a register where the number of the record you want to use is stored. You are prompted for the name of the register containing the record value (refer to Using a Register as a Source on page 78. Using a File as a Destination When you choose File as the destination, you are given options as shown in Figure 56. Figure 56.
2342.book Page 84 Thursday, July 22, 2004 8:35 AM Managing Data Write Type To indicate where the new information is stored in the selected file, select one of the following options: . Insert Places the data before a given record. When this option is selected, additional options allow you to choose a specific record in the file. (These options are described in the preceding section, “Using a File as a Source.”) Overwrite Replaces a given record.
2342.book Page 85 Thursday, July 22, 2004 8:35 AM Templates or with delimiters separating variable-length fields in the record, as in the following: 2348,493848 48,393948 8,293832 9,832928 185,392038 28,282930 Once downloaded to the PC, this data file can be easily translated by a database or spreadsheet program. The first value in each record goes into a Location field, the second value goes into an Item Number field, and the program pairs the values appropriately.
2342.book Page 86 Thursday, July 22, 2004 8:35 AM Managing Data 2. In the Create Template Name field, enter the name of the template you want to create. 3. On the left, you will see a list of all currently defined fields. The list of fields currently contained in the template appears in the Available Fields list on the left. • To add an existing field to the template, select the field name and press Add. The field name now appear in the Template Fields list on the right.
2342.book Page 87 Thursday, July 22, 2004 8:35 AM Fields 1. Create an Input node to download a inventory file from the PC to a portable file. 2. Use second Input node to store a scanned part number in a register named Part Number. 3. Copy the Part Number register to a Lookup register. 4. Append ,* to the lookup key (wild card lookup). 5. Lookup Lookup register against the inventory file. This assumes that the inventory file is comma delimited, and contains Part Number and Quantity fields.
2342.book Page 88 Thursday, July 22, 2004 8:35 AM Managing Data 3. The Edit Field dialog is shown in Figure 59. Figure 59. Edit Field Dialog Using Fields in Templates The most common use of templates is to parse data in a register. A template defines the structure used to access data. The fields are either set to a fixed length (formatted into columns in the data file), or they are allowed a variable length with a separator (such as a comma) separating them.
2342.book Page 89 Thursday, July 22, 2004 8:35 AM Chapter 7 PT40 Communication Overview This chapter describes how to communicate with the PSC PT40 portable data terminal (PDT). The following topics are covered: • Downloading the Application to the PDT on page 89. • • • What Happens During a Download? on page 91. • • • XFER32 Setup on page 92. Specialized Download Situations on page 92. Using XFER32 on page 92. Sending and Receiving Data on page 96. Receive Files on page 98.
2342.book Page 90 Thursday, July 22, 2004 8:35 AM PT40 Communication • The PSC Portable Compiler window appears momentarily as PPG compiles the program, translating it into a language understood by the portable. Figure 60. PSC Portable Compiler Window • • • • The original *.scr file remains intact, and the compiled file is given the same name, but with a *.hex extension. It is this *.hex file that is downloaded into the portable.
2342.book Page 91 Thursday, July 22, 2004 8:35 AM Downloading the Application to the PDT What Happens During a Download? During the application download process, a number of steps take place. First, the downloader checks the version number of the PT40’s operating system. 1. The downloader allows you to choose from three different options. Figure 62. Updating the Operating System’s Download software.
2342.book Page 92 Thursday, July 22, 2004 8:35 AM PT40 Communication 3. The Falcon PT40 can hold up to four applications. Choose the location where you want to load your new application. • Once you select a location, your application is downloaded. • If there was previously an application in the location you select, that application will be removed and replaced with a new application.
2342.book Page 93 Thursday, July 22, 2004 8:35 AM Using XFER32 • General Tab on page 93. • Transfer Tab on page 94. • Logging Tab on page 96. The settings in these dialogs can be modified or customized to meet your communications requirements. General Tab The General tab is the first tab displayed on the XFER32 Setup dialog box. Use this section to modify the PDT’s Connection, Baud Rate, Flow Control, Protocol (ACK/NAK is the only protocol used by the PT40), and Maximum Errors.
2342.book Page 94 Thursday, July 22, 2004 8:35 AM PT40 Communication Protocol Select either XModem or ACK/NAK as the file transfer Protocol for sending and receiving files. NOTE: The PT40 defaults to the ACK/NAK protocol unless you select XModem. XFER32 defaults to the ZModem Protocol. ACK/NAK and XModem protocol are the only two protocols supported by the PT40. NOTE: ZModem Protocol is NOT supported by the PT40.
2342.book Page 95 Thursday, July 22, 2004 8:35 AM Using XFER32 Figure 66. Transfer Tab of the File Transfer Utility Sender Timeout (Seconds) Enter the maximum number of seconds to wait for a connection when sending files. A value of 0 waits indefinitely. Receiver Timeout Enter the maximum number of seconds to wait for a connection when receiving files. A value of 0 waits indefinitely. Path/Filename Transmission NOTE: ZModem Protocol is NOT supported by the Falcon PT40.
2342.book Page 96 Thursday, July 22, 2004 8:35 AM PT40 Communication Logging Tab Select the Logging tab to establish settings for the communications log. The communications log can be helpful as a trouble-shooting aid. Figure 67. Logging Tab of the File Transfer Utility Log To File Specifies that the log is to be written to a text file. Log To Screen Specifies that the log is displayed on screen. Append to Log This option becomes available when you select Log to File.
2342.book Page 97 Thursday, July 22, 2004 8:35 AM Using XFER32 Transmit (Send) Files 1. Select the Transmit Files button. Figure 68. Send File to Portable Window 2. Select the file to send. 3.
2342.book Page 98 Thursday, July 22, 2004 8:35 AM PT40 Communication Receive Files When receiving files from a data collection terminal, a prompt appears. Enter the name of the incoming file. 1. Select the Receive Files button. Figure 69. Receive File from Portable Window 2. Select (or enter) a filename for the file. 3. Click Open to begin receiving the file. Press Cancel to not receive a file.
2342.book Page 99 Thursday, July 22, 2004 8:35 AM Appendix A PPG Tutorial Overview This tutorial reviews common PPG procedures. Instructions for the following tasks are available: • Studying a Sample Program on page 100. • Building a Custom Portable Program on page 106. • • • Creating Frames and Links on page 106. • Creating the Main Menu Nodes on page 109. • Creating and Setting Up the Collect Data Nodes on page 113. • Saving Your Program on page 113.
2342.book Page 100 Thursday, July 22, 2004 8:35 AM PPG Tutorial Studying a Sample Program The easiest way to find out how a portable program works is to study an existing one. PPG comes with four sample program files. This tutorial looks at the simplest of the four. Later, you will load it into your portable and collect and upload data with it. Complete the following steps to see how a sample program works: 1.
2342.book Page 101 Thursday, July 22, 2004 8:35 AM Studying a Sample Program • The program is initially shown at what is called the Program level. This level contains a flow chart of the program's main functions. Each shape in the flowchart is either a function node or an operation node. Most of the nodes are Linked together with arrows, indicating the flow of the program.
2342.book Page 102 Thursday, July 22, 2004 8:35 AM PPG Tutorial 7. Each program frame has sublevel flow charts, which break a program down into component parts. Double-click the Main Menu frame to view its flow chart. Figure 72. The Contents of the Main Menu frame Within the Main Menu frame, each shape represents an Operation node. Operation nodes give the program detailed instructions, such as where to store scanned data. You specify these instructions by setting the properties for each Operation node.
2342.book Page 103 Thursday, July 22, 2004 8:35 AM Studying a Sample Program 10. Select the X (close button) on the top right of the Main Menu title bar to return to the higher level of the program. • Or choose the View > Show Calling Function to go back to the Sample Frame level. You can also use View > Frames and View > Nodes in the menu to jump between levels. 11. Double-click the Collect frame to view its contents (refer to Figure 74). Figure 74.
2342.book Page 104 Thursday, July 22, 2004 8:35 AM PPG Tutorial 13. Double-click the Upload frame to view the upload nodes (refer to Figure 75). Figure 75. The Contents of the Upload frame 14. Close the Upload frame window to go back to the Program level. 15. Double-click the Erase frame to view its nodes (refer to Figure 76). Figure 76. The Contents of the Erase frame 16. Close the Erase frame node to return to the Program level. 17.
2342.book Page 105 Thursday, July 22, 2004 8:35 AM Studying a Sample Program Figure 77. The Contents of the Pad Zeros subroutine 18. Close the Pad Zeros subroutine window and to return to the Program level. By looking at all the pieces of this program file, you can get a general idea of how the program is put together. The Program flow chart defines the major tasks of the program: Main Menu, Collect, Upload, Erase, and Pad Zeros.
2342.book Page 106 Thursday, July 22, 2004 8:35 AM PPG Tutorial Building a Custom Portable Program At this point, you should understand the general concepts behind creating and loading a portable program, although many of the details have yet to be explained. In this section, you'll create a simple portable program from scratch. It will allow you to collect data with the portable and upload it to your PC. A menu that appears when you turn on the portable gives you a choice of the two possible actions.
2342.book Page 107 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program Figure 78. Main Application Level of the Program 4. Click the right mouse button and select Properties (or select the frame and choose Edit > Properties from the menu) to display the Frame Properties dialog. Type Main Menu in the Name field and select OK. The frame now appears with the name Main Menu. 5. Now create the Collect Data frame.
2342.book Page 108 Thursday, July 22, 2004 8:35 AM PPG Tutorial 2. Move the Link cursor to the Main Menu frame and click the left mouse button. 3. Move the Link box to the Collect Data frame and click the mouse again. An arrow appears, pointing from the Main Menu frame to the Collect Data frame. 4. Select Create > Link from the menubar, click on the Main Menu frame, and then click on the Upload Data frame. A second arrow appears.
2342.book Page 109 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program Figure 79. Flow Chart showing Jointed Links Creating the Main Menu Nodes After defining program’s frames, you must specify the nodes for each frame. To view the a frames’ nodes, double-click on it. Or highlight the frame and select View > Show Frames/Subroutines from the menubar.
2342.book Page 110 Thursday, July 22, 2004 8:35 AM PPG Tutorial 2. Reposition the existing nodes as shown in Figure 80 on page 110. Figure 80. Repositioned nodes To reposition a node, move the mouse pointer to the node, hold down the left mouse button, and drag the node to its new position with your mouse. 3. Select Create > Menu from the menubar. A Menu node opens in the lower left of this second window. 4. Right-click the Menu node and select Properties from the pop-up menu.
2342.book Page 111 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program Figure 81. The completed Main Menu nodes 8. Right-click the Menu: Options node and select Properties to display the node’s Properties. The dialog includes a text-entry area, called Display, that represents the portable’s screen (refer to Figure 82). Figure 82. The Menu: Options Dialog Box 9. On the first line of the Display area, type Main Menu.
2342.book Page 112 Thursday, July 22, 2004 8:35 AM PPG Tutorial 10. Use the keyboard navigation keys to skip the next line and go to the third line. Enter Collect Data in the Display area. 11. Go to the 4th line and enter Upload Data, as shown in Figure 83. • To the left of the text-entry area are checkboxes for function keys used to select options presented on the portable’s screen. • The menu options you've created are designed for function keys and on the portable.
2342.book Page 113 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program 15. Select OK to exit the dialog box. Then close this frame to return to the Program level of the application. Saving Your Program Even though the program's not complete, it's a good idea to save it periodically while you are creating it. Select File > Save to save the program in a file. Enter tutorial in the File Name pull-down list of the displayed dialog box, and select OK. PPG will add the extension *.
2342.book Page 114 Thursday, July 22, 2004 8:35 AM PPG Tutorial Create nodes for the Collect Data frame by completing the following steps: 1. If you're returning from a break after exiting PPG, double-click on the PPG icon in the PT Program Generator. Then choose File > Open and select tutorial.scr from the file list. Select OK to load the file into the PPG window. 2. At the Program level, double-click the Collect Data frame to access its contents.
2342.book Page 115 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program 3. Create all the nodes shown in Figure 84 on page 114, using commands on the Create menu or icons on the Toolbar. Each node's type is indicated by the first line of text in the node. Rename each node according to the second line of text. Link the nodes together as shown. If you click twice on the Start or Exit node, this frame will move to the background window.
2342.book Page 116 Thursday, July 22, 2004 8:35 AM PPG Tutorial 2. On the Input From tab, the Input From checkboxes let you indicate which sources of input you want the portable to accept. Select the Scanner, Data Key, and Function Key checkboxes. This allows the user to input data by scanning or pressing keys. Figure 86. The Input: Item Properties Dialog: Store Info Tab • A pull-down list appears next to each selected checkbox. Specify a separate Link To setting for each type of input allowed.
2342.book Page 117 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program Figure 87. The Input Properties: Display Tab 5. Create a special register for the input data to keep it separate from other data. Figure 88. The Input: Item Properties Dialog: Store Info Tab A Register is a temporary holding place for data. Unless you specify otherwise, the program stores input data in a register named Default Register. \ 6. Click on the Store Info tab.
2342.book Page 118 Thursday, July 22, 2004 8:35 AM PPG Tutorial 7. Press the New Register button to open a Create Register window. Enter Inventory in the Create Register field to create a new Register named Inventory. Press OK. 8. In the Write type pull-down list, select Overwrite to clear existing data from the register before storing newly input data. 9. Press OK to create the new Register. 10. Press OK to save your settings and exit the Input Item dialog box.
2342.book Page 119 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program The Output: Error Beep Node Now you need to set the Output node to sound a beep. Complete the following steps: 1. Double-click the Output: Error Beep node to display its dialog box. Figure 91. The Output: Error Beep Dialog Box 2. On the Information to Output tab, select System as the Output To setting and Constant as the Data Source setting. • In the constant field, enter the characters .+ (period and plus).
2342.book Page 120 Thursday, July 22, 2004 8:35 AM PPG Tutorial The Copy: To File Node Finally, you need to set up the Copy: To File node to copy data from the Inventory register to a portable file for transmittal back to the PC. Each time new data is scanned or entered, existing data in the Inventory register is replaced. Therefore, the data must be copied and appended to a data file. Complete the following steps: 1. Double-click the Copy: To File node to display the dialog box. Figure 93.
2342.book Page 121 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program Creating and Setting Up the Upload Data Nodes The last frame, Upload Data, allows the user to copy collected data from the portable’s file to a file on the PC. You will set up nodes that do the following: • Display a menu asking if the user wants to upload data. • If the response is Yes (), send data over the serial connector to the PC. If the response is No (), exit to the Main Menu.
2342.book Page 122 Thursday, July 22, 2004 8:35 AM PPG Tutorial When creating the Links from the Output: to PC node, create the Link to the Output: Error Beep node first. This Link will be selected for the Next Node/On Error option. The Menu: Confirmation Node Complete the following steps to set up this node: 1. Double-click on the Menu: Confirmation node to open its dialog, and enter the text shown in Figure 95. Leave the second line blank. Figure 95. The Menu: Confirmation Dialog 2.
2342.book Page 123 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program Figure 96. The Output To: PC Dialog Box 3. From the Data Source pull-down list, select File. From the File pull-down list select Monthly Inventory. 4. On the Next Nodes tab, select Display Successful from the Next Node field and Output Error Beep from the On Error field. 5. Press OK to save your settings and exit the dialog box. The Output: Error Beep Node Complete the following steps to set up this node: 1.
2342.book Page 124 Thursday, July 22, 2004 8:35 AM PPG Tutorial Enable and choose Exit Main Menu to return to the Main if the user presses . Menu Figure 97. New text for the Menu: Error Text node 3. Press OK to save your settings and exit the dialog box. The Display: Successful Node Complete the following steps to set up this node: 1. Select the Display: Successful node to open its dialog. 2. Enter the text shown in Figure 98. Figure 98.
2342.book Page 125 Thursday, July 22, 2004 8:35 AM Building a Custom Portable Program 3. Enable the TimeOut checkbox. Enter 45 in the Seconds pull-down list that appears next to TimeOut. This instructs the program to return to the Main Menu if the user presses a function key or if 45 seconds pass with no input. 4. Press OK to save your settings and exit the dialog. The Modify: Erase File Node After you have uploaded data from the portable file, you will want to erase its contents.
2342.book Page 126 Thursday, July 22, 2004 8:35 AM PPG Tutorial Want a Break? If you are ready for a break, you can easily stop here. You have not made any changes that need saving, so you won’t lose any work if you exit PPG or turn off your computer. Loading and Using the Program Now that your program is tested and complete, it's time to load it into the portable and try it out. Loading the Program onto the Portable Complete the following steps to load the program onto the portable: 1.
2342.book Page 127 Thursday, July 22, 2004 8:35 AM Loading and Using the Program 1. Double-click on the PPGXFER window's Control-menu box or select File > Exit to close the window. (If downloading was unsuccessful, choose Abort from the menubar first.) 2. Double-click on the Control-menu box in the Compiler window to close it. 3. Disconnect the portable from the cable, and press the key to begin collecting data. 4. Scan the following bar codes at least once.
2342.book Page 128 Thursday, July 22, 2004 8:35 AM PPG Tutorial Creating and Using Templates The programs you've worked with so far handle singular information: You scan or enter one code at a time, and the data is stored one entry per line. But suppose you wanted to collect sets of different types of data.
2342.book Page 129 Thursday, July 22, 2004 8:35 AM Creating and Using Templates • A new Display node that will prompt the user to enter a quantity value after an item number is entered • A new Input node that will use a template to store the quantity value in a register field • Two Output nodes that will display the last-entered item and quantity values as a pair You will also alter the existing Input node to use a template.
2342.book Page 130 Thursday, July 22, 2004 8:35 AM PPG Tutorial 3. At the Program level, select the Collect Data frame, and reposition the nodes as shown in Figure 100. 4. Delete the Link from the Verify node to the Copy node. To delete a Link, use the mouse to drag its arrowhead away from a node, and doubleclick the left mouse button. You can either delete existing Links and create new ones or drag the joints of the Links until they line up. 5.
2342.book Page 131 Thursday, July 22, 2004 8:35 AM Creating and Using Templates 7. Select the new Display node (Display: How Many?).’ • Enter How Many? on the 1st line and Menu on the 4th line. • Press OK. 8. Skip over the two Output nodes for now, and select the new Input node (Input: Quantity). • On the Input From tab, enable the Data Key and Function Key checkboxes. Make sure the Scanner checkbox is disabled.
2342.book Page 132 Thursday, July 22, 2004 8:35 AM PPG Tutorial Figure 102. The Create Template Dialog • Press the New Template button to open a Create Template dialog. • Enter Combine for the name of the new template. 3. Create the field names and define their lengths. • Click on the Create Field button to display a Create Field dialog. Figure 103. The Define Field Dialog Box 132 • Define two fields for this template: Item and Quantity. Enter Item in the Field box.
2342.book Page 133 Thursday, July 22, 2004 8:35 AM Creating and Using Templates 4. Select Create Field, and enter Quantity in the Field Name box. • Select Variable, enter a space in the Delimiter field and press OK. • The Quantity field should appear on the Create Template dialog in the list of available fields. 5. Define the order of the fields in the template. • Select Item from the available fields list and press the Add button to add it to the Template Fields pull-down list.
2342.book Page 134 Thursday, July 22, 2004 8:35 AM PPG Tutorial Columns and rows are numbered starting with 0, instead of 1. Row 0, Column 0 places the output on the first column of the first line of the display. • Press OK. 10. To display the contents of the Inventory register at the cursor position on the portable’s screen, select the Output: Register node, select Inventory from the Register pull-down list, and press OK. 11. Select File > Save to store the changes you have made. 12.
2342.book Page 135 Thursday, July 22, 2004 8:35 AM Appendix B Example Frames This section provides examples of several commonly used Frames you can use in your custom PPG application. The program source files (*.scr file) for the example frames are installed during PPG installation; they are installed by default in c:\Program Files\PSC\PPG50\TIPSRC. Topics covered include: • Setting the Date and Time on page 136. • Changing the Auto-Off Timeout on page 136.
2342.book Page 136 Thursday, July 22, 2004 8:35 AM Example Frames Setting the Date and Time All PSC portables include a clock that keeps track of the current date and time. To allow users to adjust the date and time settings, complete the following steps: 1. Create a new Output node. 2. Set the Output Destination to System. 3. Select Constant as the Data Source. 4. Enter this command as the constant: • To set the time: %-; • To set the date: %. • Example: %-% displays the old time or date. 5.
2342.book Page 137 Thursday, July 22, 2004 8:35 AM Displaying the Contents of a Register Displaying the Contents of a Register Tip04.scr, illustrated in Figure 104, displays the contents of a register on the portable, using two Output nodes as follows: Figure 104. Tip04.scr Flow Chart 1. Creates a new Output node, called Position.This Output node sends information to the existing display and position the cursor within the display screen. User’s Guide • Selects Output to Display.
2342.book Page 138 Thursday, July 22, 2004 8:35 AM Example Frames 2. Creates a new Output node, called Scan. This Output node writes the register contents starting at the cursor position. • Selects Output to Display. • Chooses Register from the Data Source pull-down list. • Chooses Default Register from the Register pull-down list. The first Output node prevents the register contents from being written on the last line of the display, which is not always desirable.
2342.book Page 139 Thursday, July 22, 2004 8:35 AM Sample Verification Methods Figure 106. Verify Information Tab: Register Data Source 3. On the Verify Options tab, select Numeric as the Data Type. Figure 107. Verify Options Tab: Numeric Data Type Verifying that a Number is an Integer Another type check that may be needed is to confirm that data is an integer, rather than a fractional numeric value.
2342.book Page 140 Thursday, July 22, 2004 8:35 AM Example Frames Tip15.scr, illustrated in Figure 108 on page 139, confirms that data is an integer and performs the following steps: 1. Display Verify Integer. Figure 109. Display Integer Test 2. Enter the value to check. Figure 110. Display Input Value 3. Verify that the value is numeric (checks for any valid floating point format). 140 PT Program Generator (PPG) v5.
2342.book Page 141 Thursday, July 22, 2004 8:35 AM Sample Verification Methods Figure 111. Verify Numeric 4. Verify that there is no e in the value (floating point allows for exponents. i.e. 1.25e-6 is a valid floating point value). Figure 112. Verify No e 5. Check for a . (decimal point) (values with fractions are not integers). Figure 113.
2342.book Page 142 Thursday, July 22, 2004 8:35 AM Example Frames 6. Displays the result (pass/fail). Figure 114. Displays Pass or Fail Output Fail Output Pass Verifying Input Size To verify that a scanned or entered code is a given number of characters or within a given range, use the Size to Register option in the Input node collecting the data. This option stores the number of characters of the given input in a separate register, which can then be checked with a Verify node.
2342.book Page 143 Thursday, July 22, 2004 8:35 AM Sample Verification Methods Figure 115. Tip05.scr Verifies Input Size Display: SCAN Instructs the user to scan a bar code. Input: STORE Stores the input code in the default register and (with the Size to Register option) stores the character length of the code in a register named Input Size (refer to Figure 116). In the example, the Input node named Store puts the number of characters into a register using the size to register option.
2342.book Page 144 Thursday, July 22, 2004 8:35 AM Example Frames Figure 116. The Input: STORE Dialog Verify: EXIT Checks to see if the user pressed . If so, it exits the frame. Verify: SIZE Checks the value stored in the Input Size register. The options in its dialog box are set as shown in Figure 117. Figure 117.
2342.book Page 145 Thursday, July 22, 2004 8:35 AM Downloading a File to a PSC Portable Downloading a File to a PSC Portable Usually, users will need to upload files containing scanned or input codes to a host computer. However, it is sometimes necessary to download a file from a host to a portable. For example, you might have an inventory file that you need to check scanned codes against. Tip06.scr, shown in Figure 118, downloads a file from the host computer to a connected portable. Figure 118. Tip06.
2342.book Page 146 Thursday, July 22, 2004 8:35 AM Example Frames Verify: DNLD Checks to see if was pressed and, if it was, continues to the Display node. If was not pressed, the program loops back to the Input node and waits for further input. Display: WAIT Displays Downloading, Please Wait on the portable’s screen. Input: TO FILE Starts downloading the file. Options in its dialog box are set as shown in Figure 119 on page 146. Figure 119.
2342.book Page 147 Thursday, July 22, 2004 8:35 AM Finding the Number of Records in a File Finding the Number of Records in a File The easiest way to determine the number of records in a file is to use a Verify node with Match set to a value you know is not in the file and the Store Index in Register checkbox selected (with a register specified for storing the index value). Since it won’t find a match, the program will return the file size, storing it in the index register.
2342.book Page 148 Thursday, July 22, 2004 8:35 AM Example Frames Copy: END Copies the constant value “end” to the end of the file being checked. Verify: END Looks for the constant “end” in the file and stores the index value of the matching record in a register named INDEX. Math: INDEX-1 Subtracts 1 from the index value. Modify: DEL END Deletes the “end” record so that the constant doesn’t corrupt the file.
2342.book Page 149 Thursday, July 22, 2004 8:35 AM Searching for Data in a File Figure 121. Tip08 4. In the Verify node Verify Information tab, select File as the Data Type. and Default File as the File type. 5. In the Verify node, Verify Options tab, select ASCII as the Data Type, Register as the Comparison type, and Default Register as the Register type.
2342.book Page 150 Thursday, July 22, 2004 8:35 AM Example Frames Location Asset # Date Time Example data: Room Room Room Room 1,12345,2/24/2003,13:39:53 1,12346,2/24/2003,13:39:58 2,12347,2/24/2003,13:45:33 2,12348,2/24/2003,13:39:43 If duplicate Asset #'s are to be disallowed, the Asset # must be looked up in the second field and, if found, display a message and disallow the entry.
2342.book Page 151 Thursday, July 22, 2004 8:35 AM Splitting Records into Two Files Splitting Records into Two Files = This method is still valid, but no longer recommended since you can use Wildcards. Use Searching for a Partial Match on page 148, instead. When verifying only a part of a record, you can accelerate the process by splitting the record into two different files and referencing each file’s index position.
2342.book Page 152 Thursday, July 22, 2004 8:35 AM Example Frames Figure 122. Splitting Records into Two Files Display: WAIT Instructs the user to wait while the PSC portable completes this process. Copy: END Places the constant “end” at the end of the file to mark the last record. Copy: 1ST REC Copies the first record in the file into the default register. Verify: END Checks to see whether the default register contains the constant “end”.
2342.book Page 153 Thursday, July 22, 2004 8:35 AM Referencing Two Different Files Referencing Two Different Files Tip10.scr, illustrated in Figure 123 on page 153, uses two data files: one that contains item numbers and one that contains item descriptions. Records in both are sorted identically. By referencing data in both files, this example displays the description of an item whose number is entered by the user. Figure 123. Tip10.
2342.book Page 154 Thursday, July 22, 2004 8:35 AM Example Frames Figure 124. The Verify: IN FILE Dialog Display: NO MATCH If there is no match, Display: NO MATCH instructs the user to enter the item number again and loops back to Input: ITEM. Copy: INDEX If there is a match, the indexed position is put into a second register, and Copy: INDEX copies the record at that indexed position from the description file into the default register (refer to Figure 125 on page 154). Figure 125.
2342.book Page 155 Thursday, July 22, 2004 8:35 AM Reviewing a File Reviewing a File Tip11.scr, illustrated in Figure 126 on page 155, lets the user review the contents of a file, one record at a time. Figure 126. Tip11.scr Reviews a File Copy: END Copies the constant “end” to the end of the default file to mark the last record. Copy: INDEX=1 Copies the number 1 into a register named Index. This register will determine which record is displayed.
2342.book Page 156 Thursday, July 22, 2004 8:35 AM Example Frames Figure 127. The Output: INDEXED Dialog Math: INDEX+1 Increments the value in the INDEX register by 1 so that the next record in the file is displayed. Input: NEXT Keeps the record contents displayed until the user presses a key. The program then loops back to Verify: END so that the next record can be displayed.
2342.book Page 157 Thursday, July 22, 2004 8:35 AM Sounding a Beep Sounding a Beep To sound a beep on a portable, use an Output node with the Source option set to Constant and Destination set to System. Figure 128. Output Beep Node In the constant field, enter the human readable text of one of the following codes: Sounds a high beep . + . - Sounds a low beep You can enter more than one code, for multiple tones. For example, .+.-.
2342.book Page 158 Thursday, July 22, 2004 8:35 AM Example Frames Figure 129. Tip14.scr Pads a Number with Leading Zeros Copy: QTY Copies the quantity value in the default register into the INPUT SIZE register. Modify: REVERSE1 Reverses the order of digits in the INPUT SIZE register. Copy: ZEROS Copies six zeros to the end of the value in the INPUT SIZE register. Copy: 1ST SIX Copies the first six digits in the INPUT SIZE register back into the Quantity field of the default register.
2342.book Page 159 Thursday, July 22, 2004 8:35 AM Appendix C The PPG Library Overview PSC offers a library of several sample PPG program source files which include examples of file manipulation, templates, and nodes. Several working programs are included, although many of them are only examples and do not provide any functional value. You can download these files from the Technical Support area of PSC’s website at www.pscnet.com. This section briefly describes each of these files.
2342.book Page 160 Thursday, July 22, 2004 8:35 AM The PPG Library COMPILE.SCR A collect-only program that counts the number of duplicate entries in a file. Output format: item,repeats. CONFIG.SCR A program that allows the user to scroll through and change system parameters from a list that is loaded into the portable. FIELDS.SCR A short program that demonstrates template use by combining two inputs with a comma delimiter. FIELDS1.
2342.book Page 161 Thursday, July 22, 2004 8:35 AM PPG Program Source Files MULTIPLE.SCR A multiple-option program that includes a Collect node with a compile option; an item/quantity option; a pick list; a calculator; and a clock option. MULTPLE2.SCR A large program (342 nodes, with 8 separate programs) that has the same options as MULTIPLE.SCR plus a modem communications program, the hangman game, and a time tracker. PICKLIST.
2342.book Page 162 Thursday, July 22, 2004 8:35 AM The PPG Library NOTES 162 PT Program Generator (PPG) v5.
2342.book Page 163 Thursday, July 22, 2004 8:35 AM Appendix D PPG System Commands Overview To use PPG to reset the default settings on the PDT, enter the human readable portion of these bar codes at the system command prompt. This is useful to automatically change modes for the user. The following bar codes are provided in this section: • Using Predefined Defaults on page 164. • Alternate Parameters on page 165.
PPG System Commands Using Predefined Defaults The PSC Falcon PT40 use the following four sets of parameter defaults. Reset the portable to a predefined default set by scanning one of the bar codes in Table 3 on page 164. Table 3. Predefined Defaults for the PT40 Predefined Defaults Default Name Predefined Default 0 (D0) Predefined Default 1 (D1) Predefined Default 2 (D2) Bar Code * * * $ + $ $ + $ $ + $ Description Turns every ON/OFF parameter OFF and sets all minimum and maximum lengths to zero.
2342.book Page 165 Thursday, July 22, 2004 8:35 AM Alternate Parameters Alternate Parameters Enter these commands by scanning the bar codes with the PT40’s laser or through the PC’s serial port. You can also embed these codes in a PPG application. The Falcon PT40 recognizes the bar code commands in Table 4 on page 165. Table 4.
2342.book Page 166 Thursday, July 22, 2004 8:35 AM PPG System Commands Reset Mode CAUTION 166 Clears all memory and resets the portable. * + . * PT Program Generator (PPG) v5.
2342.book Page 167 Thursday, July 22, 2004 8:35 AM Appendix E: ASCII/Hex Conversion Table ASCII NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US User’s Guide Hex 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F ASCII SP ! “ # $ % & & ( ) * + , .
2342.book Page 168 Thursday, July 22, 2004 8:35 AM ASCII/Hex Conversion Table NOTES 168 PT Program Generator (PPG) v5.
2342.book Page 169 Thursday, July 22, 2004 8:35 AM Appendix F Useful Bar Codes File Dump * $ $ * * / . * * % .
2342.book Page 170 Thursday, July 22, 2004 8:35 AM Useful Bar Codes Reset Factory Defaults * 170 $ + S - D 2 C 8 E E * PT Program Generator (PPG) v5.
2342.book Page 171 Thursday, July 22, 2004 8:35 AM Appendix G Troubleshooting Overview Use this section to solve common problems you might have while using PPG. Following is a list of troubleshooting topics: • Fixing Corrupted Files on page 171. • Error Messages on page 173. • Technical Support on page 178. Fixing Corrupted Files Occasionally a file becomes corrupt and won't open. The .scr file is highly structured. Several things can cause this problem. Open the .
2342.book Page 172 Thursday, July 22, 2004 8:35 AM Troubleshooting Call “REVIEW”( /* 420 30 */ Source(), Special(), Nodes copied from Destination(), another Branch(, Display “SCAN” ) ), application Pasting can cause the Branch line to remain blank or to have invalid Links. To avoid this problem, do not edit files manually. Always rely on PPG to create and edit the application files. Extra blank lines at the Place the cursor at the end of the file.
2342.book Page 173 Thursday, July 22, 2004 8:35 AM Error Messages Error Messages This section lists error messages that you might come across in the PT Program Generator. Following each error message is a possible solution and, where applicable, a reference to the section of this manual in which you can find more information about solving the problem. If you continue to have trouble with your program, you can call PSC for technical assistance (refer to Technical Support on page 178).
2342.book Page 174 Thursday, July 22, 2004 8:35 AM Troubleshooting Error Message Description Invalid file access code. 1 – 3 valid. Contact PSC Technical Support Invalid grid value. Enter any nonYou have entered a zero or no value for one or zero numeric value in both grid size both grid size fields. Set both grid size fields to fields and select OK. non-zero values and press OK. Invalid function node size.
2342.book Page 175 Thursday, July 22, 2004 8:35 AM Error Messages Error Message Description Unrecognized node type found An unrecognized node type has been read. This usually indicates that the .scr file has been corrupted. Contact Technical Support for assistance. PPGComp Error Messages Table 7. PPGComp Error Messages Error Message Description Can't access PPGXFER tool to download application The PPGXfer application must be located in the same directory as PPGComp. If the PPGXfer (PPGXfer.
2342.book Page 176 Thursday, July 22, 2004 8:35 AM Troubleshooting Error Message Description Error with
2342.book Page 177 Thursday, July 22, 2004 8:35 AM Error Messages Error Messages Portable successfully programmed Description The application was successfully downloaded to the PDT. BEL received - Aborting. No response - Aborting. These errors indicate that PPGXfer received an unexpected Too many NAKs - Aborting response from the PDT. Reset the PDT and try the download again. Unknown response Aborting.
2342.book Page 178 Thursday, July 22, 2004 8:35 AM Troubleshooting Technical Support PSC Website Support PSC’s website (www.pscnet.com) is the complete source for technical support and information for PSC products. The site offers PSC’s new TekForum, product support, product registration, warranty information, product FAQs (frequently asked questions), product manuals, product tech notes, software updates, patches, demos, and instructions for returning products for repair.
2342.book Page 179 Thursday, July 22, 2004 8:35 AM Appendix H Glossary This section contains definitions for terms used in this manual. Review and familiarize yourself with these terms before using PT Program Generator (PPG) to create custom programs. User’s Guide Call node A Call node executes a branch to a subroutine. columns The display screen of your PSC portable is divided vertically into sixteen columns, numbered 0 through 15.
2342.book Page 180 Thursday, July 22, 2004 8:35 AM Glossary input Input is the information gathered during data collection or the action of gathering the information. Input node An Input node designates what type of portable input is acceptable and where the input is stored. jointed Link A jointed Link is a Link that has two or more segments intersecting at an angle/ Link A Link connects two frames or nodes with an arrow directing the program to the next step.
2342.book Page 181 Thursday, July 22, 2004 8:35 AM User’s Guide register A register is a temporary holding place for up to 128 characters of data. When you scan a bar code with a portable, the code is stored in a register until it is verified and copied into a file for safekeeping. The contents of the register are overwritten each time you scan a code. rows The display screen of the PSC Falcon PT40 is divided horizontally into rows, numbered 0 through 5.
2342.book Page 182 Thursday, July 22, 2004 8:35 AM Glossary NOTES 182 PT Program Generator (PPG) v5.
2342.
2342.book Page 184 Thursday, July 22, 2004 8:35 AM objects 35 Create menu Frame 51, 52 Link 73 creating frames 50, 106 jointed links 74, 108 links 107 from Output nodes 122 nodes 53, 114 program source files 24 registers 117 subroutines 52 Cut command 35, 36 compared with Delete 36 Cut vs.
2342.
2342.
2342.
2342.
2342.
2342.book Page 190 Thursday, July 22, 2004 8:35 AM W wand, allowing input from 58 wildcards 63 windows enlarging 13 maximizing 13 minimizing 13 reducing 13 windows controls 3 190 X XFER32 general tab 93 logging tab 96 transfer tab 94 Z zeros, padding values with 157 zoom in command 13 zoom out command 13 PT Program Generator (PPG) v5.
2342.
2342.book Page 192 Thursday, July 22, 2004 8:35 AM Asia Pacific Italy PSC Hong Kong Hong Kong Telephone: [852]-2-584-6210 Fax: [852]-2-521-0291 PSC S.p.A. Vimercate (MI), Italy Telephone: [39] (0) 39/62903.1 Fax: [39] (0) 39/6859496 Australia Japan PSC Asia Pacific Pty Ltd. North Ryde, Australia Telephone: [61] 0 (2) 9878 8999 Fax: [61] 0 (2) 9878 8688 PSC Japan K.K. Shinagawa-ku, Tokyo, Japan Telephone: 81 (0)3 3491 6761 Fax: 81 (0)3 3491 6656 France Latin America PSC S.A.R.L.