PSC PT Program Generator Operation & User’s Manual
Text of the manual
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"). Owners of PSC products are hereby granted a non-exclusive,
revocable license to reproduce and transmit this documentation for the purchaser's own internal business pur
poses. Purchaser shall not remove or alter any proprietary notices, including copyright notices, contained in this
documentation and shall ensure that all notices appear on any reproductions of the documentation.
Should future revisions of this manual be published, you can acquire printed versions by contacting PSC Customer
Administration. Electronic versions may either be downloadable from the PSC web site (www.pscnet.com) or pro
vided on appropriate media. If you visit our web site and would like to make comments or suggestions about this or
other PSC publications, please let us know via the “Contact PSC” page.
Disclaimer
Reasonable measures have been taken to ensure that the information included in this manual is complete and
accurate. However, PSC reserves the right to change any specification at any time without prior notice.
PSC is a registered trademark of PSC Inc. The PSC logo is a trademark of PSC. All other trademarks and trade
names referred to herein are property of their respective owners.
Falcon® is a registered trademark of PSC.
Microsoft Windows®, Windows® NT, Windows® ME, Windows® 95, Windows® 98, and Windows® 2000 are registered
trademarks of Microsoft Corporation.
This product may be covered by one or more of the following patents: 4603262 • 4639606 • 4652750 • 4672215 • 4699447 • 4709195 • 4709369 •
4749879 • 4792666 • 4794240 • 4798943 • 4799164 • 4820911 • 4845349 • 4861972 • 4861973 • 4866257 • 4868836 • 4879456 • 4939355 • 4939356 •
4943127 • 4963719 • 4971176 • 4971177 • 4991692 • 5001406 • 5015831 • 5019697 • 5019698 • 5086879 • 5115120 • 5144118 • 5146463 • 5179270 •
5198649 • 5200597 • 5202784 • 5208449 • 5210397 • 5212371 • 5212372 • 5214270 • 5229590 • 5231293 • 5232185 • 5233169 • 5235168 • 5237161 •
5237162 • 5239165 • 5247161 • 5256864 • 5258604 • 5258699 • 5260554 • 5274219 • 5296689 • 5298728 • 5311000 • 5327451 • 5329103 • 5330370 •
5347113 • 5347121 • 5371361 • 5382783 • 5386105 • 5389917 • 5410108 • 5420410 • 5422472 • 5426507 • 5438187 • 5440110 • 5440111 • 5446271 •
5446749 • 5448050 • 5463211 • 5475206 • 5475207 • 5479011 • 5481098 • 5491328 • 5493108 • 5504350 • 5508505 • 5512740 • 5541397 • 5552593 •
5557095 • 5563402 • 5565668 • 5576531 • 5581707 • 5594231 • 5594441 • 5598070 • 5602376 • 5608201 • 5608399 • 5612529 • 5629510 • 5635699 •
5641958 • 5646391 • 5661435 • 5664231 • 5666045 • 5671374 • 5675138 • 5682028 • 5686716 • 5696370 • 5703347 • 5705802 • 5714750 • 5717194 •
5723852 • 5750976 • 5767502 • 5770847 • 5786581 • 5786585 • 5787103 • 5789732 • 5796222 • 5804809 • 5814803 • 5814804 • 5821721 • 5822343 •
5825009 • 5834708 • 5834750 • 5837983 • 5837988 • 5852286 • 5864129 • 5869827 • 5874722 • 5883370 • 5905249 • 5907147 • 5923023 • 5925868 •
5929421 • 5945670 • 5959284 • 5962838 • 5979769 • 6000619 • 6006991 • 6012639 • 6016135 • 6024284 • 6041374 • 6042012 • 6045044 • 6047889 •
6047894 • 6056198 • 6065676 • 6069696 • 6073849 • 6073851 • 6094288 • 6112993 • 6129279 • 6129282 • 6134039 • 6142376 • 6152368 • 6152372 •
6155488 • 6166375 • 6169614 • 6173894 • 6176429 • 6188500 • 6189784 • 6213397 • 6223986 • 6230975 • 6230976 • 6237852 • 6244510 • 6259545 •
6260763 • 6266175 • 6273336 • 6276605 • 6279829 • 6290134 • 6290135 • 6293467 • 6303927 • 6311895 • 6318634 • 6328216 • 6332576 • 6332577 •
6343741 • 6,568,598 • 6,578,765 • AU703547 • D312631 • D313590 • D320011 • D320012 • D323492 • D330707 • D330708 • D349109 • D350127 •
D350735 • D351149 • D351150 • D352936 • D352937 • D352938 • D352939 • D358588 • D361565 • D372234 • D374630 • D374869 • D375493 •
D376357 • D377345 • D377346 • D377347 • D377348 • D388075 • D446524 • EP0256296 • EP0260155 • EP0260156 • EP0295936 • EP0325469 •
EP0349770 • EP0368254 • EP0442215 • EP0498366 • EP0531645 • EP0663643 • EP0698251 • GB2252333 • GB2284086 • GB2301691 • GB2304954 •
GB2307093 • GB2308267 • GB2308678 • GB2319103 • GB2333163 • GB2343079 • GB2344486 • GB2345568 • GB2354340 • ISR107546 • ISR118507
• ISR118508 • JP1962823 • JP1971216 • JP2513442 • JP2732459 • JP2829331 • JP2953593 • JP2964278 • MEX185552 • MEX187245 • RE37166 •
Other Patents Pending
Software End User License Agreement .................................................. vii
Introduction........................................................................................... 1
Document Overview......................................................................................................... 1
Style Conventions ........................................................................................................... 2
Manual Formatting Conventions................................................................................... 2
Keyboard Keys.................................................................................................... 2
Keystrokes ......................................................................................................... 2
Windows Controls................................................................................................ 3
Mouse Actions........................................................................................................... 3
Portable Keys............................................................................................................ 3
Getting Started....................................................................................... 5
Overview........................................................................................................................ 5
Before You Start.............................................................................................................. 6
What’s New in PPG v5.0?............................................................................................ 6
PPG License Agreement.............................................................................................. 6
Registering Your Copy of PPG...................................................................................... 6
PPG Installation............................................................................................................... 6
PPG System Requirements.......................................................................................... 6
Required Hardware.............................................................................................. 6
Operating Systems .............................................................................................. 7
Supported Portables................................................................................................... 7
Installing PPG ........................................................................................................... 7
Upgrading to PPG v5.0 ............................................................................................... 8
Uninstalling PPG ........................................................................................................ 8
Launching and Exiting PPG................................................................................................ 8
Launching PPG .......................................................................................................... 8
Exiting PPG............................................................................................................... 9
Overview of PPG.............................................................................................................. 9
PPG Tutorial............................................................................................................ 10
Program Files.......................................................................................................... 10
Executable Programs ......................................................................................... 10
Sample Program Files ........................................................................................ 10
PT Program Generator (PPG) v5.0
User Interface ......................................................................................................... 11
Menus and Toolbars ........................................................................................... 11
PPG Toolbar Buttons .......................................................................................... 11
Program Nodes Toolbar ...................................................................................... 12
Navigation .............................................................................................................. 13
Working with PPG Windows................................................................................. 13
Generating the Program.................................................................................................. 14
Downloading the Program ......................................................................................... 14
Transferring Data .................................................................................................... 14
PPG Application Design ........................................................................ 15
Overview ...................................................................................................................... 15
Designing the Application................................................................................................ 15
Application Output ................................................................................................... 15
Application Structure................................................................................................ 16
Node Types and the Parent-Child Relationship ................................................................... 17
Creating Function Nodes ........................................................................................... 18
Frames ............................................................................................................ 18
Subroutines ...................................................................................................... 18
Using Your Flow Chart ........................................................................................ 18
Creating Operation Nodes ......................................................................................... 18
Actual vs. Virtual Display .......................................................................................... 19
Defining Program Flow ............................................................................................. 20
Sending and Receiving Files ............................................................................................ 20
Additional Resources ...................................................................................................... 21
The PPG Menubar ................................................................................. 23
Overview ...................................................................................................................... 23
File Menu...................................................................................................................... 23
Creating a New File (Ctrl+N)............................................................................................................... 24
Opening an Existing File (Ctrl+O)....................................................................................................... 25
Closing a File .......................................................................................................... 25
Saving a File (Ctrl+S)........................................................................................................................... 25
Save As.................................................................................................................. 26
Printing a File (Ctrl+P) ......................................................................................................................... 26
Page Setup ............................................................................................................. 27
Download (Ctrl+D)................................................................................................................................ 28
Customize Application (Ctrl+Z)........................................................................................................... 28
Customize Display (Ctrl+Y) ................................................................................................................. 31
Recent Files ............................................................................................................ 33
Exit (Alt+F4)........................................................................................................................................... 34
Edit Menu ..................................................................................................................... 34
Selecting Objects..................................................................................................... 34
Moving Objects........................................................................................................ 35
Moving Links..................................................................................................... 35
Cut (Ctrl+X)............................................................................................................................................ 35
Copy (Ctrl+C)......................................................................................................................................... 35
Paste (Ctrl + V)...................................................................................................................................... 35
Delete (Del)............................................................................................................. 36
Properties............................................................................................................... 36
Function Nodes ................................................................................................. 36
Operation Nodes................................................................................................ 37
View Menu.................................................................................................................... 38
Show Calling Function .............................................................................................. 38
Show Frame/Subroutine Nodes.................................................................................. 38
Toolbar .................................................................................................................. 39
PPG ................................................................................................................. 39
Program Nodes ................................................................................................. 39
PPG Explorer........................................................................................................... 40
Status Bar .............................................................................................................. 40
Create Menu ................................................................................................................. 40
Function Nodes ....................................................................................................... 42
Frame (Ctrl+Alt+F)........................................................................................................................ 42
Subroutine (Ctrl+Alt+S)................................................................................................................ 42
Operation Nodes...................................................................................................... 42
Menu (Ctrl+Alt+U) ......................................................................................................................... 42
Display (Ctrl+Alt+D)...................................................................................................................... 42
Input (Ctrl+Alt+I)........................................................................................................................... 42
Output (Ctrl+Alt+O)...................................................................................................................... 42
Verify (Ctrl+Alt+F)......................................................................................................................... 42
Copy (Ctrl+Alt+C).......................................................................................................................... 42
Modify (Ctrl+Alt+Y)....................................................................................................................... 43
Math (Ctrl+Alt+M).......................................................................................................................... 43
Call (Ctrl+Alt+L)............................................................................................................................. 43
Link (Ctrl+Alt+N) ........................................................................................................................... 43
Data ...................................................................................................................... 43
Register ........................................................................................................... 43
File.................................................................................................................. 43
Template.......................................................................................................... 43
Field ................................................................................................................ 43
Window Menu................................................................................................................ 44
Cascade Windows .................................................................................................... 45
Tile Windows........................................................................................................... 45
Filename [Frame] .................................................................................................... 46
Help Menu .................................................................................................................... 47
PPG Help (F1)........................................................................................................................................ 47
About PPG... ........................................................................................................... 47
Creating & Using Nodes........................................................................ 49
Overview...................................................................................................................... 49
Flow Chart Levels .......................................................................................................... 50
Frames .................................................................................................................. 50
Subroutines ............................................................................................................ 51
Creating New Nodes....................................................................................................... 53
Menu Nodes............................................................................................................ 55
Menu Text ........................................................................................................ 55
Function Key..................................................................................................... 56
Display Nodes ......................................................................................................... 56
Input Nodes............................................................................................................ 57
Input From Tab (Next Nodes).............................................................................. 58
Track Size Tab .................................................................................................. 58
Display Tab ...................................................................................................... 59
Store Info Tab .................................................................................................. 60
Output Nodes.......................................................................................................... 60
PT Program Generator (PPG) v5.0
Information to Output Tab .................................................................................. 61
Special Commands ............................................................................................ 62
Next Node ........................................................................................................ 63
Verify Nodes ........................................................................................................... 63
Wildcards ......................................................................................................... 63
Verify Information Tab ....................................................................................... 64
Verify Options Tab ............................................................................................. 65
Store Index Tab ................................................................................................ 66
Next Nodes....................................................................................................... 66
Copy Nodes ............................................................................................................ 66
Copy From Tab.................................................................................................. 67
Copy To Tab ..................................................................................................... 67
Next Nodes....................................................................................................... 67
Modify Nodes .......................................................................................................... 67
Data to Modify .................................................................................................. 68
Modification Type .............................................................................................. 68
Next Nodes....................................................................................................... 69
Math Nodes............................................................................................................. 69
Floating Point Math ............................................................................................ 70
Operand 1 Tab .................................................................................................. 70
Operand 2 Tab .................................................................................................. 71
Result Tab ........................................................................................................ 71
Next Nodes Tab................................................................................................. 72
Operation (Mathematical Function) ...................................................................... 72
Call Nodes .............................................................................................................. 72
Call Subroutine ................................................................................................. 73
Links...................................................................................................................... 73
Creating Links................................................................................................... 73
Adjusting Links.................................................................................................. 74
Moving Links..................................................................................................... 74
Deleting Links ................................................................................................... 74
Automatically Generated Nodes ....................................................................................... 75
Start Nodes ............................................................................................................ 75
Exit Nodes .............................................................................................................. 75
Return Nodes .......................................................................................................... 75
Managing Data ..................................................................................... 77
Overview ...................................................................................................................... 77
Controlling Data Flow ..................................................................................................... 78
Registers ...................................................................................................................... 78
Using a Register as a Source ..................................................................................... 78
Register Fields......................................................................................................... 79
Using a Register as a Destination............................................................................... 79
Write Type........................................................................................................ 80
Specifying a Register Field ........................................................................................ 80
Register Example: Parsing Data................................................................................. 81
Files............................................................................................................................. 81
Using a File as a Source............................................................................................ 82
Data Location.......................................................................................................... 82
Using a File as a Destination...................................................................................... 83
Write Type........................................................................................................ 84
Templates..................................................................................................................... 84
Template Uses ........................................................................................................ 84
Creating a Template ................................................................................................ 85
Modifying an existing template .................................................................................. 86
Template Example: Modifying Inventory ..................................................................... 86
Fields........................................................................................................................... 87
Using Fields in Templates ......................................................................................... 88
PT40 Communication............................................................................ 89
Overview...................................................................................................................... 89
Downloading the Application to the PDT............................................................................ 89
What Happens During a Download?............................................................................ 91
Specialized Download Situations ................................................................................ 92
Using XFER32................................................................................................................ 92
XFER32 Setup ......................................................................................................... 92
General Tab...................................................................................................... 93
Transfer Tab ..................................................................................................... 94
Logging Tab...................................................................................................... 96
Sending and Receiving Data...................................................................................... 96
Transmit (Send) Files......................................................................................... 97
Receive Files..................................................................................................... 98
PPG Tutorial ......................................................................................... 99
Overview...................................................................................................................... 99
Studying a Sample Program .......................................................................................... 100
Building a Custom Portable Program............................................................................... 106
Creating Frames and Links...................................................................................... 106
Creating Frames.............................................................................................. 106
Creating Links................................................................................................. 107
Main Menu Access ........................................................................................... 108
Creating the Main Menu Nodes ................................................................................ 109
Saving Your Program ............................................................................................. 113
Creating and Setting Up the Collect Data Nodes......................................................... 113
The Display: Enter Item Node ........................................................................... 115
The Input: Item Node ...................................................................................... 115
The Verify: Input Node..................................................................................... 118
The Output: Error Beep Node............................................................................ 119
The Display: Error Text Node ............................................................................ 119
The Copy: To File Node .................................................................................... 120
Creating and Setting Up the Upload Data Nodes ........................................................ 121
The Menu: Confirmation Node........................................................................... 122
The Output: to PC Node ................................................................................... 122
The Output: Error Beep Node............................................................................ 123
The Menu: Error Text Node............................................................................... 123
The Display: Successful Node............................................................................ 124
The Input: Timeout Display Node ...................................................................... 124
The Modify: Erase File Node.............................................................................. 125
Loading and Using the Program ..................................................................................... 126
Loading the Program onto the Portable..................................................................... 126
Using the Program on the Portable........................................................................... 126
Creating and Using Templates ....................................................................................... 128
Creating the New Nodes ......................................................................................... 129
Creating the Fields................................................................................................. 131
PT Program Generator (PPG) v5.0
Example Frames................................................................................. 135
Setting the Date and Time ............................................................................................ 136
Changing the Auto-Off Timeout...................................................................................... 136
Displaying the Contents of a Register ............................................................................. 137
Sample Verification Methods.......................................................................................... 138
Verifying a Numeric Value....................................................................................... 138
Verifying that a Number is an Integer....................................................................... 139
Verifying Input Size ............................................................................................... 142
Downloading a File to a PSC Portable.............................................................................. 145
Finding the Number of Records in a File .......................................................................... 147
Searching for a Partial Match ......................................................................................... 148
Searching for Data in a File ........................................................................................... 149
Splitting Records into Two Files...................................................................................... 151
Referencing Two Different Files...................................................................................... 153
Reviewing a File........................................................................................................... 155
Sounding a Beep.......................................................................................................... 157
Padding a Number with Leading Zeros ............................................................................ 157
The PPG Library.................................................................................. 159
Overview .................................................................................................................... 159
PPG Program Source Files ............................................................................................. 159
PPG System Commands...................................................................... 163
Overview .................................................................................................................... 163
Using Predefined Defaults ............................................................................................. 164
Alternate Parameters.................................................................................................... 165
ASCII/Hex Conversion Table.............................................................. 167
Useful Bar Codes ................................................................................ 169
Troubleshooting ................................................................................. 171
Overview .................................................................................................................... 171
Fixing Corrupted Files................................................................................................... 171
Downloading the Program to the Portable........................................................................ 172
Error Messages............................................................................................................ 173
PPG Error Messages ......................................................................................... 173
PPGComp Error Messages ................................................................................. 175
PPGXfer Error Messages ................................................................................... 176
Technical Support ........................................................................................................ 178
PSC Website Support ....................................................................................... 178
PSC Website TekForum .................................................................................... 178
Reseller Technical Support ................................................................................ 178
Telephone Technical Support............................................................................. 178
Glossary ............................................................................................. 179
Index .................................................................................................. 183
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. If you do not intend to be bound by the terms of this Agreement, PSC is not willing to license the Software to you, you
may not use or copy the Software, and you must contact the party from whom you acquired the Software promptly for instructions.
This End User License Agreement (“Agreement”) is a legally binding agreement governing the licensing of the Software by PSC Inc. and its
wholly owned subsidiaries and affiliates (“PSC”) to the entity or person who has acquired the Software (“End User”). For purposes of this
Agreement, “Software” means the PT Program Generator, whether obtained directly or indirectly from PSC, including any related update or
upgrade such as enhancements or modifications, and including all accompanying documentation. Any software that is associated with a
separate end-user license agreement is licensed to you under the terms of that license agreement. PSC and End User hereby agree as follows:
1. Scope of License Granted.
1.1 PSC grants to End User a non-exclusive, non-transferable, perpetual license to use the Software, in machine-readable form only, solely for
End User's internal business purposes. This Agreement does not convey ownership of the Software to End User. Title to the Software shall be
and remain at all times with PSC or any third party from whom PSC has obtained a licensed right.
1.2 Each Software license permits End User to install the Software on a single computer only. A separate Software license must be acquired for
each computer on which the Software operates.
1.3 End User may make one copy of the Software for backup purposes, provided that End User reproduces all proprietary notices on the copy,
including patent, copyright, trademark, and other similar notices of PSC's proprietary interest in the Software.
1.4 End User shall not sell, assign, sublicense, distribute, lend, rent, give, or otherwise transfer the Software to any third party unless such third
party agrees with PSC in writing to be bound by the terms and conditions of this Agreement. Any such transfer of the Software absent such
agreement shall be null and void.
1.5 Other than as provided in this Agreement, End User shall not copy or modify the Software. Under no circumstances shall End User
decompile, disassemble, reverse engineer, or otherwise reproduce or remanufacture the Software, whether modified or unmodified, without
PSC's prior written consent.
1.6 Any copying, installing, reproduction, reverse-engineering, electronic transfer, or other use of the Software 1) on other than the number of
computers for which End User has paid for a Software license, or 2) on any non-PSC equipment, will be a material breach of this Agreement.
However, PSC may elect not to terminate this Agreement or the granted license, but instead may elect to notify End User that End User is
deemed to have ordered and accepted a license for each breaching use. End User shall pay PSC the applicable list price fees for each such
license as of the date of breach as determined by PSC.
(PPG) Software End User License Agreement
viii
PT Program Generator (PPG) v5.0
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. The license set forth in this Agreement does not transfer to End User any ownership of PSC's copyrights, patents, trademarks,
service marks, trade secrets, or other intellectual property rights and End User shall have no right to commence any legal action to obtain such
rights. End User shall not remove, modify, or take any other action that would obscure any copyright, trademark, or other intellectual property
notices contained in the Software.
3. Proprietary Information.
3.1 “Proprietary Information” means all (a) source code, object code, software, documentation, and any related internal design, system design,
data base design, algorithms, technology, technical data or information, implementation techniques, and trade secrets related to the Software,
(b) any other trade secrets marked appropriately or identified as proprietary or confidential, and (c) any information that End User, under the
circumstances, should recognize as confidential. Proprietary Information does not include any information that the receiving party can establish
was (1) in the public domain, (2) already in the receiving party's possession or rightfully known prior to receipt, (3) rightfully learned from a third
party not in violation of any other's proprietary rights, or (4) independently developed.
3.2 End User acknowledges that Proprietary Information is the confidential, proprietary, and trade secret property of PSC and End User
acquires no right or interest in any Proprietary Information.
3.3 End User shall not disclose, provide, or otherwise make available PSC's Proprietary Information to any person other than End User's
authorized employees or agents, all of whom must be under confidentiality agreement at least as restrictive as the terms of this Section 3, and
End User shall not use the Proprietary Information other than in conjunction with use of the Software exclusively for End User's internal business
purposes. End User shall take steps to protect the Proprietary Information no less securely than if it were End User's own intellectual property.
3.4 The provisions of this Section shall survive and continue for five (5) years after the termination of this Agreement.
4. Limited Warranty.
4.1 PSC warrants that, under normal use and operation, the Software will conform substantially to the applicable documentation for a period of
thirty (30) days from delivery to End User. During this period, for all reproducible nonconformities for which PSC has been given written notice,
PSC will use commercially reasonable efforts to remedy nonconformities determined by PSC. End User agrees to supply PSC with all
reasonably requested information and assistance necessary to help PSC in remedying such nonconformities. For all defects reported to PSC
within the warranty period, PSC's liability is limited to providing End User with one copy of corrections or refunding the amount End User paid for
the Software license, at PSC's discretion, and responding to End User's software problem reports according to PSC's standard assistance
practices. PSC does not warrant that the Software will meet End User's requirements or that use of the products will be uninterrupted or error
free, or that PSC's remedial efforts will correct any nonconformance. This limited warranty does not cover any software that has been
customized, subjected to damage or abuse, whether intentionally, accidentally, or by neglect, or to unauthorized repair, unauthorized alteration,
or unauthorized installation, and shall be void if End User modifies the Software, uses the Software in a manner other than as established in the
applicable documentation, or if End User breaches any of the provisions of this Agreement.
4.2 THE SOFTWARE IS PROVIDED “AS IS” AND, EXCEPT AS PROVIDED IN THIS SECTION, PSC MAKES NO WARRANTIES OF ANY
KIND, EXPRESS OR IMPLIED, WRITTEN OR ORAL, WITH RESPECT TO THE SOFTWARE, AND SPECIFICALLY DISCLAIMS THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
5. Infringement.
5.1 PSC will defend End User against any claim in a lawsuit that the Software furnished hereunder infringes a United States patent or copyright
of a third party and PSC will pay any damages finally awarded against End User by a court of competent jurisdiction that are attributable to such
claim or will pay End User's part of any settlement that is attributable to such claim, provided, that 1) End User notifies PSC promptly in writing
of the claim, 2) PSC controls the defense or settlement of the claim, and 3) End User cooperates fully with PSC in such defense or settlement.
All notices of a claim should be sent to PSC Inc., Legal Department, 111 SW Fifth Ave. Suite 4100, Portland, OR 97204-3644.
5.2 In the defense or settlement of any such claim, PSC may, at its option, 1) procure for End User the right to continue using the Software, 2)
modify the Software so that it becomes non-infringing, 3) replace the Software with an equivalent product not subject to such claim, or 4) provide
End User an opportunity to return the Software and receive a refund of the amount End User paid for the Software license, less a reasonable
allowance for use.
PT Program Generator
User’s Guide
ix
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.4 THE FOREGOING STATES PSC'S COMPLETE AND ENTIRE OBLIGATION TO END USER CONCERNING CLAIMS OF INTELLECTUAL
PROPERTY INFRINGEMENT, CANCELS AND SUPERCEDES ANY PRIOR AGREEMENTS, WHETHER ORAL OR WRITTEN, BETWEEN
PSC AND END USER CONCERNING SUCH CLAIMS, AND WILL NOT BE MODIFIED OR AMENDED BY ANY PAST,
CONTEMPORANEOUS, OR FUTURE AGREEMENTS OR DEALINGS BETWEEN PSC AND END USER, WHETHER ORAL OR WRITTEN,
EXCEPT AS SET FORTH IN A FUTURE WRITING SIGNED BY AN AUTHORIZED REPRESENTATIVE OF EACH PARTY.
6. Limitation of Liability.
PSC'S LIABILITY FOR DAMAGES, IF ANY, WHETHER BASED UPON CONTRACT, TORT (INCLUDING NEGLIGENCE), PRODUCT
LIABILITY, STRICT LIABILITY, WARRANTY, OR ANY OTHER BASIS, SHALL NOT EXCEED THE AMOUNT END USER PAID FOR THE
SOFTWARE LICENSE. UNDER NO CIRCUMSTANCES SHALL PSC BE LIABLE FOR LOST PROFITS, LOST DATA, INTERRUPTION OF
SERVICE, OR FOR ANY SPECIAL, CONSEQUENTIAL, CONTINGENT, INDIRECT, INCIDENTAL, PUNITIVE, EXEMPLARY, OR OTHER
SIMILAR DAMAGES, EVEN IF PSC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Technical Support.
End User is entitled to one (1) free technical support call in connection with End User's use of the Software. Technical support does not include
assisting End User in developing applications. End User may obtain additional support for the Software from PSC at PSC's standard support
fees and under PSC's standard support terms and conditions in effect at the time End User acquires the Software.
8. Government Restricted Rights; International Use.
The Software is provided with Restricted Rights. Use, duplication, or disclosure by the U.S. Government is subject to the restrictions for
computer software developed at private expense as set forth in the U.S. Federal Acquisition Regulations at FAR 52.227-14(g), or 52.227-19 or in
the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013(c)(1)(ii), whichever is applicable. If End User uses the
Software outside the United States, End User must comply with the local laws of the country in which the Software is used, with U.S. export
control laws, and with the English language version of this Agreement. The provisions of the “United Nations Convention on International Sale of
Goods” shall not apply to this Agreement.
9. Termination.
9.1 Either party may terminate this Agreement or any license granted under this Agreement at any time upon written notice if the other party
breaches any provision of this Agreement.
9.2 Upon termination of this Agreement, End User immediately shall cease using the Software and shall return to PSC or destroy all Software
covered by this Agreement, and shall furnish PSC with a certificate of compliance with this provision signed by an officer or authorized
representative of End User.
10. General Provisions.
10.1 Entire Agreement; Amendment. This Agreement contains the entire agreement between the parties relating to the Software and
supersedes all prior or contemporaneous agreements, written or oral, between the parties concerning the Software. This Agreement may not be
changed, amended, or modified except by written document signed by an authorized representative of each party.
10.2 Notice. All notices required or authorized under this Agreement shall be given in writing, and shall be effective when received, with
evidence of receipt. Notices shall be sent to End User at such address as End User shall provide to PSC in writing, and shall be sent to PSC
Attn: Contract Administration, PSC Inc., 959 Terry Street, Eugene, OR 97402.
10.3 Waiver. A party's failure to enforce any of the terms and conditions of this Agreement shall not prevent the party's later enforcement of such
terms and conditions.
10.4 Governing Law. This Agreement shall be governed by the laws of the State of Oregon, United States of America, excluding choice of law
provisions.
10.5 Attorneys Fees. In the event an action is brought to enforce the terms and conditions of this Agreement, the prevailing party shall be
entitled to reasonable attorneys' fees, both at trial and on appeal.
-END-
This document is divided into seven chapters and eight appendices:
•
Introduction on page 1, provides an overview of PPG, describes the con-
ventions used in this manual, and tells how to access PSC Technical
Support.
•
Getting Started on page 5, tells you how to install and run PPG. It also
gives you an overview of PPG concepts and usage.
•
PPG Application Design on page 15, provides information on program-
ming concepts including how to design your program, define pro-
gram modules and specify program flow.
•
The PPG Menubar on page 23 describes the PPG menubar and how to
access all PPG’s features using the menubar, including creating, saving
and editing applications.
•
Creating & Using Nodes on page 49, gives you detailed information on
Frames, Subroutines, Nodes, and Links.
•
Managing Data on page 77, describes the use of Registers, Fields, Files,
and Templates.
•
PT40 Communication on page 89, show you how to download applica-
tions to the PDT and how to transfer data to and from the portable
device.
•
PPG Tutorial on page 99, is a step-by-step tutorial to use in learning PPG.
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.
PT Program Generator (PPG) v5.0
•
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.
•
Useful Bar Codes on page 169, contains bar codes that can be used to
program your portable data collection unit.
•
Troubleshooting on page 171, provides troubleshooting information and
table of possible error messages.
•
Glossary on page 179, is a glossary of the specific PPG programming
terms used in this manual.
Style Conventions
Formatting conventions are used throughout this document to provide a con-
sistent method for representing various screen shots, buttons, controls, key-
board characters, notes, and cautions while you are working with PPG.
Manual Formatting Conventions
Keyboard Keys
Keyboard keys, such as ENTER, are in Bold. When keyboard keys are Linked
with a plus sign (for example, SHIFT+ENTER, or Ctrl+C), hold down the first
key while pressing the second key once.
Keystrokes
Input characters, filenames, file paths, field selections from a pull-down list,
and data or keystrokes entered by the user are shown in courier bold.
Input characters are usually given in lowercase (no capital letters); you may
enter them in lowercase, uppercase, or a combination. When input characters
are given in uppercase or a combination of lowercase and uppercase, type the
characters exactly as shown.
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.
Mouse Actions
Portable Keys
Keys on the portable data terminal (PDT) unit are bracketed with < >, to iden-
tify that they refer to the portable data collection unit, rather than the PC.
CAUTION
Cautions indicate an action where there is a possibility of damage to data integrity or
data failure. Cautions always have the Caution icon to the left.
Notes provide additional information on a topic, including technical details, excep-
tions to instructions and other pertinent information. Notes always have the notepad
icon to the left.
Click or Select
Press and immediately release the left mouse button without moving
the mouse. Clicking is used to select specific buttons on various forms
and tables.
Double Click
Click the left mouse button twice in rapid succession. Used to initiate an
application.
Right Click
Press and hold the right mouse button without moving the mouse.
— Keys
The Function keys, – , are used specifically on the
PT40 portable data collection units.
Key
To differentiate the key on the portable from the Enter
key on the PC’s keyboard, portable keys are formatted as “press
”.
Refer to this section as you prepare to install and use the PT Program Genera-
tor (PPG). The following general topics are covered:
•
Before You Start on page 6
•
What’s New in PPG v5.0? on page 6.
•
PPG License Agreement on page 6.
•
Registering Your Copy of PPG on page 6.
•
PPG Installation on page 6
•
PPG System Requirements on page 6.
•
Required Hardware on page 6.
•
Operating Systems on page 7.
•
Supported Portables on page 7.
•
Installing PPG on page 7.
•
Upgrading to PPG v5.0 on page 8.
•
Launching and Exiting PPG on page 8
•
Overview of PPG on page 9
•
PPG Tutorial on page 10.
•
User Interface on page 11.
•
Menus and Toolbars on page 11.
•
PPG Toolbar Buttons on page 11.
•
Program Nodes Toolbar on page 12.
•
Working with PPG Windows on page 13.
•
Navigation on page 13.
•
Generating the Program on page 14.
•
Downloading the Program on page 14.
•
Transferring Data on page 14.
PT Program Generator (PPG) v5.0
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. You may not make a copy for another person to
use. When you open the envelope that contains the software, this means that
you agree to the terms of the license agreement.
Registering Your Copy of PPG
PSC values your feedback. Please take a few moments and complete the Prod-
uct Registration form located on PSC's website or on the PSC Manuals CD.
Registering your products ensures that you will be informed of the latest prod-
uct news, software updates and other future developments from PSC.
PPG Installation
PPG System Requirements
PPG runs with the minimum hardware and operating system requirements
listed below. For maximum performance, install PPG onto a computer with a
higher speed processor and more memory than the minimum requirements.
Required Hardware
The following equipment is required to run PPG:
•
Processor - 450MHz
•
Memory - 12MB
•
Hard Disk - 10MB
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. A compatible docking station
or communications cable is required for the PDT to work with PPG. Contact
a portable data collection supplier to purchase the required equipment and
accessories.
Installing PPG
Complete the following steps in the installation utility to install PPG:
1.
Insert the PPG Installation disk into your PC’s CD drive. A Welcome
screen opens.
2.
Press Next on the Welcome screen to continue the installation.
3.
Press Yes, I Accept at the License Agreement screen to continue the
PPG installation process and accept the PPG license agreement.
4.
At the Destination Location screen, select the PPG destination direc-
tory:
•
PPG installs to C:\Program Files\PSC\PPG50 by
default.
•
Press the Browse button to select or create another directory in
which to install PPG.
5.
Press Next to select the installation of the PT40 software and PPG.
6.
Press Next to begin the installation of PPG. A series of Installing....
screens appear.
PT Program Generator (PPG) v5.0
7.
Finally, a message that PPG has been successfully installed is dis-
played.
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 (*.scr) are converted when you open and save
them in PPG v5.0. To maintain PPG v4.5 compatible applications, open them
in PPG v5.0 and save them with a new name or new location.
Uninstalling PPG
To uninstall PPG, use the standard method of removing programs installed on
Microsoft Windows:
1.
From the Windows Start menu, select Settings > Control Panel > Add/
Remove Programs.
2.
At the Add/Remove Programs window, select Change or Remove Pro-
grams along the left side of the window.
3.
Scroll down the screen until you locate PT Program Generator and
select it by clicking on it with your mouse.
4.
Press Change/Remove to initiate the program removal process.
Launching and Exiting PPG
Launching PPG
To launch PPG, complete the following steps:
1.
Select PPG from your Windows Start Menu > PT Program Generator
> PT Program Generator.
There is no keyboard wedge support in PPG v5.0. Applications created in previous
versions of PPG that use the keyboard wedge option can be saved in PPG v5.0, but
they must be updated with a new input method after you save them.
Overview of PPG
User’s Guide
9
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 Con-
trol-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. You
can create custom applications to collect, verify, and store data. Designing and
creating the program is the first part of the process; there are several steps
involved. Refer to PPG Application Design on page 15 for an overview of using
PPG to construct an application for your PSC portable.
PT Program Generator (PPG) v5.0
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:
Sample Program Files
PPG comes with four sample files. Some of these files are just portions of pro-
grams demonstrating use of a specific node. However, you can use any of these
samples as a foundation for building a full-size program:
PPG
PPG is the PT Program Generator application. This is the application you
use to create programs for a PSC portable.
PPGXFER
PPGXFER is used to transfer the program you created in PPG to the porta-
ble. This utility is called automatically by PPG when you download a program
to the portable. Refer to Downloading the Application to the PDT on page 89
and Specialized Download Situations on page 92.
PPGComp
PPGComp (PPG Compiler) is used to compile the program you created into
the format which is downloaded to the PDT. This utility is called automatically
by PPG when you download a program to the portable. Refer to Download-
ing the Application to the PDT on page 89.
XFER32
XFER32 is used to transfer data between a PC and the portable. After you
input data or scan bar codes with the portable, you can use this utility to
upload the data into a file on your PC. You can also use it to download infor-
mation stored in a PC file into the portable. Refer to Using XFER32 on
page 92.
sample.scr
sample.scr allows you to collect information with your portable,
upload collected data to a PC, and erase collected data. You will be using
this file as you work through PPG Application Design on page 15 and the
PPG Tutorial on page 99.
sample2.scr sample2.scr is a simple but complete data-collection program that
allows the user to enter data as either item-and-quantity values or just item
values. The program also stores data, uploads data, and erases data.
Overview of PPG
User’s Guide
11
PPG also comes with some example frames and files, discussed in Example
Frames on page 135. You can download additional PPG library files, discussed in
The PPG Library on page 159, from PSC’s website.
User Interface
Menus and Toolbars
The PPG menubar is discussed in detail in The PPG Menubar on page 23. In
Figure 2, the top toolbar is the PPG toolbar. The second toolbar is the Program
Nodes toolbar. Refer to View Menu on page 38 for information on toggling the
PPG toolbar and the Program Nodes toolbar on and off.
Figure 2. PPG Menubar, PPG Toolbar, and Program Nodes Toolbar
Refer to the following tables for descriptions of PPG toolbar and Program
Nodes toolbar buttons, their basic functions, and a Link to the section that
discusses the function in detail.
PPG Toolbar Buttons
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 Menubar
PPG Toolbar
Program Nodes Toolbar
Click this Button To
New
Create a new PPG flow chart file.
Refer to Creating a New File (Ctrl+N) on page 24.
Open
Open an existing PPG flow chart file.
Refer to Opening an Existing File (Ctrl+O) on page 25.
Save
Save an existing PPG flow chart file.
Refer to Saving a File (Ctrl+S) on page 25.
Cut
Cut the selected node to the clipboard.
Refer to Cut (Ctrl+X) on page 35.
PT Program Generator (PPG) v5.0
Program Nodes Toolbar
To create new PPG Program Nodes, click on the node’s Create button:
For a complete description of each node type, refer to Creating & Using Nodes on
page 49.
Copy
Copy the selected node to the clipboard.
Refer to Copy (Ctrl+C) on page 35.
Paste
Paste the cut or copied node to the flow chart.
Refer to Paste (Ctrl + V) on page 35.
Print
Open the Print dialog box.
Refer to Printing a File (Ctrl+P) on page 26.)
Help
Open the PPG online Help file.
Refer to PPG Help (F1) on page 47.
Click this Button
To
Frame
Create a new Frame. (Refer to Frames on page 50.)
Subroutine
Create a new Subroutine. (Refer to Subroutines on page 51.)
Menu
Create a new Menu node. (Refer to Menu Nodes on page 55.)
Display
Create a new Display node. (Refer to Display Nodes on page 56.)
Input
Create a new Input node. (Refer to Input Nodes on page 57.)
Output
Create a new Output node. (Refer to Output Nodes on page 60)
Verify
Create a new Verify node. (Refer to Verify Nodes on page 63.)
Copy
Create a new Copy node. (Refer to Copy Nodes on page 66.)
Modify
Create a new Modify node. (Refer to Modify Nodes on page 67.)
Math
Create a new Math node. (Refer to Math Nodes on page 69.)
Call
Create a new Call node. (Refer to Call Nodes on page 72.)
Link
Create a new Link. (Refer to Links on page 73.)
Click this Button To
Overview of PPG
User’s Guide
13
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.
Working with PPG Windows
To expand the PPG window to fill the screen, or the PPG Application to fill
the PPG window, select the Maximize button in the upper right corner of the
window.
To temporarily remove the PPG window from your screen without exiting the
application, select the Minimize button. The window becomes an application
icon in the Windows taskbar. Click on the taskbar icon to bring the window
back exactly as you left it.
Figure 3. Scroll bars on a Flow Chart
PT Program Generator (PPG) v5.0
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.
Downloading the Program
Once you have created a PDT application using PPG, connect your portable
to a PC and use the Download Program command to load the program into
the portable unit. PPGComp compiles the program automatically, translating
it into code that is understood by the portable, and then sends the program via
the cable to your portable. After the application has been downloaded to the
portable, you are now ready to collect data with the portable.
Transferring Data
After you have input data or scanned a series of bar codes with the pro-
grammed portable data collection unit, you can use XFER32 to transfer the col-
lected data to a file on your PC. The data is uploaded via the serial cable to a
specified file on your computer. You can also transfer data, such as a pick list
for comparing input data, from the PC to the portable. For detailed instruc-
tions, refer to PT40 Communication on page 89.
Collected data is usually a series of numbers or alphanumeric strings stored in
a file until you transfer it into a data processing program. For example, a
scanned bar code that reads 107-028-0274, once filtered through a pro-
gram set up to interpret it, is translated into more readable information, such
as DOCKERS T-LG, $25.60.
You can program the portable to translate scanned numbers into words, but
this is usually done with your data processing program. For example, you can
load the data into a spreadsheet program that performs calculations. Or use a
database program that tracks your inventory. Use PPG to format collected data
into human recognizable information.
For information on working in application windows, including using scroll bars and
selecting menu commands, refer to your Microsoft Windows documentation.
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. Virtual Display on page 19.
•
Defining Program Flow on page 20.
•
Sending and Receiving Files on page 20.
•
Additional Resources on page 21.
Designing the Application
Application Output
Before you begin to design an application, you must decide how the resulting
data will be handled. You probably have a good idea of how you would like the
collected data to be output. The result of the application is usually a file of col-
lected data, so you must determine the purpose of the file and how it is orga-
nized; this determines what data is collected and how. You may want to
examine portions of collected data or work with data files downloaded into the
PT40. After you have determined the data output format, you can begin to
define the program steps and flow.
PPG Application Design
16
PT Program Generator (PPG) v5.0
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. In what order will the actions
be taken? Walk through each step as if you were the end user.
3.
Do multiple actions contain the same step? If so, save time and pro-
gram size by putting these steps into a subroutine that can be called
from different areas of the program.
4.
Will each action be taken in a specific order or will the user be allowed
to choose an action? To offer a choice of actions, such as collecting
and uploading data, you can provide a menu that will allow the user
to select an action.
5.
Visualize the individual steps involved in each major action.
•
For example, will the user be collecting different types of data at
different times?
•
For each action you would take as a portable user, imagine the
options you would expect to have and the messages you would
expect to appear on the screen.
6.
In what order will the actions be taken?
•
Is there an obvious direction to the program? For example, a user
would normally collect data and then upload it.
•
This order should be reflected in the main menu and in the
program flow.
7.
How will the user start? Do you want to identify the user first by ask-
ing for a password or ID number? What about a log-on message?
8.
To make your design clearer, try breaking your design up into logical
sections. As a guideline, if a function contains more than ten steps,
you may want to break it down further. Keeping each frame small will
make your program easier to implement and maintain.
Node Types and the Parent-Child Relationship
User’s Guide
17
•
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.
Node Types and the Parent-Child Relationship
Build your application in a modular fashion, taking advantage of the Parent-
Child relationship. There can be multiple levels in each program flow chart.
Any type of Operation node can exist at any level. The top level is the parent
and lower levels are children.
Table 1. Function and Operation Nodes
Applications constructed with PPG contain two general types of nodes, Func-
tion Nodes, which include Frames and Subroutines, and Operation Nodes.
Each Frame in a program flow chart represents a major function or option.
Connect Frames together in a logical way that indicates program flow.
Operation Nodes are described briefly in Creating Operation Nodes on page 18, and
more completely in Creating & Using Nodes on page 49.
Function Nodes
Operation Nodes
Frames starting on page 5-50
Subroutines starting on page 5-51
Menu Nodes starting on page 5-55
Display Nodes starting on page 5-56
Input Nodes starting on page 5-57
Output Nodes starting on page 5-60
Verify Nodes starting on page 5-63
Copy Nodes starting on page 5-66
Modify Nodes starting on page 5-67
Math Nodes starting on page 5-69
Call Nodes starting on page 5-72
While it is possible to create an entire application at the main frame level, this is not
the best approach for any but the smallest applications.
PPG Application Design
18
PT Program Generator (PPG) v5.0
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 Opera-
tion Nodes. Most developers start by creating Function Nodes.
Frames
Frames contain a set of program steps that are collected and ordered in a logi-
cal structure. Frames can consist of other frames, subroutines, and nodes.
Nodes are Linked together within the frame using Links.
Subroutines
Subroutines contain nodes that execute program steps, much like Frames, but
they can be called from anywhere in the application. They should be self-con-
tained and perform functions that are used in multiple places in the applica-
tion. Use Call nodes to link Subroutines to the location within the Operation
Node or Frame where they will be called.
Using Your Flow Chart
Using the flow chart you created in Application Structure on page 16, list the
Frames and Subroutines you will define. As a general guideline, if the func-
tion is used in multiple places, make it a Subroutine. Otherwise, it should be a
Frame. Once all Function Nodes are created, define each step by creating the
Operation Nodes.
Creating Operation Nodes
Each Operation Node represents a program step or work performed by the
application. After you have created the frames and subroutines, fill in the pro-
gram steps for each function node. Using the flow chart, create an appropriate
Operation Node for each step in the Frame or Subroutine. There are nine dif-
ferent types of Operation Nodes to chose from, as shown in Table 1 on page 17.
Node Types and the Parent-Child Relationship
User’s Guide
19
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. Actual Display Using Default System Font
The actual display screen shows only a portion of the available data in the vir-
tual display. Use the arrow keys to navigate the actual display screen to view
the virtual display data. The text in the virtual display remains in place and the
actual display screen changes its view within the virtual display.
If you scan longer bar codes or enter more data than can fit in a single line of
the virtual display, the data automatically wraps to the next line. Because
applications for the PT40 can contain and use different fonts, the amount of
data that is available within the virtual display will vary.
Actual Display
The shaded box
represents the PT40
display screen.
Virtual Display: The larger area represents the maxi-
mum size for the Virtual Display in some applications
(visible to the user only by using the arrow navigation keys)
25 lines high
80 characters wide
F1=NEXT F2=PRE
REC#12 OF 16
120850A30NME5274J400984019
F3=REV F4=EXIT
F1=NEXT F2=PRE
REC#13 OF 16
120850A30NME5274J400942885
F3=REV F4=EXIT
F1=NEXT F2=PRE
REC#11 OF 16
120850A30NME5274J400967629
F3=REV F4=EXIT
16 characters wide
6 lines high
0,0
Adding or changing character sizes changes the appearance of the actual display.
The number of lines and characters will vary with the character sizes.
PPG Application Design
20
PT Program Generator (PPG) v5.0
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. Some nodes will have multiple entry and exit points. For example, a
Copy node can have either one or two exit points. You may choose to have
your application go to a Display node if an error occurs or, if the copy opera-
tion is successful, to continue on to a Menu node.
For information on the mechanics of creating, modifying and deleting Links,
refer to Links on page 73.
Refer to Data on page 43 for a brief overview of data types and Links to each
type’s description. For more detailed information on managing program data
or to specify a Data File, Field, Template, or Register, refer to Managing Data on
page 77.
Sending and Receiving Files
The final step in using PPG is to transfer the applications you have created to
the Falcon PT40. Refer to PT40 Communication on page 89 for more information
on sending and receiving files.
Figure 5 on page 21 is a flow chart showing the application generation, data flow,
file transfer process used when you create custom files with PPG and down-
load them to your PSC Falcon PT40 from a PC.
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. You can open these files to see how they
are constructed, and use them as building blocks in constructing your own
application.
Refer to Example Frames on page 135 for information on the example frames
included with PPG. Refer to The PPG Library on page 159 for information on
sample PPG program source files which you can download from PSC’s website
that include examples of file manipulation, templates, and nodes.
You can download additional library files at no charge from the Technical Sup-
port area of PSC’s website at www.pscnet.com. Refer to The PPG Library on
page 159 for more information on these files.
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.
File Menu
The following sub-topics are covered in this section:
•
Creating a New File (Ctrl+N) on page 24.
•
Opening an Existing File (Ctrl+O) on page 25.
•
Closing a File on page 25.
•
Saving a File (Ctrl+S) on page 25.
•
Save As on page 26.
•
Printing a File (Ctrl+P) on page 26.
•
Page Setup on page 27.
•
Download (Ctrl+D) on page 28.
•
Customize Application (Ctrl+Z) on page 28
•
Customize Display (Ctrl+Y) on page 31.
•
Recent Files on page 33.
•
Exit (Alt+F4) on page 34.
The PPG Menubar
24
PT Program Generator (PPG) v5.0
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 Win-
dows 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. To save a program flow
chart, you store it as a file. Once you have saved the file, you can open it and
modify it. Use the File menu to create a new file, open an existing file, save a
file, save a file with a new name, close a file, and print a file.
Creating a New File (Ctrl+N)
To create a new flow chart, select File > New from the menubar. If no applica-
tion is currently open, an empty flow chart is loaded into the PPG window. If
an application is already open, a second copy of PPG will start and open the
empty application.
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 direc-
tory from those lists, or type them in the input box. Select the file you want to
open from the File list or type its name in the input box, and select OK. If no
application is currently open, the specified file is loaded into the PPG window.
If an application is already open, a second copy of PPG will start and open the
file you selected.
Closing a File
To close a file and leave PPG open, select File > Close from the menubar. If
you have made changes to the file, PPG will ask you if you want to save your
changes. Press OK to save the changes and close the file.
Saving a File (Ctrl+S)
After you saved a flow chart in a file, use File > Save to save changes to it with-
out being prompted for a file name. If a file has not already been saved, you are
prompted to name the file. Select OK to save the program flow chart in the
specified file.
The PPG Menubar
26
PT Program Generator (PPG) v5.0
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.
Save As
To save a newly created file for the first time (or to save an existing file with a
different filename or location), select File> Save As from the menubar. This
opens the Save As dialog box, shown in Figure 8.
Figure 8. The Save As Dialog
Type a name for the new file in the File Name field. The pull-down list dis-
plays the names of all existing source-program files in the PPG directory.
Unless you want to overwrite the contents of an existing file, use a unique
name. PPG automatically provides the program file with a *.scr extension.
By default, the file is saved in the directory in which you installed PPG, and
this is where PPG will look to open a file. To store the file somewhere else,
select or enter the drive and directory before the file name in the File Name
field.
Printing a File (Ctrl+P)
To print the current view of a program flow chart, select File > Print from the
menubar. Refer to the Print dialog, shown in Figure 9.)
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.)
The PPG Menubar
28
PT Program Generator (PPG) v5.0
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 >
Download 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.
Refer to PT40 Communication on page 89 for complete instructions on download-
ing and transferring files to and from your PC and the PDT.
Customize Application (Ctrl+Z)
Each application is designed to run in a specific environment. To change the
application settings and open the Customize Application dialog box:
1.
Select File > Customize Application from the menubar.
Figure 11. The Customize Application Dialog
2.
Change the desired settings as explained below:
PDT Options
Click on the arrow to access the fields’ pull-down lists.
Default PDT type
Determines the PSC por-
table defaults. Select from
one of two PSC portable
types.
Default Language
Determines the language
and font size in which
prompts appear on the
PDT.
Default Font Size
Determines the language
and font size in which all
other text appears on the
PDT.
The PPG Menubar
30
PT Program Generator (PPG) v5.0
3.
Select OK to save your settings. This opens the dialog shown in
Figure 13 on page 31.
Appearance
You can change the appearance of nodes with these fields.
Font
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. Corresponding settings
for previously-created applications will not be changed.
Node Type
Default width / height for nodes and grids are displayed in pixels
Width
Height
Function
100
25
Operation
80
38
Width and Height indicate the number of pixels between points.
If some of the text in flow chart nodes is being cut off, you can either increase the node
size or decrease the font size.
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 dia-
log box, as shown in Figure 14 on page 31.
Figure 14. The Display Options Window
The PPG Menubar
32
PT Program Generator (PPG) v5.0
Grid
Each flow chart has a grid background, which is useful in organiz-
ing 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.
Dimensions
Default width/height =
10 pixels between
points.
Appearance
You can change the shape and color for each type of node in the
flow chart.
Node type
Select the node type
you wish to modify from
the Node type pull-
down list.
The shape, text style
and colors currently set
for that node type are
displayed.
Shape
Select a shape for the
node from the pull-down
list.
Text color
Select a text color for
the node from the pull-
down list. Default =
Black.
Select File > Recent Files from the menubar to show a list of recently opened
PPG files.
Figure 15. Recent Files Menu
You can select a file to open from this list.
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 pull-
down list. Default =
Navy.
More Colors...
Click on More Colors... to open a standard Windows dialog box
for creating custom colors.
Startup
Select the checkbox to enable this feature when PPG opens.
Show PPG
Toolbar
Enable to display the File toobar.
Show Program
Nodes toolbar
Enable to display Program Nodes toobar when PPG opens.
Show PPG
Explorer
Enable to display the PPG Explorer window when PPG opens.
The PPG Menubar
34
PT Program Generator (PPG) v5.0
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.
•
Properties on page 36
To access Edit menu items, select Edit > and then the specific menu item you
want to use from the menubar, as shown in Figure 16 on page 34.
Figure 16.The Edit Menu
Selecting Objects
Select multiple objects using standard Windows selection methods:
•
Select one object. Hold down the shift button, point and select
another object with your right mouse button. Add as many objects as
you wish, holding down the shift button while selecting the object
with the mouse.
•
You can also select a group of objects by pointing to a spot on the
frame window which is above and to the left of the items to be
selected. Hold down the left mouse button and drag the pointer to a
point below and to the right of the objects to be selected. When the
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. Then go to where you want
the cut or copied object inserted and choose Edit > Paste. The object is pasted
in the top left corner of the window; drag it with the mouse to reposition it.
You can use the Cut, Copy, and Paste commands to move and copy parts of a
flow chart from one frame to another or from one program to another. These
commands operate on frames and nodes just like they do on text or graphics in
other Windows applications.
Moving Links
To move a node while retaining the position of anchored, jointed links, press
and hold the Shift and Ctrl keys while grasping the node with the mouse and
moving it to the new location.
Cut (Ctrl+X)
Select Edit > Cut from the menubar to cut the selected item. Or you can use
the standard Windows keyboard shortcut and press Ctrl+X.
Copy (Ctrl+C)
Select Edit > Copy from the menubar to copy the selected item. You can also
use the standard Windows keyboard shortcut and press Ctrl+C.
Paste (Ctrl + V)
Select Edit > Paste from the menubar to paste the copied item.Or you can use
the standard Windows keyboard shortcut and press Ctrl+V.
Fields and templates cannot be moved or copied between programs.
Copied nodes lose their template and field references if the application in which they
are placed does not have the same data elements.
The PPG Menubar
36
PT Program Generator (PPG) v5.0
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.
Properties
Select Edit > Properties from the menubar to view the Properties dialog for
both Function and Operation Nodes.
Function Nodes
For Function Nodes (Frames and Subroutines) you can also point to the node
and click the right mouse button to activate a popup menu; select Properties.
The Function Node’s Properties dialog opens, showing the assigned name and
description.
Figure 17. Subroutine Properties Dialog Box
•
To keep modifications, press OK; a new name shows on the node.
•
Press Cancel to close the dialog without keeping your modifications.
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. That way, if you delete something by mistake,
you can use the Paste command to retain the information.
Name
PPG automatically names the item with its type. You can rename or
change the name of the item.
Description
This field is optional, but you may wish to complete it to provide yourself
additional information when using similarly named items.
For Operation Nodes you can also access the Properties dialog using the fol-
lowing 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. Refer to Creating & Using Nodes starting on page 49 to view the proper-
ties dialog for each node type.
Figure 18. Display Node Properties Dialog Box
•
To approve the changes, press OK to view the new name on the node.
•
Press Cancel to close the dialog without keeping your modifications.
Name
PPG automatically names the item with its type. You can rename or
change the name of the item.
Description
This field is optional, but you may wish to complete it to provide yourself
additional information when using similarly named items.
Display
This displays what will appear in the portable’s display window.
Next Node
Select the next node in the application’s sequence of events.
The PPG Menubar
38
PT Program Generator (PPG) v5.0
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. Refer to Node Types and the Parent-Child Relationship on page 17 for
more information on the Parent-Child relationship.
Figure 19. View Menu > Show Calling Function
Show Frame/Subroutine Nodes
Select View > Show Frame/Subroutine Nodes from the menubar. You can
select this menu item only after clicking on a Frame or Subroutine node.
Figure 20. View Menu > Show Frames/Subroutine Nodes
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. Selecting this menu item toggles the
PPG Program Nodes Toolbar on and off. Refer to Program Nodes Toolbar on
page 12 for a table showing what each node button does and where to get more
information on each node type.
The PPG Menubar
40
PT Program Generator (PPG) v5.0
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.
Status Bar
Select View > Status bar to toggle the bottom status bar on or off.
When you print to a menu or toolbar command, the status bar displays a text
description of the command. Toggling the status bar off makes the application
display window slightly larger.
Create Menu
From the menubar, select Create > and then the type of node or data you wish
to create:
•
Function Nodes on page 42.
•
Frame (Ctrl+Alt+F) on page 42.
•
Subroutine (Ctrl+Alt+S) on page 42.
•
Operation Nodes on page 42.
•
Menu (Ctrl+Alt+U) on page 42.
•
Display (Ctrl+Alt+D) on page 42.
Input (Ctrl+Alt+I) on page 42.
•
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.
•
Register on page 43.
•
File on page 43.
•
Template on page 43.
•
Field on page 43.
Refer to Creating & Using Nodes on page 49 for a a complete review of creating and
using nodes.
Figure 22. Create Menu
The PPG Menubar
42
PT Program Generator (PPG) v5.0
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)
Menu 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 informa-
tion on Menus, refer to Menu Nodes on page 55.
Display (Ctrl+Alt+D)
Display nodes display text on the portable’s screen. Refer to Display Nodes on
page 56
Input (Ctrl+Alt+I)
Input nodes specify how the portable will receive data. You can indicate how
the input is accepted and where it is stored. Refer to Input Nodes on page 57.
Output (Ctrl+Alt+O)
Output nodes send data to either the display, serial port or the portable’s system
software. Output to the system software allows you to send special commands
to reposition the cursor, sound a beep or reconfigure the portable. Refer to Out-
put Nodes on page 60
Verify (Ctrl+Alt+F)
Verify nodes test data in a register or file to see if it matches the expected type
or value. Refer to Verify Nodes on page 63
Copy (Ctrl+Alt+C)
Copy nodes move data between registers and files. Refer to Copy Nodes on
page 66.
Modify nodes change the contents of a given register or file. Refer to Modify
Nodes on page 67.
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.
Link (Ctrl+Alt+N)
Links connect other nodes (except Subroutines.) For complete information on
Links, refer to Links on page 73.
Data
The portable has its own data storage methods. Refer to Managing Data on
page 77 for information on Data Files, Fields, Templates, and Registers.
Register
Registers store data temporarily. For complete information on Registers, refer
to Registers on page 78.
File
Files hold data in the portable until it can be uploaded to a PC. For complete
information on Files, refer to Files on page 81.
Template
Use templates to combine data stored in different registers or break down data
in a single register into fields. For complete information on Templates, refer to
Templates on page 84.,
Field
Fields allow you to store multiple pieces of data in a single register. For com-
plete information on Fields, refer to Fields on page 87.
The PPG Menubar
44
PT Program Generator (PPG) v5.0
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
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 non-
overlapping tiles. Refer to Figure 26 on page 46, to view tiled windows.
The PPG Menubar
46
PT Program Generator (PPG) v5.0
Figure 26. Windows Arranged by Tiling
Filename [Frame]
Select Windows > Filename [Frame] from the menubar to bring a window hid-
den behind other windows to the top or to expand a minimized Frame.
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...
The About dialog shows information about the PPG application including
copyright and version information.
Figure 28. About PPG...
Creating & Using Nodes
Overview
This section contains the following topics:
•
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.
•
Call Nodes on page 72.
•
Links on page 73.
•
Automatically Generated Nodes on page 75
•
Start Nodes on page 75.
•
Exit Nodes on page 75.
•
Return Nodes on page 75.
Creating & Using Nodes
50
PT Program Generator (PPG) v5.0
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.
To access the steps within a frame or subroutine, double-click on the frame
with the left mouse button or select View > Show Frame/Subroutine Nodes
from the menubar. To return to the higher level, double-click on one of the
Exit or Entry nodes or choose View > Show Calling Function from the
menubar.
Frames
Each frame in a program flow chart represents a major function or option.
Typically, a program's frames include a Main Menu frame and a frame for each
option on the menu. Links connect the frames in a way that indicates program
flow. Figure 29 shows the start frame of the sample2.scr application
installed with PPG.
Figure 29. The Frames Level of a Program
To create the frames of a program flow chart, complete the following steps:
Flow Chart Levels
User’s Guide
51
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.
3.
To give the frame a more useful name, select Edit > Properties from
the menu or select Properties from the pop-up menu (point and click
the right mouse button). This opens the Frame Properties dialog box.
Figure 30. The Frame/Subroutine Properties Dialog Box
Subroutines
Subroutines, like frames, are nodes that contain program steps. Subroutines
are useful when your program uses the same sequence of nodes in several
frames. Rather than repeating the nodes for each frame, you can put them in a
subroutine and then use a Call node to reference the subroutine (refer to Call
Nodes on page 72).
If you're creating several frames, you can create a single frame node as described
above. Then select the frame by clicking on it with the left mouse button. Copy the
frame by selecting Edit > Copy from the menu. Then select Edit > Paste as many
times as necessary to create the number of copies you need.
Name
PPG automatically names the item with its type. You can rename or
change the name of the item.
Description
This field is optional, but you may wish to complete it to provide yourself
additional information when using similarly named items.
Creating & Using Nodes
52
PT Program Generator (PPG) v5.0
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. However, to
make subroutine management easier, most applications will locate subroutines
either at the top-most frame level or in a separate frame that contains all appli-
cation subroutines.
Figure 31. Subroutines in a PPG program
Creating subroutines is the same as creating frames. Complete the following
steps:
1.
Select Create > Subroutine from the menubar. A new subroutine
opens in the lower right corner of the frame. The new subroutine is
assigned a default name.
Creating New Nodes
User’s Guide
53
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.
To give the subroutine a more useful name, select Edit > Properties
from the menubar or select Properties from the pop-up menu (point
and click the right mouse button). This opens the Subroutine Proper-
ties dialog box (Figure 30 on page 51). Enter the new name in the name
field, and select OK.
To reference a subroutine from within a frame, use a Call node (refer to Call
Nodes on page 72). When the subroutine has been executed, control continues
with the next node after the Call node.
Creating New Nodes
Each Frame and Subroutine of a program flow chart contains its own set of
nodes, in a child (sub-level) flow chart. Every Frame is assigned at least one
node automatically: a Start node, which shows the name of the Frame. If the
Frame contains Links to other frames, an Exit node for each Link is also cre-
ated automatically. A subroutine has a Start node and a Return node, which
are created automatically by PPG. You add and Link your own nodes to define
details for the Frame.
To get to the Operation level of a frame, double-click on it. You can also move
to it with the mouse and then select View > ShowFrame/Subroutine Nodes
from the menubar.
To create a node, complete the following steps:
1.
Select the type of node you want to create from the Create menu. A
new node will appear in the lower right corner of the frame window.
The new node is assigned a default name.
If you're creating several subroutines, you can create a single subroutines as
described above. Then select the subroutine by clicking on it with the left mouse but-
ton. Copy the subroutine by selecting Edit > Copy from the menu. Then select Edit >
Paste as many times as necessary to create the number of copies you need.
Creating & Using Nodes
54
PT Program Generator (PPG) v5.0
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.
•
This opens the Node Properties (refer to Figure 33 on page 57).
•
Enter the new name in the name field, and press OK.
4.
To set options and specify functions for the node, display the node’s
Properties dialog as described in Step 3, above. Set options and enter
information as necessary, and then select OK to save your changes.
Each node you create requires at least one Link to another node; some require
two or more. Use the Create Link command to draw Links from one node to
another (refer to Creating Links on page 73).
Each node is defined by a series of properties. To view or modify the properties
of any node, double-click on the node with the left mouse button, select Edit >
Properties from the menu or select Properties from the menu which appears
when you point to the node and click the right mouse button. This opens the
Node Properties dialog box (refer to Figure 32 on page 55).
All nodes contain the following fields:
Many Node Properties dialogs also contain the following:
If you're creating several nodes of the same type, create a single node as described
above. Then select the node by clicking on it with the left mouse button. Copy the
node by selecting Edit > Copy from the menu. Then select Edit > Paste as many
times as necessary to create sufficient copies.
Name
Edit as desired to call the Node by a meaningful name.
Description
Edit as desired to differentiate between similar nodes and node types.
Next Node
For each selected node, specify a frame or node to branch to.
Display
Enter text as you wish it to appear on the display of the PDT.
Creating New Nodes
User’s Guide
55
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. The porta-
ble’s function keys can be used with or without the shift key, allowing for a
total of eight selectable menu options.
Figure 32 on page 55 shows the Properties dialog for a Menu node.
Figure 32. Properties Dialog for a Menu node
Menu Text
The Menu Display window represents the portable’s screen. The Falcon PT40
display can vary, depending upon the options you selected in Customize Applica-
tion (Ctrl+Z) on page 28. Refer to Actual vs. Virtual Display on page 19 for more infor-
mation.
•
System font size 8: the display is 6 rows by 16 characters wide.
•
System font size 12: the display is 4 rows by12 characters wide.
•
Chinese characters: the display is 3 rows x 8 characters wide.
Creating & Using Nodes
56
PT Program Generator (PPG) v5.0
•
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 gen-
eral, 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.
Function Key
The through checkboxes activate or deactivate the function keys
associated with each line of the screen. If you want the function key to execute
an option on the menu, select it here. Next to each checked box, there is a
pull-down list of nodes from which you can select the name of the node that
comes next when that function key is selected.
Any function keys not activated in the Menu node dialog box will have no
effect when pressed.
Display Nodes
Display nodes display text on the portable’s screen. The dialog box for Display
nodes (refer to Figure 33 on page 57) contains a text-entry area the exact size of
the portable’s screen. Use it to enter the display text.
Refer to Actual vs. Virtual Display on page 19 for more information
To display information on the portable’s screen use a Display node instead of a
Menu node (refer to Display Nodes).
To execute only one action regardless of which function key is displayed, use a Dis-
play node in conjunction with an Input node (refer to Input Nodes on page 57).
Display nodes are designed to display data. To present options that can be selected
with the portable’s function keys, use a Menu node (refer to Menu Nodes on page 55).
Creating New Nodes
User’s Guide
57
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. Input Node Property Dialog
Creating & Using Nodes
58
PT Program Generator (PPG) v5.0
Input From Tab (Next Nodes)
For each selected input source, specify the frame or node to branch to. The
pull-down list for this option lists each node in the frame or subroutine. Select
the next node to be completed for each input type. You can specify a different
Link for each type of source. For example, you could Link any scanned (scan-
ner) input to a Verify node that makes sure it's a valid number and at the same
time set up any function key input to return to the Main Menu. You can also
specify a file or register to store the input data in, create a Link for a timeout
condition (no input received within a given number of seconds), and arrange
for input data to be displayed in a specific position on the screen.
Track Size Tab
The Track Size tab option specifies whether to save the number of characters
received. Selecting this option allows you to select a register (refer to Registers
on page 78). Be sure to use a different register from the one used to store the
data. For serial input with a file as the destination, the number of records in
the file is saved as the size in the register.
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. There are four function keys,
through or you can press the key once to put the unit
into shifted mode. This results in function keys through .
For example, press shift and then to enter . The program pro-
ceeds without waiting for the user to press the ENTER key.
Serial
Allows data, such as downloaded inventory, to be input using the serial inter-
face or serial device.
On Error
For each selected node, specify a frame or node to branch to upon receiving
an error.
TimeOut
Specifies the number of seconds the portable will wait for data to be input. If
no response is encountered within that time, the program moves on to the
node specified by the Link To setting.
Creating New Nodes
User’s Guide
59
Figure 35. Input Node: Track Size Tab
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 posi-
tion. Selecting the current cursor position may cause the data display to vary.
Selecting a screen position allows you to specify an exact starting position.
The clearing option allows you to further control the display. To remove exist-
ing data from the line on which the input data is displayed, select either To
end-of-line or Count. Select the appropriate option for the data you expect to
receive.
The echoed input is left on the screen until you display something else.
An Input Size register is predefined for your convenience.
The default settings (0 for both row and column) start the display in the top-left cor-
ner of the screen. The rows and columns are numbered starting with 0; the first row
is 0, the second is 1, and so on. Specify rows 0 through 5 and columns 0 through
15 on a PT40.
Creating & Using Nodes
60
PT Program Generator (PPG) v5.0
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 Desti-
nation 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. Specify or define a template, and select the field (refer to Creat-
ing a Template on page 85).
To store the data in a file, select File from the Data Destination pull-down
list, and select a file from the File pull-down list. You can choose to insert the
data before a given record in the file, replace a given record, or insert the data
in alphabetic or numeric order (refer to Files on page 81).
Output Nodes
Output nodes send data to the portable’s display, serial port, or system soft-
ware.
Creating New Nodes
User’s Guide
61
Figure 38. The Output Node Properties Dialog
You can send a constant value or the contents of a register or file. When send-
ing 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 com-
mands to the display to reposition the cursor or erase the display.
Figure 38 on page 61 shows an Output node properties dialog.
Information to Output Tab
Output To specifies the channel over which data is sent.
Output To
Select an option to Output To.
Display
Writes the data to the portable’s screen, starting at the current cursor
position. You can also send special commands to position the cursor
on the display.
Serial
Sends the data over the portable's serial port to a connected PC (to
upload a file, for example).
System
Sends the data to the portable's operating system. This option is used
with special commands that sound a beep, set bar code parameters,
set serial parameters, or set the system date or time, etc.
Creating & Using Nodes
62
PT Program Generator (PPG) v5.0
Special Commands
You can use an Output node to send special commands to the portable's dis-
play or operating system.
Creating Special Display Commands
To create a command to send to the display, complete the following steps:
1.
Select Display as the Output to Device.
2.
Select String as the Data Source.
3.
To add a command, press the Add button. An Add Output Operation
dialog appears (shown in Figure 39).
Figure 39. The Output Operation dialog
Information to
Output
The Information to Output
options specify the data or com-
mand to be transmitted (string),
or the register or file containing
the data.
Refer to Registers on page 78 and Files on page 81.
Select
Operation
Select the location for the beginning of the command to appear on the porta-
ble’s display from the Select Operation pull-down list.
Move to row, column within current display
Erase all text from cursor to EOL
Move to row, column within the virtual screen. Refer to Actual vs. Virtual Display on
page 19 for more information.
Creating New Nodes
User’s Guide
63
4.
Fill in the appropriate values and select OK.
You may combine multiple Output commands in a single command string.
Creating Special System Commands
Refer to the Falcon PT40 Product Reference Guide for a table of system com-
mands.
Next Node
Next node specifies the next operation to perform depending upon the success
or failure of the output.
Verify Nodes
Verify nodes test data in a register or file to see if it is a certain type (ASCII,
numeric, or alphabetic). They can also check that the data matches a given
constant, matches the contents of a register, or falls within a given numeric or
alphabetic range.
Usually a Verify node Links to one node if the data passes the test and to
another node if it doesn't. For example, a Verify node might check to see if the
value scanned is numeric. If it is, the Verify node might branch to an Output
node that sends the value to a file; otherwise, it might display an error message.
Wildcards
PPG supports the use of wildcards in searches and verifications. The following
wildcards are supported:
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.
*
Any sequence of characters.
Creating & Using Nodes
64
PT Program Generator (PPG) v5.0
Figure 40 on page 64 shows the Verify Information tab of the Verify node proper-
ties dialog.
Verify Information Tab
Figure 40. The Verify Node Properties Dialog
Data Verify Source specifies the location of the data to be verified—either a
register or a file. The Sorted setting uses a binary search algorithm to speed up
the file searches. This option works only with presorted files. Use the displayed
sub-dialog box to specify the exact register or file (Using a Register as a Source on
page 78 and Using a File as a Source on page 82).
?
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).
Creating New Nodes
User’s Guide
65
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 char-
acters 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.
NOTE: Use the ASCII setting only if you don’t care if the data
is numbers or letters.
Numeric values
Numeric values (hex values 30 to 39) include the characters +
(plus), - (minus), and . (period).
Alphabetic
values
Alphabetic values include hex values 41 to 5A and 61 to 7A.
Comparison Type
Comparison Type
specifies the data to be
tested against.
Creating & Using Nodes
66
PT Program Generator (PPG) v5.0
Store Index Tab
Figure 42. Store Index Tab
The Store Index In Register option stores in a register the number of the first
record in the file that passes the verification. If there is no match, it stores the
position of the last record. Select a register name from the list. This option is
only available when the Verify Source option is set to File.
Next Nodes
Next node specifies the next operation to go to when the verify function suc-
ceeds or fails.
Copy Nodes
Copy nodes are used to move data between registers and files. Collected data is
often stored temporarily in a register until it is validated. Then a Copy node
transfers the data into a file. A Copy node can also copy data from a portable
file to a register, where it can be referenced or displayed. You can also use a
Copy node to copy a constant value to a register or file or to copy data between
files and between registers.
Figure 43 on page 67 shows the dialog box associated with a Copy node.
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.)
Ignore Case
Ignore Case verifies the data match regardless of capitalization.
If you want the data to be case specific, make sure this option is
not selected.
Creating New Nodes
User’s Guide
67
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
Data Destination indicates where the data is copied. Data can be copied to
either a register or a file. Select the destination from the available options. For
more information, refer to Using a Register as a Destination on page 79 and Using a
File as a Destination on page 83.
Next Nodes
Next node specifies the next operation to go to when the verify function suc-
ceeds or fails.
Modify Nodes
Modify nodes let you change the contents of a register or file. You can switch
text to all uppercase or all lowercase, reverse the order of data, or delete data.
You can also perform a search-and-replace operation on data and clear the
eighth bit of data. Figure 44 on page 68 shows the dialog box for a Modify node.
Creating & Using Nodes
68
PT Program Generator (PPG) v5.0
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. If you select
Record, refer to Using a File as a Source on page 82.
Modification Type
This option allows you to select how the data is modified. Select from the fol-
lowing:
To Upper case
Changes all lowercase characters in the source string to uppercase.
To Lower case
Changes all uppercase characters in the source string to lowercase.
Search \ Replace Replaces all instances of a given string with a second given string.
You must use the entire
string; it is not possible
to do a partial match
using a the Search/
Replace feature on the
Modify node. To use a
partial match, refer to
Searching for a Partial
Match on page 148
using the Verify node.
Creating New Nodes
User’s Guide
69
Next Nodes
Next node specifies the next operation to go to when the modify function suc-
ceeds or fails.
Math Nodes
Math nodes perform basic mathematical operations on the contents of a file or
register.
Figure 45. Math Node Properties Dialog
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.
For example, when you are working with a database file that originated
on the PC, this strips the 8th bit prior to uploading collected data to the
PC.
Creating & Using Nodes
70
PT Program Generator (PPG) v5.0
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 dia-
log box for a Math node.
The format of the math function is as follows:
Constant | Register | File + | - | / | *|
% Constant | Register = Register | File
The results of the math operation must be within the range of
-999,999,999 through 999,999,999 and are always rounded to the
nearest integer.
Floating Point Math
PPG supports floating point math. Decimal values and exponential notation
of values with up to 13 digits can be entered in an application.
Operand 1 Tab
The Operand 1 tab lets you specify a constant value or a file or register con-
taining the first operand for the mathematical operation. The location of
Operand 1 is displayed near the bottom of the dialog.
Figure 46. Math Node: Operand 1Tab
For more information on files and registers, refer to Registers on page 78 and
Files on page 81.
Creating New Nodes
User’s Guide
71
Operand 2 Tab
The Operand 2 tab lets you specify a constant value or a file or register con-
taining 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.
Result Tab
Register/File specifies where the result of the math operation is stored—in
either a field, register, or file. The location where the result of the mathemati-
cal operation is stored is displayed near the bottom of the dialog.
Figure 48. Math Node: Result Tab
For more information, refer to Using a Register as a Destination on page 79, and
Using a File as a Destination on page 83.
Creating & Using Nodes
72
PT Program Generator (PPG) v5.0
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. Select from mathemati-
cal functions that follow it.
Figure 50. Math Node: Operation
Call Nodes
Call nodes execute a branch to a subroutine. A subroutine contains nodes that
perform a routine function, such as copying data to a file or verifying data. A
subroutine can be called from multiple locations in the program (with Call
nodes), eliminating the need for duplication. Creating subroutines and refer-
encing them with Call nodes optimizes a PPG program, saving both time and
program size. Figure 51 shows a Call Node Properties dialog.
+ (Addition)
Adds the two values.
- (Subtraction)
Subtracts operand 2 from operand 1.
* (Multiplication)
Multiplies operand 1 by operand 2.
/ (Division)
Divides operand 1 by operand 2. Returns the integer result.
% (Modulus)
Divides operand 1 by operand 2. Returns the remainder.
Creating New Nodes
User’s Guide
73
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.
Links
Creating Links
Links are arrows that connect frames and nodes, directing the program to the
next step. A Link pointing to a frame or node shows how it is accessed. A Link
pointing away from a frame or node shows where the program goes next.
To create a Link, complete the following steps:
1.
Select Create > Link from the menubar or press the Link button from
the Program Nodes toolbar.
2.
Position your cursor (the Link) on the initiating node, click and hold
down the left mouse button, and drag your cursor (the Link) on to
the Next Node. Release the Link. The Link is drawn using the middle
of each object as an axis, regardless of the exact position of the pointer.
Creating & Using Nodes
74
PT Program Generator (PPG) v5.0
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 com-
plete 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. Drag the joint or arrowhead to a
new position, and then release the mouse button.
If two or more Links overlap, you can select them separately by moving the
arrow pointer to a joint or arrowhead and holding down the left mouse but-
ton. The selected Link appears dashed. To select the next Link in the stack,
press and hold down the left button again.
Moving Links
To move a node while retaining the position of its anchored, jointed links,
press and hold the Shift and Ctrl keys while grasping the node with the mouse
and moving it to the new location.
Deleting Links
To delete an existing Link, select the Link by moving the cursor to the Link’s
arrow-head and holding down the left mouse button. Press the Delete button
or the ESC button.
Automatically Generated Nodes
User’s Guide
75
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. (Refer to Node Types and the Parent-Child Relationship on page 17
for more information on the parent-child relationship between nodes.)
Return Nodes
Return nodes indicate where a subroutine ends and returns to its calling node.
Return nodes are created automatically by PPG when subroutines are created.
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.
•
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.
•
Register Example: Parsing Data on page 81.
•
Files on page 81.
•
Using a File as a Source on page 82.
•
Data Location on page 82.
•
Using a File as a Destination on page 83.
•
Templates on page 84.
•
Template Uses on page 84.
•
Creating a Template on page 85.
•
Modifying an existing template on page 86.
•
Template Example: Modifying Inventory on page 86.
•
Fields on page 87.
PT Program Generator (PPG) v5.0
Controlling Data Flow
There are four tools you can use to control the flow of data:
Table 2. Data Flow Tools
The following sections describe how to select a register to store or access data,
how to select a source or destination file, and how to create a template for
breaking down or combining data. The last two sections give examples of
using registers, templates, fields, and files to control data flow.
Registers
A register is a temporary holding place for data. Registers can be used both as a
source of data and a place where you can place data temporarily.
Using a Register as a Source
When you choose Register as the source, you are given options as shown in
Figure 52.
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.
Files
Holds data in the portable until it can be uploaded to a PC. Usually
after input data is verified, it is inserted in a portable file. The file
expands as more data is added. Files can also be used to hold data-
base information downloaded from a computer. This information can
then be used to verify scanned data or for other purposes.
Templates
Combines data stored in different registers or breaks down data in a
single register into fields. You can use them to set up records in a file
so that the data can easily be transferred to a database or spreadsheet
file. You can also use them to access portions of data in a register.
Fields
Fields are a breakdown of data in a single register. Data is arranged as
fields in records in a template. Fields can be set to either a fixed length
or a variable length with a separator.
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 dis-
play a list of templates and fields within the register. For more information on
register fields, refer to Specifying a Register Field on page 80.
Using a Register as a Destination
When you choose Register as the Destination, you are given the options
shown in Figure 53.
Figure 53. The Destination 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 Define Register button.
PT Program Generator (PPG) v5.0
Write Type
To select how the data is stored in the register, select the write type from one of
these options:
Specifying a Register Field
If you enable the Field checkbox for the Register Source or select Field as
the Write Type in a Register Destination, the template and field pull-down lists
become available. (refer to Figure 54).
Figure 54. Template and Field pull-down lists
•
Select the template you want to use from the Template pull-down list,
and then select the field.
•
To create a new template, select the New Template button (refer to
Creating a Template on page 85).
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.
Field
Field stores the data in a specified field of the register (refer to
Specifying a Register Field on page 80).
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 appli-
cation so it divides data into four separate files by region.
Create a template that separates the scanned data into two fields, the first one
for the region character and the second one for the rest. The template exam-
ines the region field to determine the file into which the scanned data should
be copied: North, West, South, or East.
To create this template, complete the following steps:
1.
Create a template called Region containing the following fields:
•
Region, fixed length:1
•
Rest, variable length, comma delimited
2.
Create a Verify node that uses the Region template to determine
whether the character in the Region field is N and, if it is, proceeds to
a Copy node that copies the contents of the input register to a file
called North.
3.
Create a second Verify node that checks whether the character is W
and, if it is, copies the input code to a file called West.
4.
Create a third Verify node that checks whether the character is S and,
if it is, copies the input code to a file called South.
5.
Create a fourth Verify node that checks whether the character is E
and, if it is, copies the input code to a file called East.
Files
Portable files are used to store data that has been either input via the portable’s
scanner or data keys or downloaded from a PC file through the serial port.
Each entry in a file is called a record, and the records in each file are num-
bered, with 1 as the first record.
There are two types of file settings in portable dialog boxes. Source file settings
specify a file or record in a file to be read from. Destination file settings deter-
mine a file or record to be written to.
PT Program Generator (PPG) v5.0
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.
Data Location
The Data Location field lets you specify where the data you want to use is cur-
rently located; choose from the following options:
First
First indicates the first record in the file.
Last
Last indicates the last record in the file.
Number
Number selects a specific record. You are prompted for the record number.
Using a File as a Destination
When you choose File as the destination, you are given options as shown in
Figure 56.
Figure 56. Destination File Options
Select from the File pull-down list, or press the New File button to create a new
file.
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.
PT Program Generator (PPG) v5.0
Write Type
To indicate where the new information is stored in the selected file, select one
of the following options:
.
Templates
A template is a structure that you can define and use to alter the way in which
collected data is stored. Templates can be used only in registers, not in file
records.
Template Uses
The most common use of templates is to parse data in a register. This allows
you to collect and store more than one type of information. For example, your
program could ask the user to first enter a location code for an item and then
the item number. The template would combine each set of values in a register,
and the value pair could then be copied to a file as fields in a single record.
Data in the file would be arranged either in fields of a fixed size, as in the fol-
lowing:
2348493848
48
393948
8
293832
9
832928
185 392038
28
282930
Insert
Places the data before a given record. When this option is selected, addi-
tional 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. 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.”)
Append
Adds the data to the end of the existing file.
Sorted
Inserts the record into the file based on ascending ASCII value. Use this
option to insert records into a specified file that has already been sorted to
maintain the proper order of the records in the file.
or with delimiters separating variable-length fields in the record, as in the fol-
lowing:
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 data-
base or spreadsheet program. The first value in each record goes into a Loca-
tion field, the second value goes into an Item Number field, and the program
pairs the values appropriately.
Another use of templates is to break down data stored in one register into two
or more register fields (for example, to strip out the first section of a code).
Creating a Template
To create a template, complete the following steps:
Figure 57. The Create Template Dialog
1.
Select Create > Data > Template from the menubar. The Create Tem-
plate window is displayed as shown in Figure 57
PT Program Generator (PPG) v5.0
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. To remove a field from the template, select the field
name from the Template Fields list and press Remove.
•
Select the Create Field button at the bottom of the dialog to
create a new field.
Refer to Fields on page 87 for more information on creating fields. Once you've
created a template, it is added to the template pull-down list and you can use it
with any register.
Modifying an existing template
To modify an existing template, complete the following steps:
1.
Locate the template in the PPG Explorer, and right-click on it to open
a pop-up menu. Select Properties.
2.
The Create Template window is displayed as shown in Figure 57 on
page 85.
3.
Follow the instructions described above in Creating a Template.
Template Example: Modifying Inventory
You run a small TV-repair shop and keep track of parts inventory on a PC in
the shop office. Instead of going to the office PC each time you use a part, you
would prefer to use the portable to adjust your inventory during the day and
update your PC inventory file each night.
Create a portable application to download the latest inventory file from your
PC and modify it to keep inventory current. Each time you remove a part
from the shelf, scan its part number label. The application subtracts 1 from
the quantity of items for that part number in the inventory. At the end of the
day, upload the adjusted data from the portable to the PC.
Use registers, files, and templates as shown in the following steps:
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.
Fields
Fields are a breakdown of data in a single register. Most programs expect to see
related values on the same line. Each line is referred to as a record, and each
item on the line is called a field.
The fields are either set to a fixed length (so that they appear in columns in the
data file), or they are allowed a variable length with a separator (such as a
comma) separating them. You can also use a template to break apart data
stored in a register into separate fields.
To create a new Field, select Create > Data > Field from the menubar to open
the Create Field dialog, shown in Figure 58.
Figure 58. Create Field Dialog
To edit an existing Field:
1.
Locate the field in the PPG Explorer; right-click to open a pop-up
menu.
2.
Select Properties.
PT Program Generator (PPG) v5.0
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. You can also use a
template to divide a register’s data into separate fields.