PC Controlled vending since 1994

Upstate Networks Incorporated
MDB, USB, RS-232, Bill, Coin, & Magnetic swipe hardware  for PC vending machine controllers
[Order] [Search] [Technical Support ] [Software] [Company Profile] [Contact us]

EXAMPLE VEND SESSION #1*
(Valid Single Vend) All values HEX
VMC= Vending Machine Controller,  PC2MDB= serial to MDB interfaceSoftware= front end software or PLC

Description

VMC-10

(RESET) 10h

PC2MDB-00 (ACK) 00h Acknowledged
VMC-11 00 (SETUP CONFIGURATION DATA) 11 00: To send the VMC's configuration data and obtain the cashless device's data
PC2MDB-01 01 00 01 01 01 30 00 (PC2MDB RESPONSE) 8 BYTES Z1-Z8
Z1: reader config data (indicates the payment media reader is responding to a SETUP) 01H
Z2: Reader Feature Level 
01H: The reader is not capable or will not perform the advanced features. The reader will not provide advanced information to the VMC, but can do the advanced features internally. The reader has no revaluation capability. 
02H: The reader is capable and willing to perform the advanced features. The reader will provide advanced information to the VMC (if possible) and will not do the advanced features internally. 
03H: The reader is able to support level 02, but also supports some or all of the optional features listed in the EXPANSION ID command (i.e., file transfer, 32 bit credit, multi-currency/language features, negative vend, and/or data entry).
Z3-Z4: Country/Currency Code- packed BCD. The packed BCD country/currency code of the reader can be sent in two different forms depending on the value of the left most BCD digit. If the left most digit is a 0, the International Telephone Code is used to indicate the country that the reader is set-up for. For example, the USA code is 00 01H (Z3= 00 and Z4 = 01). If the leftt most digit is a 1, the latest version of the ISO 4217 numeric currency code is used. For example,the code for the US dollar is 18 40H (Z2= 18 and Z3 = 40). Use FFFFh if the country code is unknown. For level 3 cashless devices, it is mandatory to use the ISO 4217 numeric currency code (see Appendix A1)
Z5: Scale Factor. The multiplier used to scale all monetary values transferred between the VMC and the reader. 
Z6: Decimal Places. The number of decimal places used to communicate monetary values between the VMC and the payment media reader. All pricing information sent between the VMC and the payment media reader is scaled using the scale factor and decimal places. This corresponds to: ActualPrice=P(X)(10^ -Y) where P is the scaled value send in the price bytes, and X is the sale factor, and Y is the number of decimal places. 
Z7: Application Maximum Response Time - seconds. The maximum length of time a reader sill require to provide a response to any command from the VMC. The value reported here supercedes the payment reader's default NON-RESPONSE time defined in section 7.5 if the value reported here is greater. 
Z8: Miscellaneous Options - xxxxyyyy 
xxxx: Unused 
yyyy: Option bits 
b0=0: he payment media reader is not capable or restoring funds to the user's payment media or account. Do not request refunds. 
b0=1: The payment media reader is capable of restoring funds to the user's payment media or account. Refunds may be requested. 
b1=0: The payment media reader is NOT multivend capable. Terminate session after each vend. b1=1: The payment media reader is multivend capable. Multiple items may be purchased within a single session. 
b2=0: The payment media reader does NOT have a display 
b2=1: The payment media reader does have its own display. 
b3=0: The payment media reader does NOT support the VEND/CASH SALE subcommand. 
b3=1: The payment media reader does support the VEND/CASH SALE subcommand. 
b4-b7: Any future options must be covered by the EXPANSION COMMAND option bits. 
VMC-11 01
(SETUP MAX/MIN PRICE) 11 01: To send the maximum and minimum prices in the VMC. These prices must be sent as Level 01/02 16 bit credit
n established and any time there is a change in the minimum price. If the VMC does not know the minimum price, 00 00h should be sent. 
PC2MDB-01 FF FF 00 00 (PC2MDB RESPONSE) 5 BYTES Y1-Y5
Y1: Max/Min prices. Indicates the VMC is sending the price range to the reader (01H)
Y2-Y3: Maximum Price- scaled. This information should be sent as soon as the VMC prices have been established and any time there is a change in the maxmum price. If the VMC does not know the maximum price, FF FFh should be sent.
Y4-Y5: Minimum Price-Scaled. This information should be sent as soon as the VMC prices have been sent
VMC-17 00 (EXPANSION REQUEST ID) 17 00: To obtain additional cashless device information and options
PC2MDB-00 55 4E 49 00 00 00 00
                   00 00 00 00 00 00 00 00 
                   00 50 43 32 4D 44 42 20
                   20 20 20 20 20 00 01
