background image

32. CCTHopperCheckDispense

GUI command

Command

Parameters/Comments

CCTHopperCheckDispense(N)

“N” is the hopper address.

RASPIVEND daemon answer

Answer

Parameters/Comments

Ex. 1 – success
{ "EventCounter" : "1" , 
"ToDispense" : "0" ,
"Dispensed" : "2" ,
"NotDispensed" : "0" }

Ex. 2 - failed
{ "EventCounter" : "4" , 
"ToDispense" : "0" , 
"Dispensed" : "2" , 
"NotDispensed" : "8" }

Ex. 3 – dispense in progress
{ "EventCounter" : "6" , 
"ToDispense" : "6" , 
"Dispensed" : "4" , 
"NotDispensed" : "0" }

This command will return a message regarding the last known
hopper status.
After issuing CCTHopperDispense or
  CCTHopperDispenseCipher   commands,   the   customer’s
application should periodically poll the hopper with this command
until one of the following situation appears:
-   “

Dispensed

”   has   the   same   value   as   the   number   of   coins

requested. The dispense is fine and the transaction is finished.
- “

NotDispensed

” has a value bigger than 0. In this situation, the

dispense failed and there a remaining “NotDispensed” coins that
could not be supplied. It is up to the customer’s application to
decide if it will try another dispense command or return to the
main loop.

33. CCTHopperDispenseCipher

GUI command

Command

Parameters/Comments

CCTHopperDispenseCipher(N,M)

“N” is  the  hopper  address  and  “M”  is the  number  of  coins  to
dispense using cipher key instead of serial number. Cipher key is
required by some hoppers instead of plain 3 bytes serial number.
Try to use this in case your hopper is correctly initialized but is
not dispensing any coin.

RASPIVEND daemon answer

Answer

Parameters/Comments

