Greek Coupon Info
This document describes how to work with coupons and coupon counts for the
demonstration CF1500 software released to Greece on 8 March, 1999. It covers how to
load coupons and counts to the RVM from an attached PC, how the RVM cycles
through the coupons, how to change RVM parameters that affect this process, and
how to reset coupon counts at the RVM keypad.
1) Loading coupons and counts:
The design we chose for the coupons consists of two images, the top one
representing the merchant or store, and the bottom one representing the product.
The top half of the coupon should be the same for every coupon at a particular
store. Only the bottom half of the coupon changes. The image for the top, or
store, half of the coupon is always kept in a file called COUNTERS.VOU for
historical reasons. The COUNTERS.VOU file is automatically loaded to the RVM,
since it is constant for every coupon. The bottom half of each coupon is stored
in a file whose extension is .CPN. Internally, these files all have the same
basic format, only the image is different.
a) To start, you need a list of coupon files (bottom halves), with extensions
of .CPN, and the maximum number of each coupon to give out. The easiest way to
load the .CPN files into the RVM is to make a .CLS file, with one coupon
filename, a comma, and its maximum number, or count, per line:
Notice that you can use either upper (MYCOUPON.CPN) or lower (product.cpn) case
in the file names. Also, the actual coupons provided in this release are:
adrenali.cpn, american.cpn, bekka.cpn, kopnh.cpn, and pepsi.cpn.
b) Next, make sure to turn off power to both the PC and the RVM before attaching
cables. You must connect the RVM's RS232 port (on the front of the RVM
controller box, inside the front of the RVM) to the PC's serial port COM1 using
a straight-through (not null-modem) serial port cable. If for some reason COM1
is being used, we will send a version of the PCRVM program that uses a different
c) Now you can run the PCRVM (later replaced by WinRVM) program on the PC. This software communicates to
the RVM. When you run it you begin at the main menu.
i) Choose Load Table to RVM...
ii) Choose Load Coupon Files to RVM.
iii) Press 'L' to choose a coupon list file.
iv) Choose the .CLS file that you created earlier. The program will transfer the
coupon files and counts to the RVM.
2) RVM coupon processing cycle:
Once coupons and counts have been loaded to the RVM, the user can begin
inserting cans. After a specified number of cans (1ST_COUPON parameter), the
first coupon will be given, and we will reduce the count for that coupon by one.
After that, for each specific number (COUPON_FREQ parameter) of cans that the
user inserts, he will be given the next coupon in the list that still has a
non-zero count. Any coupon whose count drops to zero will no longer be given.
This cycle will continue until all coupons have a zero count. At that point, the
RVM will go out of service with a message saying "Out of Coupons", or
the equivalent in Greek.
3) RVM parameter settings:
There is a file called PARMS.AC that is loaded to the RVM and controls a large
number of settings on the RVM. It is a text file containing a series of named
parameters, followed by an equals sign ("=") and a value. You can use
any text editor (Windows Notepad, or the DOS edit command) to change this file.
Make sure that you have a copy of the file before you change it, in case of
As described in 2) above, two parameter settings from this file have a direct
impact on coupon count processing. The 1ST_COUPON parameter gives the number of
cans each user must insert before being given the first coupon. This counter is
reset each time the Payment button on the RVM is pressed, signaling the end of a
customer's session. The COUPON_FREQ parameter gives the number of cans the user
must insert before getting the next coupon. If you want, these parameters can be
set to the same value. We recommend a COUPON_FREQ of at least 4 to give the
coupons time to print.
Other parameters that may be useful are the DEPOSIT0 (DEPOSIT followed by a
zero) and the MAXPAY parameters. DEPOSIT0 gives the amount of money to pay the
user for each can. It is a four-digit number with an implied decimal point in
the middle. The decimal point is used for currencies like the U.S. dollar, where
the amount paid is much smaller than 1 dollar. We are assuming for Greece that
no fractions of a Drachma are used. For example, to pay the user 2 Drachmas for
each can, enter 0200 for DEPOSIT0. The MAXPAY parameter gives the largest amount
of money any one user can be paid. It is a four-digit number with no decimal
point. For Greece, we have set the MAXPAY parameter to 9998, which represents 10
thousand Drachmas, minus one DEPOSIT0 unit to avoid overflows. This is the
largest possible value; you may set it to a smaller number if you wish.
After changing the settings you want and saving the PARMS.AC file, you load it
to the RVM by running the PCRVM program, choosing Load Table to RVM..., and then
choosing Parameter Table.
4) Coupon count processing example:
To make the coupon processing cycle clearer, we should look at an example. Let's
say, for instance, that the coupon list file is GREECE.CLS, and contains:
and the 1ST_COUPON parameter is 2 and the COUPON_FREQ is 4. Then, after User1
puts in 2 cans, he would get the first coupon, a Coke coupon. After four more
cans, he would get a Pepsi coupon, and after a total of 10 cans, he would get a
Fanta coupon. After a total of 22 cans, he would have 2 coupons of each type.
After 4 more cans, he would have 3 Coke, 2 Pepsi, and 2 Fanta coupons. If User1
then hits the Payment button, he would receive a cash voucher (if the DEPOSIT0
parameter was 0200, he would get 26 times 2 Drachmas, or 52 Drachmas.) Then
User2 begins putting in cans. After 2 cans (1ST_COUPON), he receives a Fanta
coupon, because there are no more Pepsi coupons. After 4 more cans, he gets
another Fanta coupon, because all the Coke coupons are gone, too. Finally, after
a total of 10 cans, User2 gets his third Fanta coupon, and because the machine
is out of coupons, it gives him his cash voucher for 20 Drachmas, and goes out
of service, displaying "Out of Coupons".
5) Resetting all RVM counts back to maximum from keypad:
a) Open the RVM door.
b) Press any key. The second line of the display should now ask for a PIN
(Personal Identification Number.)
c) Enter the number 1111. The display should now ask for a command which
consists of a "#" followed by a number.
d) Enter #9. The display will now ask for a function number.
e) Enter 12. The display will confirm that the counts have been restored.
Resetting the coupon counts from the RVM keypad restores them to the numbers
that were first loaded. For the example in 4) above, there would now be 3 Coke,
2 Pepsi, and 5 Fanta coupons available. To change these numbers, you must go
back to step 1), edit your .CLS file, and reload all the coupons. We are already
working on changing the RVM software to allow the coupon counts to be edited
individually from the RVM keypad. We are also exploring ways to create new
coupons more easily, but at the moment, you will need to send us .BMP files, and
we will send back .CPN files.
Fore more info, see Greece_Randy_RECYTECH_answers.doc
For info on "special coupons",
Coupon Creation Process
For Greece, a special version of RVM software is used that prints coupons consisting of two
images: a top image representing
the store and a bottom image representing the product. The top image is the
same for every coupon. The image for the top, or store, half of the coupon is always kept in a file called COUNTERS.VOU.
The COUNTERS.VOU file is automatically loaded to the RVM, since it is constant for every coupon.
The bottom half of each coupon is stored in a file whose extension is .CPN.
Create or load a 192x192 black and white image using the graphics program of your choice such as
Paint Shop Pro, Photoshop,
the gimp (free), paint.net
- Double-wide the image to 384x192.
In Paint Shop Pro, select "Image | Resize", set the size to 200%
width, 100% height, making sure "lock aspect ratio" is unchecked.
You may have to experiment with the resample method to obtain the best
results, although "smart size" and "pixel resize" both
seem to work well..
- Save the file in .PCX format.
Run the Coupon Designer program and place the PCX image in the desired
location, leaving some space on the left for the static top image.
- Check the "enable double-high graphics/double-wide text" box in
Coupon Designer (ver 1.2.7 or later) and Save.
If using an old version of Coupon Designer, manually insert an ASCII 14 Hex character at the top of the COUNTERS.VOU file to force double-high
Note: see the Coupon Designer
documentation for more info.
old, obsolete method:
1. Create the images you want as bitmap (.BMP) files the same way you
2. Start Paintbrush or other image editor. Open each bitmap file and double-wide each image.
Save as black and white .PCX files.
3. .LAY files were originally created with the UBI Labelshop program
to position graphics stored in .PCX files. One
.LAY handles the top half of a Greek coupon (the constant, store-related, half)
and another .LAY handles the variable bottom halves. Now that the .LAY files exist, as long as the .BMP you started with is
within certain dimensions, you can just edit the (text) .LAY files to change the
.PCX file referred to.
4. Use the Cpnvert (VB) program to convert the .LAY files to .VOU
files. Rename the constant top half
COUNTERS.VOU. Rename the bottom
halves to .CPN files. Add a 0x14
character to the top of the COUNTERS.VOU file (or to all the files) to force