(PC2MDB RESPONSE) 30 BYTES Y1-Y30
Y1: Request ID. The VMC is requesting payment media reader identification information. The information included above (y2-Y30) provides the payment media reader with VMC identification information. 00h
Y2-Y4: Manufacturer Code-ASCII. Identification code for the equipment supplier. Currently defined codes are listed in the EVA document entitled :The Data Transfer Standard EVA-DTS" document, the Audit Data Dictionary section, chapter 4, "Manufacturer Codes". 
Y4-Y16: Serial Number-ASCII. Factory assigned serial number.  Y17-Y28:Model Number-ASCII. Manufacture assigned model number. Y29-Y30:Software Version-packed BCD. Current software version
54 4E 49 00 00 00 00 00 00 00 00 00 00 00 00 01 50 43 32 4D 44 42 00 00 00 00 00 00 00 01
UNI0000000000001PC2MDB00000001
VMC-14 01  (ENABLE) 14 01/(DISABLE) 14 00
PC2MDB-00 (ACK) 00h Acknowledged
VMC-12 (POLL) 12h
PC2MDB-00  (ACK) 00h Acknowledged
SOFTWARE-03 (BEGIN SESSION) 03 The Programmer will have to issue a BEGIN SESSION command (03h) which will be sent to the VMC on a poll.  
VMC-12 (POLL) 12h
PC2MDB-03 (POLL) 12h  This is the value that was passed from the PC via the PC2MDB indicating that the programmer wished to begin a session.
VMC-00 (ACK) 00h Acknowledged  The VMC will ACK the BEGIN SESSION command
VMC- 13 00 00 14 00 01 (VEND REQUEST) 13 00  The VMC issues a VEND REQUEST command (13 00 00 14 00 01h).  The first two bytes 13 00 are vend request.  The VMC is requesting vend approval from the payment media reader before dispensing the product.  The next two bytes 00 14h are scaled item price.  This scaled item price is set by bytes Z5 and Z6 in the reader response data for the MAX/MIN PRICES SETUP command.  And the last two bytes 00 01h are item selection number.  
PC2MDB-00 (ACK) 00h Acknowledged  The vend request command will be ACKed 
VMC-12 (POLL) 12h
VMC-12 (POLL) 12h
SOFTWARE-05 (VEND APPROVED) 05 passed on to the programmer to be approved with a VEND APPROVED command (05h) command
VMC-12 (POLL) 12h
PC2MDB-05 (VEND APPROVED) 05 The vend approved command that was sent from the PC is relayed to the VMC via the PC2MDB
VMC-00 (ACK) 00h Acknowledged
VMC-13 02 (VEND SUCCESS) 13 02  Once this command has been received a VEND SUCCESS command  (13 02h) will be issued by the VMC, and ACKed by the cashless device.  
PC2MDB-00 (ACK) 00h Acknowledged
VMC-13 04 (SESSION COMPLETE) 13 04  Upon the receiving of an ACK, a SESSION COMPLETE command (13 04h) will be issued by the VMC and also ACKed by the cashless device. 
PC2MDB-00 (ACK) 00h Acknowledged
VMC-12 (POLL) 12h
PC2MDB-07 (END SESSION) 07   In order to end a vend session, and END SESSION command (07h) will have to be sent to the VMC on a poll by the end user. 

*[1]. National Automatic Merchandising Association, March 26, 2003. Multi_Drop Bus/Internal Communication Protocol: Section 7 "Cashless Device(s) VMC/Peripheral Communication Specifications": 7.1-7.53.