{“HopperDispenseCipher":"success"}
or
{“HopperDispenseCipher":"failed"}

This command will instruct the hopper to payout a number of
coins.  After   issuing   this   command,   the   customer’s   application
should keep polling with command CCTHopperCheckDispense,
to get informations about the status, number of coins dispensed,
number of coins to dispense and error.

© 2016 – AUTOMATROM SRL – www.vendingtools.ro

Содержание RASPIVEND

Страница 1: ...Raspberry PI vending solution RASPIVEND v 28 11 2016 Quick Reference 2016 AUTOMATROM SRL www vendingtools ro...

Страница 2: ...12 10 Set maximum credit 12 11 Reset the current credit 13 12 Return change 13 13 Set current cash credit 13 14 Poll credit and devices status 14 15 Reset all devices status 17 16 Cashless INIT 17 17...

Страница 3: ...6 31 RTCGet 36 V High level mode with Python 3 service daemon 37 1 Configuring Python 3 37 2 MDBBillInit 37 3 MDBBillEnable 37 4 MDBBillDisable 38 5 MDBCoinInit 38 6 MDBCoinEnable 38 7 MDBCoinDisable...

Страница 4: ...shlessRevalue 48 28 MDBCashlessEndSession 48 29 SetMUXChannel 48 30 CCTHopperInit 49 31 CCTHopperDispense 49 32 CCTHopperCheckDispense 50 33 CCTHopperDispenseCipher 50 2016 AUTOMATROM SRL www vendingt...

Страница 5: ...lexers to select the proper communication channel b A high level communication method that simplifies the user interface development offering a language independent support A Low level mode In low lev...

Страница 6: ...e Low level High level MDB coin acceptor changer yes yes MDB bill validator yes yes MDB cashless 1 yes yes MDB cashless 2 yes yes ccTalk yes Only with Python 3 RS232 1 yes yes RS232 2 yes yes GPRS com...

Страница 7: ...Also the variable length depends on subcommand CRC Defines the message checksum The CRC is calculated as an XOR of all message bytes including the HEADER For example the command to enabled the bill va...

Страница 8: ...tible The system eliminates the separate 5V microUSB power supply for Raspberry PI You will only need one power supply for the entire system 2 Connector description J17 POWER connector for the RASPIVE...

Страница 9: ...nd alos the power and GND pins Pins marked with red background are reserved for RASPIVEND Pin No Rpi function RASPIVEND Pin No Rpi function RASPIVEND 1 3 3V 3 3V 2 5V 5V 3 GPIO2 SDA1 I2C MODEM DCD 4 5...

Страница 10: ...e GPIO22 GPIO27 GPIO17 Selected peripheral the peripheral currently connected to RasPI 0 0 0 MDB 0 0 1 RS232 1 J10 0 1 0 RS232 2 J11 0 1 1 VTLCOMBUS 1 0 0 ccTalk 1 0 1 Modem 2 MDB bill validator initi...

Страница 11: ...a are detailed in the MDB documentation This command is optional and is used only if you need to handle some lower informations bill validator MDB level software version ISO country code etc 6 Coin ac...

Страница 12: ...the contained data are detailed in the MDB documentation This command is optional and is used only if you need to handle some lower informations coin acceptor changer MDB level software version ISO c...

Страница 13: ...350cents or 3 50EUR 3 50USD CRC RASPIVEND answer 0xFE 0x52 0x03 0xFB command execution failed 0xFC command successfully executed 0xFD command CRC error CRC This command will start returning change if...

Страница 14: ...ns last 4 bill validator status If the register has the value 0xFFFFFFFF then the bill validator is not initialized The rightmost byte of this register is the last status COIN acceptor changer status...

Страница 15: ...Bill Removed A bill in the escrow position has been removed by an unknown means A BILL RETURNED message should also be sent 0x08 Cash Box out of position The validator has detected the cash box to be...

Страница 16: ...ed 0x07 Tube Jam A tube payout attempt has resulted in jammed condition 0x08 ROM checksum error The changers internal checksum does not match the calculated checksum 0x09 Coin Routing Error A coin has...

Страница 17: ...ess status codes 15 Reset all devices status HEADER CMD SUBCMD PARAMETERS CRC 0xFE 0x50 0x02 none 0xAC RASPIVEND answer 0xFE 0x50 0x02 0xFB command execution failed 0xFC command successfully executed...

Страница 18: ...S CRC 0xFE 0x53 0x03 CASHLESS NUMBER 0x01 cashless 1 0x02 cashless 2 CRC RASPIVEND answer 0xFE 0x53 0x03 0xFB command execution failed 0xFC command successfully executed 0xFD command CRC error CRC Thi...

Страница 19: ...BER 0x01 cashless 1 0x02 cashless 2 CRC RASPIVEND answer 0xFE 0x53 0x06 0xFB command execution failed 0xFC command successfully executed 0xFD command CRC error CRC This command must be sent after a su...

Страница 20: ...CASHLESS NUMBER 0x01 cashless 1 0x02 cashless 2 CRC RASPIVEND answer 0xFE 0x53 0x09 CASHLESS SETUP 8 bytes CASHLES EXPANSION INFORMATION 30 bytes CRC This command will return the low level settings o...

Страница 21: ...0xFC command successfully executed 0xFD command CRC error CRC This command will set the date and hour into the RTC 27 RTC get HEADER CMD SUBCMD PARAMETERS CRC 0xFE 0x50 0x04 none CRC RASPIVEND answer...

Страница 22: ...2016 AUTOMATROM SRL www vendingtools ro...

Страница 23: ...etd Proceed to xinetd installation according to your distribution specifications 2 MDBBillInit GUI command Command Parameters Comments MDBBillInit none RASPIVEND daemon answer Answer Parameters Commen...

Страница 24: ...Parameters Comments MDBCoinInit success or MDBCoinInit failed This command will initialize the attached MDB coin acceptor changer 6 MDBCoinEnable GUI command Command Parameters Comments MDBCoinEnable...

Страница 25: ...e 5 BillValue 10 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 Manufacturer ITL SerialNumb...

Страница 26: ...true ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false Manufacturer NRI SerialNumber NRI00136295 Model 046G 46 F40...

Страница 27: ...you have to set this value to 100 RASPIVEND daemon answer Answer Parameters Comments MDBSetMaxCredit NNNN This command will return the value you have sent For safety reasons eliminate the communicatio...

Страница 28: ...read this variable by issuing the MDBPoll command RASPIVEND daemon answer Answer Parameters Comments MDBSetCurrentCredit NNNN This command will return the value you have sent For safety reasons elimi...

Страница 29: ...sent value 15 MDBSetChangeOK GUI command Command Parameters Comments MDBSetChangeOK none RASPIVEND daemon answer Answer Parameters Comments MDBSetChangeOK success or MDBSetChangeOK failed This comman...

Страница 30: ...ins the last 4 hexadecimal coin acceptor status codes according with the Table 3 on page 15 The leftmost value is the older one CaslessStat contains the last 4 hexadecimal cashless devices status code...

Страница 31: ...of the cashless to be enabled 1 for the first cashless device and 2 for the second cashless device RASPIVEND daemon answer Answer Parameters Comments MDBCashlessEnable success or MDBCashlessEnable fa...

Страница 32: ...ms for service maintenance reasons 23 MDBCashlessVendRequest GUI command Command Parameters Comments MDBCashlessVendRequest NNNN Set the value of the requested credit will be withdrawn from the custom...

Страница 33: ...VendSuccess N N is the address of the cashless to withdraw 1 for the first cashless device and 2 for the second cashless device RASPIVEND daemon answer Answer Parameters Comments MDBCashlessVendSucces...

Страница 34: ...ximum revalue settings for the cashless system You have to set the cashless revalue only in it s aloud range If you will not manage this then the cashless can randomly goes to overflow 28 MDBCashlessE...

Страница 35: ...the product When you receive the correct combination as a response then you have to commit the command with the command KBSetOK RASPIVEND daemon answer Answer Parameters Comments KeyboardSet ABCD or K...

Страница 36: ...ed 31 RTCGet GUI command Command Parameters Comments RTCGet This command will read the date and time informations from the non volatile RTC on the RASPIVEND board This command is useful to help you se...

Страница 37: ...3 The only dependency for this application is pyserial library version 3 0 1 or higher 2 MDBBillInit GUI command Command Parameters Comments MDBBillInit none RASPIVEND daemon answer Answer Parameters...

Страница 38: ...Parameters Comments MDBCoinInit success or MDBCoinInit failed This command will initialize the attached MDB coin acceptor changer 6 MDBCoinEnable GUI command Command Parameters Comments MDBCoinEnable...

Страница 39: ...e 5 BillValue 10 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 BillValue 0 Manufacturer ITL SerialNumb...

Страница 40: ...true ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false ChangeCoin false Manufacturer NRI SerialNumber NRI00136295 Model 046G 46 F40...

Страница 41: ...you have to set this value to 100 RASPIVEND daemon answer Answer Parameters Comments MDBSetMaxCredit NNNN This command will return the value you have sent For safety reasons eliminate the communicatio...

Страница 42: ...read this variable by issuing the MDBPoll command RASPIVEND daemon answer Answer Parameters Comments MDBSetCurrentCredit NNNN This command will return the value you have sent For safety reasons elimi...

Страница 43: ...sent value 15 MDBSetChangeOK GUI command Command Parameters Comments MDBSetChangeOK none RASPIVEND daemon answer Answer Parameters Comments MDBSetChangeOK success or MDBSetChangeOK failed This comman...

Страница 44: ...ins the last 4 hexadecimal coin acceptor status codes according with the Table 3 on page 15 The leftmost value is the older one CaslessStat contains the last 4 hexadecimal cashless devices status code...

Страница 45: ...of the cashless to be enabled 1 for the first cashless device and 2 for the second cashless device RASPIVEND daemon answer Answer Parameters Comments MDBCashlessEnable success or MDBCashlessEnable fa...

Страница 46: ...ms for service maintenance reasons 23 MDBCashlessVendRequest GUI command Command Parameters Comments MDBCashlessVendRequest NNNN Set the value of the requested credit will be withdrawn from the custom...

Страница 47: ...VendSuccess N N is the address of the cashless to withdraw 1 for the first cashless device and 2 for the second cashless device RASPIVEND daemon answer Answer Parameters Comments MDBCashlessVendSucces...

Страница 48: ...sion GUI command Command Parameters Comments MDBCashlessEndSession N N is the address of the cashless to close the session 1 for the first cashless device and 2 for the second cashless device RASPIVEN...

Страница 49: ...based on those statuses if the init procedure is a success or not In our example the procedure is a success since the test hopper does not support ClearComms command but successfully answered on the...

Страница 50: ...ituation the dispense failed and there a remaining NotDispensed coins that could not be supplied It is up to the customer s application to decide if it will try another dispense command or return to t...

Страница 51: ...NOTES 2016 AUTOMATROM SRL www vendingtools ro...

Отзывы: