4-11
Menu, followed by 0 and 5; this puts a ½ (0.5) second delay after the TAB
key to give Excel time to reposition and update its files.
Press the ENTER key until you see the UPLOAD SUFFIX 02 prompt. Now we
are going to simulate the positioning of the cursor to the first column of the next
row. To get back, we would key ENTER followed by the Left Arrow key. To
make the bar code reader simulate those keystrokes, we will first scan the bar
code for CR (ASCII 13), followed by Left Arrow (ASCII 19), followed by DEL
(ASCII 127) and then 0 and 5 for a ½ (0.5) second delay.
Press
ENTER
to complete the change. If you do not press
ENTER
after
each change, the change will not be permanent. Press the F1 key to exit the
program, then F1 again to exit PROGRAMMING MODE. The TriCoder
is now programmed to do a keyboard data upload to an Excel spreadsheet.
Flat File Formats
Flat Files are the most complicated file format of the three we are covering
in the tutorial. The format of a Flat File is mostly dependent upon the host
program you will use to process the data you are uploading.
A Flat File uses what we call “Refer-backs”. Each record has at least one
field that remains constant while other fields may contain variable data.
“Refer-backs” allow the operator to enter the data for the constant fields
only once, letting the TriCoder append the data to each record as it uploads.
“Refer-backs” are specified in the Upload Prefix and Upload Suffix of each
field. We will use a program that prompts for operator name, item
number and finally a quantity to demonstrate how “Refer-backs” work.
Lets say that the data for the first field in every record must be the operators
initials (3 characters). The second field in each record must be an item
number and the third field is a quantity. It doesn’t make sense to require the
operator to enter their initials every time they scan an item number and
enter a quantity. The solution is to create a program that uses a “Refer-
back” to attach the data from prompt #1 (operator name) and the data for
prompt #2 (item number) to the data for prompt #3 (quantity) every time.
We do this by using the upload prefix or upload suffix.
Specifying these characters:
}xx
where xx is the number of the statement you want to take data from, in the
Upload Prefix or Upload Suffix of the statement you want to attach the
“Refer-back” data to. The following TriCoder Coding Form shows the
program we have described above (only the relevant entries on the form are
shown):