Home
User manual V1.2
Contents
1. The following example shows the reception of error and prints a label status of each MDB devices private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O ERROR STATUS byte msb lsb error int error_coinchanger msb InputBuffer 1 Isb InputBuffer 2 error_coinchanger msb error_coinchanger lt lt 8 error_coinchanger lsb InputBuffer 3 error label4 Text Error coinchanger error_coinchanger ToString Error bill error ToString Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Chip Table Code Error for Coin Changer 01 00 Changer powering up initialization 03 00 Changer fully operational and ready to accept coins 04 00 Keypad shifted MODE key pressed and held so that LED flashes indicating keypad in shifted state Reverts to normal mode if no key pressed for 15 seconds 05 10 Manual Fill Payout active Manual Fill or Manual Payout mode of operation in progress under control of the changer This response must be reported at least once to allow the VMC to request a manual fill or manual payout report 05 20 New Inventory Information Changer not in Manual inventory mode Available but new inventory information available Inhibited by VMC All coin acceptance inhibited at request of VMC possibly due to product dispenser jams completely sold out etc
2. 3 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InoutBuffer O COIN VALUE amp amp InputBuffer 1 3 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Coin Accepted Extended Version This function gives more options to the user and could enable or disable each type of coin accepted Two values of 16 bits are the input parameters the first data is for coin value accepted and the second is coin manually dispense enable Coin Enable biS b14 b13 b12 bii b10 b9 b8 b7 b6 b5 b4 b3 b2 bi b0 Y1 Y2 A bit is set to indicate a coin type is accepted For example bit 6 is set to indicate coin type 6 bit 15 is set to indicate coin type 15 and so on To disable the changer disable all coin types by sending a data block containing OOOOH All coins are automatically disabled upon reset Manually Coin Enable b15 b14 b13 b12 bii bio b9 b8 b7 b6 b5 b4 b3 b2 bi DO Y1 Y2 A bit is set to indicate dispense enable For example bit 2 is set to enable dispensing of coin type 2 This command enables disables manual dispensing using optional inventory switches All manual dispensing switches are aut
3. Send Cash Coin Changer PayOut The amount is sent through a 16 bit integer divided into 2 bytes sending first the most significant and then the least significant output buffer in the order shown in more detail OutputBuffer O constant that indicates the return cash OutputBuffer 1 msb most significant byte OutputBuffer 2 Isb least significant byte private void Button_PayOut_Click object sender EventArgs e int cash_to_send byte msb Isb decimal number decimal scalingfloat decimal numeric scalingfloat Convert ToDecimal Scaling numeric Numeric_PayOut Value number numeric scalingfloat cash_to_send Convert Tolnt16 number msb byte cash_to_send gt gt 8 Isb byte cash_to_send amp Oxff OutputBuffer O SEND_CHANGE OutputBuffer 1 msb OutputBuffer 2 Isb if simpleUSB1 DeviceConnected true simpleUSB1 WriteData 1 OutputBuffer 8 Note that the variable Scaling was obtained from SETUP_COIN function The USB converter MDB respond when finished the sending process of change not necessarily be successful task and depends on the coin changer later explained the possible answers The following example shows how data is received from the onReadComplete Usually takes 1 to 5 seconds to finish to make change depending on the model Coin Changer and the amount Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think p
4. dollar Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void Button_coin_value_Click object sender EventArgs e OutputBuffer 0 COIN_VALUE OutputBuffer 1 1 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer O COIN VALUE amp amp InputBuffer 1 1 textBox_status AppendText Coin Value Extended Version r n textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer 0 COIN_VALUE OutputBuffer 1 2 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer O COIN VALUE amp amp InputBuffer 1 2 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer 0 COIN_VALUE OutputBuffer 1
5. 8 private void Button_Stacker_Click object sender EventArgs e OutputBuffer 0 CASH_IN_BILL ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 private void Button_TubeExt_Click object sender EventArgs e OutputBuffer 0 CASH IN TUBES EXT OutputBuffer 1 1 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer O CASH_IN_TUBES EXT amp amp InputBuffer 1 1 textBox_status AppendText Cash Tubes Extended Version r n textBox_status AppendText Tube Full Status r n textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText Cash Tubes Extended Version r n textBox_status AppendText Tubes Status r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer O CASH IN TUBES EXT Copyright Allrigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think OutputBuffer 1 2 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InoutBuffer O CASH_IN_TUBES EXT amp amp InputBuffer 1 2 textBox_status AppendText InputBuffer 2 ToString r n textBox_stat
6. and answers the particular response to GUI Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Chip Bulk Transfer mode For the Bulk Transfer mode an event is not generated so need wait for the answer this mode is for function when need more data than 8 bytes A veer Connect and disconnect the device To connect the device to the user interface you need to first call the OpenConnection function For the following example of using this function you have created a button that when you call the event Click the device is connected this method can easily vary depending on your application private void button1_Click object sender EventArgs e simpleUSB1 OpenConnection To disconnect the device you need to call the function CloseConnection For the following example of using this function you have created a button that when you call the event _Click the device is disconnected this method can vary depending on your application easily private void button2_Click object sender EventArgs e simpleUSB1 CloseConnection If you have successfully connected the MDB USB device an event called _onDeviceConnect will invoke If you successfully disconnected the device called an event is invoked _onDeviceDisconnect Example of use Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void SimpleU
7. using System Data using System Drawing using System Ling using System Text using System Windows Forms using SimpleUSB pe lt Example of how use the interface Easy MDB gt Copyright All rigth reserved ThinkChip Status Terminal User Interface EasyMDB USB V1 1 Think Copyright C lt 2014 gt lt ThinkChip Braulio Chi Salavarria gt This program is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 3 of the License or at your option any later version This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this program If not see lt http www gnu org licenses gt E E namespace MDBUSBenglish public partial class Form1 Form byte OutputBuffer new byte 32 byte InputBuffer new byte 32 const byte INIT_MDB_DEVICES 1 const byte COIN_CHANGER 1 const byte BILL_ACCEPTOR 2 const byte COIN AND BILL 3 const byte CASH_INSERTED 2 const byte ERROR STATUS 4 const byte CASH_IN_TUBES 3 const byte CASH_IN_TUBES_EXT 13 const byte CASH_IN_BILL 6 const byte SET_COINCHANGER 10 const by
8. P Py C mo desea buscar el software de controlador q E gt Buscar autom ticamente software de controlador actualizado u Windows buscar en el equipo y en Internet el software de controlador m s y reciente para el dispositivo a menos que haya deshabilitado esta caracter stica en k la configuraci n de instalaci n del dispositivo D gt Buscar software de controlador en el equipo Buscar e instalar el software de controlador de forma manual toy UY We look for the folder where the driver called USB MDB Converter to accept and install the following i Seguridad de Windows Windows no puede comprobar el editor de este software de controlador window appears alerting is this happens because Windows is not certified in the USB device select gt No instalar este software de controlador Debe comprobar el sitio web del fabricante para obtener software actualizado del controlador del dispositivo Install this driver software anyway gt Instalar este software de controlador de todas formas S lo instalar el software de controlador obtenido en el sitio web o disco del fabricante El software no firmado de otras fuentes puede da ar el equipo o robar informaci n v Ver detalles TT ee If you have successfully installed the following ku Actualizar software de controlador Convertidor MDB USB wi n dow a p pea rs Windows actualiz correctamente el software de controlador Wind
9. byte msb Isb byte routing int cash_inserted 0 double cash Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think double cash_float double scaling_float msb InputBuffer 1 Isb InputBuffer 2 routing InputBuffer 3 cash_inserted msb cash_inserted lt lt 8 cash_inserted Isb cash_float Convert ToDouble cash_inserted scaling_float Convert ToDouble Scaling cash cash_float scaling_float textBox_status AppendText Cash Inserted cash ToString rn textBox_status AppendText Routing routing ToString rin if InputBuffer O ERROR STATUS byte msb Isb error int error_coinchanger msb InputBuffer 1 Isb InputBuffer 2 error_coinchanger msb error_coinchanger lt lt 8 error_coinchanger lsb error InputBuffer 3 textBox_status AppendText Error coinchanger error_coinchanger ToString Error bill error ToString rin if InputBuffer 0O CASH_IN_TUBES byte msb Isb int cash_in_tubes double money msb InputBuffer 1 Isb InputBuffer 2 cash_in_tubes msb cash_in_tubes lt lt 8 cash_in_tubes Isb money cash_in_tubes Scaling textBox_status AppendText Cash in tubes S money ToString r n Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think if InputBuffer O CASH_IN_ BILL byte msb Isb int cas
10. 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer O CASH IN TUBES EXT amp amp InputBuffer 1 1 textBox_status AppendText Cash Tubes Extended Version r n textBox_status AppendText Tube Full Status r n textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText Cash Tubes Extended Version r n textBox_status AppendText Tubes Status r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer O CASH IN TUBES EXT OutputBuffer 1 2 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer 0 CASH IN TUBES EXT amp amp InputBuffer 1 2 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer 0 CASH IN TUBES EXT OutputBuffer 1 3 simpleUSB1 WriteData 3 OutputBuffer 8 s
11. B1 WriteData 3 OutputBuffer 8 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void Button coin accepted ext Click object sender EventArgs e simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer 0 COIN VALUE amp amp InputBuffer 1 1 textBox_status AppendText Coin Value Extended Version r n textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer O COIN VALUE OutputBuffer 1 2 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer O COIN VALUE amp amp InputBuffer 1 2 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer 0 COIN VALUE OutputBuffer 1 3 simpleUSB1 WriteData 3 OutputBuffer 8 simple
12. BILL simpleUSB1 WriteData 1 OutputBuffer 8 The response will be sent to the event _onReadComplete Sending data is as follows in the InputBuffer InputBuffer 0 constant indicating that this is Stacker Bill InputBuffer 1 msb most significant byte of the number of bills stack InputBuffer 2 Isb least significant byte of the number of bills stack The following example shows how to read the data and printed on a label Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O CASH_IN_ BILL byte msb Isb int cash_in_bill O msb InputBuffer 1 Isb InputBuffer 2 cash_in_bill msb cash_in_bill lt lt 8 cash_in_bill Isb label6 Text Numbers bills cash_in_bill ToString Enable and disable Coin Changer and Bill Acceptor In this function we can enable or disable the MDB devices depending on whether you want to enable or disable is written to the output buffer the order is as follows Enabling and Disabling coin changer OutBuffer O constant indicating enable coin changer OutBuffer 1 Boolean value indicating Enable 1 disable 0 Enabling and Disabling bill validator OutBuffer O constant indicating enable bill validator OutBuffer 1 Boolean value indicating Enable 1 disable 0 In t
13. General changer error Z2 defined as 00 Non specific error 01 Check sum error 1 A check sum error over a particular data range of configuration field detected 02 Check sum error 2 A check sum error over a secondary data range or configuration field detected 03 Low line voltage detected The changer has disabled acceptance or payout due to a low voltage condition Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Chip Discriminator module error Z2 defined as 11 22 12 Z2 Accept gate module error Coin Cassette tube module error Separator module error 14 Z2 Dispenser module error Cause s of Status Error 00 Non specific discriminator error 10 Flight deck open 11 Escrow Return stuck open 30 Coin jam in sensor 41 Discrimination below specified standard 50 Validation sensor A out of range The acceptor detects a problem with sensor A 51 Validation sensor B out of range The acceptor detects a problem with sensor B 52 Validation sensor C out of range The acceptor detects a problem with sensor C 53 Operating temperature exceeded The acceptor detects the ambient temperature has exceeded the changer s operating range thus possibly affecting the acceptance rate 54 Sizing optics failure The acceptor detects an error in the sizing optics Z2 defined as 00 Non specific accept gate error 30 Coins entered gate but did not exit 31 Accept gate ala
14. ILL textBox_status AppendText Set Bills OK r n if InputBuffer 0 BILL_INSERTED if InputBuffer 0 CASH_DISPENSED_MANUALLY byte msb Isb byte routing int cash_inserted 0 double cash double cash_float double scaling_float msb InputBuffer 1 Isb InputBuffer 2 routing InputBuffer 3 cash_inserted msb cash_inserted lt lt 8 cash_inserted Isb cash_float Convert ToDouble cash_inserted the scaling factor depends of the country value of bills that used for example in mexico use value of 20 50 100 200 and 500 MXN value in the demo use a bill acceptor brand Bellis technologies model BV20 not always is the same use of scaling value bill scaling float Convert ToDouble ScalingBill cash cash_float 10 0 only use for Mexican model BV20 should be change for diferent country model and brand company bill acceptor textBox_status AppendText Cash Bills Inserted cash ToString r n textBox_status AppendText Routing Bill routing ToString rin int valuecoins 0 byte typecoin 0 double realval 0 double scaling_float valuecoins InputBuffer 1 valuecoins lt lt 8 valuecoins InputBuffer 2 typecoin InputBuffer 3 realval Convert ToDouble valuecoins scaling_float Convert ToDouble Scaling Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think textBo
15. ILL RETURNED message should also be sent Cash Box out of position The validator has detected the cash box to be open or removed Validator Disabled The validator has been disabled by the VMC or because of internal conditions Invalid Escrow request An ESCROW command was requested for a bill not in the escrow position Bill Rejected A bill was detected but rejected because it could not be identified Possible Credited Bill Removal There has been an attempt to remove a credited stacked bill Note validators must have a means to disable this code due to potential older VMC issues virtually all VMCs designed prior to this code s introduction 10 16 02 will not support it Itis avending machine system issue as to what is done when this code is received Number of attempis to input a bill while validator is disabled Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Coin Manually Dispensed This event is generated automatically when a coin is dispensed manually by pressing the buttons in the Coin Changer private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O CASH_DISPENSED_MANUALLY int valuecoins 0 byte typecoin 0 double realval 0 double scaling_float valuecoins InputBuffer 1 valuecoins lt lt 8 valuecoins InputBuffer 2 typecoin InputBuffer 3 realval Convert T
16. MDB to PC USB converter you need to initialize it again Before calling the function that will telling to MDB USB interface which initialize the collection devices you must create a buffer output data and input byte OutputBuffer new byte 32 byte InputBuffer new byte 32 Once created these buffer will call the function WriteData 1 OutputBuffer 8 where the first parameter 1 is not modified the second parameter refers to the output buffer has been created and the third parameter indicates the size of the data to send In this example a button will be pressed calling the Click event you ask before calling the function the MDB USB drive when connected private void button3_Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer 0 INIT_MDB_DEVICES ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 INIT_MDB_DEVICES is the constant that gives the order to initialize the cash devices advancing as we go we see the different constants supported by the interface MDB USB Note that the constant INIT_MDB_DEVICES is located in the O position of the string OutputBuffer Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think As of now most of the functions have an answer the response function to initialize MDB recovery devices will focus on an event called _onReadComplete By calling the event onReadComplete
17. REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 private void Button_PayOut_Click object sender EventArgs e int cash_to_send byte msb Isb decimal number decimal scalingfloat decimal numeric scalingfloat Convert ToDecimal Scaling numeric Numeric_PayOut Value number numeric scalingfloat cash_to_send Convert Tolnt16 number msb byte cash_to_send gt gt 8 Isb byte cash_to_send amp Oxff OutputBuffer O SEND_CHANGE OutputBuffer 1 msb OutputBuffer 2 Isb if simpleUSB1 DeviceConnected true simpleUSB1 WriteData 1 OutputBuffer 8 private void Button_SetupBill_Click object sender EventArgs e OutputBuffer 0 SETUP_BILL ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 private void textBox status TextChanged object sender EventArgs e Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void NumericSteps_ValueChanged object sender EventArgs e Numeric_PayOut Increment NumericSteps Value private void Button_EnableBill_Click object sender EventArgs e if radioButton_enable Checked true OutputBuffer O SET BILL ACTION TO BE REALIZED OutputBuffer 1 1 simpleUSB1 WriteData 1 OutputBuffer 8 if radioButton_disable Checked true OutputBuffer 0 SET BILL ACTION TO BE REALIZED OutputBuffer 1 O simpleUSB1 WriteData 1 OutputBuffer
18. SB1_onDeviceConnect label1 Text Connected SimpleUSB1 StartReadingInterruptEndPoint 2 8 private void SimpleUSB1_onDeviceDisconnect label1 Text Disconnected simpleUSB1 StopReadingInterruptEndpoint At any point in the program we can ask if it is ON or OFF the device with the Boolean property DeviceConnected if simpleUSB1 DeviceConnected true acci n a realizar Start Reading data To begin reading data from the device will be called the StartReadingInterruptEndPoint function 2 8 You should call this function in the _onDeviceConnect event as seen in the example above the parameters 2 8 are internal device performance data and should not be modified Stop Reading data To stop reading data from the device it will call the function StopReadingInterruptEndpoint You should call this function in the event _onDeviceDisconnect Device Initialization The device to be connected to the PC start scanning if there MDB devices like Coin Changer and Bill Acceptors and if not see the Error LED flashes this means that there is no device connected to the device to correctly Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think scan devices must be of course at least one charging device is connected and powered by a voltage source at least 2Amp 24VDC If you have not turned on the power and 24VDC devices before connecting the
19. Think Easy Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Contenido PAE XIN CLO nee ee HardWare scennsiozntecevansimeacvsaGaviesnd a era rra rar EAE e EE AA E SOON near E E Workspace in Visual Studio oocccccoocccncnnocnnnonaronnonanonnos Importing the DLL manually cocooocccnonoccnncnnnonns Reference Manual nana atacada tantas Type USB COMMUNICATION oocooccocccncnncccnnoncncnnnncnnanonoss interrupt MONO re Bulk Transfer Mode occcccccccncnnocccnnnnnnononnnncnnnnnnnnonnnnancnnnos Connect and disconnect the device cccccccnnncnnnnnnnomo Start Reading Ostasien Stop Reading ddta u u creeinneennkenee Device Initialization oooocccnnnnnncnononncnnnnnnnononannnnnnss Coin Changer FUNCHIONS ooccccnnccnnnncccnnnaccnnanononaranonaninonanoss Setup Coin Changer ismael Cash Coin INSEE docencia Error Data Coin Changer and Bill Acceptors Coin Manually Dispensed occccconcccncnnnccnnonanonnnnnncnnnnnas Tubes Status Coin Changer cccccssccccssseceeeeseeeeeeeseeeees Send Cash Coin Changer PayQut ooooccccncnnnnccnnnnnnns Type Coin Value Accepted ooccccncccccnccncnncccnnnccnonacinonanoss Coin Accepted Extended Version cccccssescseeeeeeseeeees Tubes Status Extended Version ccccccccccssssseseeeeeees DEDEM ECOIN een Bill Validator ooocccnccccncconocccnnnnnonononorccnnnnononononccnnn
20. Type Routing InputBuffer 5 LSB of Coin Type Routing InputBuffer 6 MSB of Country InputBuffer 7 LSB of Country private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 byte msb Isb Level InputBuffer 1 Scaling InputBuffer 2 DecimalPlaces InputBuffer 3 msb InputBuffer 6 Isb InputBuffer 7 Country msb Country lt lt 8 Country Isb textBox_status Text Level Coin Changer Level ToString r n textBox_status Text Scaling Coin Changer Scaling ToString An textBox_status Text Decimal places Changer DecimalPlaces ToString r n textBox_status Text Country Coin Changer Country ToString rn Cash Coin Inserted When you have received money from the coin changer the MDB USB drive automatically send the data through the event _onReadComplete InputBuffer 0 CASH_INSERTED constant indicating that the data sent is money was inserted by user InputBuffer 1 msb most significant byte of the inserted amount InputBuffer 2 Isb least significant byte of the inserted amount InputBuffer 3 routing destination of the coin inserted Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Coin routing 00 CASH BOX 01 TUBES 10 NOT USED 11 REJECT The following example shows how to receive the data and store it in a variable type int as well as print on a l
21. USB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InoutBuffer O COIN VALUE amp amp InputBuffer 1 3 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n int valaccepted 0 if checkBox_bO Checked true valaccepted 0x01 if checkBox_b1 Checked true valaccepted 0x02 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think if checkBox_b2 Checked true valaccepted 0x04 if checkBox_b3 Checked true valaccepted 0x08 if checkBox_b4 Checked true valaccepted 0x10 if checkBox_b5 Checked true valaccepted 0x20 if checkBox_b6 Checked true valaccepted 0x40 if checkBox_b7 Checked true valaccepted 0x80 if checkBox_b8 Checked true valaccepted 0x0100 if checkBox_b9 Checked true valaccepted 0x0200 if checkBox_b10 Checked true valaccepted 0x0400 if checkBox_b11 Checked true valaccepted 0x0800 if checkBox_b12 Checked true valaccepted 0x1000 if checkBox_b13 Checked true valaccepted 0x2000 if checkBox_b14 Checked true v
22. abel for displaying the user private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O CASH_INSERTED byte msb Isb byte routing int cash_inserted 0 double cash double cash_float double scaling_float msb InputBuffer 1 Isb InputBuffer 2 routing InputBuffer 3 cash_inserted msb cash_inserted lt lt 8 cash_inserted Isb cash_float Convert ToDouble cash_inserted scaling_float Convert ToDouble Scaling cash cash_float scaling_float textBox_status Text Cash Inserted cash ToString r n textBox_status Text Routing routing ToString r n Error Data Coin Changer and Bill Acceptors For errors cash devices we have to call the function WriteData 1 OutputBuffer 8 Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think private void Button_Error_Click object sender EventArgs e OutputBuffer 0 ERROR STATUS ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 The information received in the onReadComplete Where in the InputBuffer receives data as follows InputBuffer 0 constant that indicates the error status data InputBuffer 1 msb most significant byte error coinchanger InputBuffer 2 Isb least significant byte error coinchanger InputBuffer 3 ErrorBill data error status bill acceptor
23. alaccepted 0x4000 if checkBox_b15 Checked true Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think valaccepted 0x8000 OutputBuffer O SET COINCHANGER_ EXT coin enable OutputBuffer 1 byte valaccepted gt gt 8 coin enable msb OutputBuffer 2 byte valaccepted amp Oxff coin enable Isb coin enable manually dispense this value could be different that coin enable value OutputBuffer 3 byte valaccepted gt gt 8 coin enable manually dispense msb OutputBuffer 4 byte valaccepted amp Oxff coin enable manually dispense Isb simpleUSB1 WriteData 1 OutputBuffer 8 private void Button dispense coin Click object sender EventArgs e decimal numbercoin 0 decimal typecoin 0 numbercoin numericUpDown_numbercoin Value typecoin numericUpDown_typecoin Value OutputBuffer 0 COIN _ DISPENSE OutputBuffer 1 byte numbercoin OutputBuffer 2 byte typecoin simpleUSB1 WriteData 1 OutputBuffer 8 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1
24. alerts the system that a new data comes MDB USB interface but have not yet linked to where When the MDB USB device has finished to connect and initialized with Cash Devices coin changer and bill acceptor will respond in the event in the following example we asked at the location of buffer 0 if the response corresponds to the initialization the location one of the string byte 1 specifies which devices are connected private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O INIT_MDB_DEVICES if InputBuffer 1 COIN_CHANGER label2 Text Coin Changer finded else if InputBuffer 1 BILL_ACCEPTOR label2 Text Bill Changer finded else if InputBuffer 1 COIN_AND_BILL label2 Text coin and bill connected else label2 Text No cash devices Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Coin Changer Functions Setup Coin Changer In this function we obtain the settings of coin changer the parameters obtained are e Level Indicates the feature level of the changer This will distinguish the changers feature level to the VMC This parameter is not important for use only for data purposes e Coin Scaling factor All accepted coin values must be evenly divisible by this number For example this could be set to 05H for the USA nickel e Decimal places Indi
25. cates the number of decimal places on a credit display For example this could be set to 02H in the USA e Coin type routing Indicates what coin types can be routed to the Changer s tubes e Country The packed BCD country currency code of the changer can be sent in two different forms depending on the value of the left most BCD digit If the left most digit is a O the International Telephone Code is used to indicate the country that the changer is set up for For example the USA code is 00 01H Byte 1 00 and Byte 2 01 If the left 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 Byte 1 18 and Byte 2 40 and for the Euro is 1978 Byte 1 19 and Byte 2 78 For obtain these data we must first make the request data by function WriteData 1 OutputBuffer 8 private void button4_Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer 0 SETUP COIN ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 The response will be sent to the event _onReadComplete The following example reads the response from MDB USB drive the data are sent as follows InputBuffer 0 SETUP COIN CONSTANT InputBuffer 1 Level InputBuffer 2 Scaling Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think InputBuffer 3 Decimal Places InputBuffer 4 MSB of Coin
26. egar referencia u NET COM Proyectos NET COM Proyectos Examinar Reciente Buscar en de Visual Studio 2010 v o 2 E gt Ey Nombre Fecha de modifica Tipo 4 Backup Files 23 12 2012 01 55 a Carpe J Code Snippets 20 12 2012 09 42 a Carpe _ e Projects 21 12 2012 09 07 a Carpe Le ProyectosOLD 08 12 2012 11 11 Carpe J Settings 20 12 2012 09 40 a Carpe I StartPages 08 12 2012 10 53 Carpe E Tamnistor 02 19 0179 10 41 Carne Buscar en Escritorio O 3 Ey SimpleUSB dll Nombre Simple USB dil Tipo Archivos de componentes dll tlb olb ocx exe manifest v Aceptar za Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Once completed these steps we will have added the dll to your project but still we need settings the properties of DLL In Visual C this is done using the keyword using using SimpleUSB Done just simply create an object of type SimpleUSB which allow us to use the functions or methods of the DLL namespace WindowsFormsApplication1 public partial class Form1 Form private SimpleUSB SimpleUSB simpleUSB1 new SimpleUSB SimpleUSB Once the object is created and we can use this to configure some properties necessary for optimal working of our application with the USB device such as the GUID the GUID is provided with the Int
27. erface MDB USB interface this number always the same public Form1 InitializeComponent simpleUSB1 GUID new Guid a3c4dc3e 683a 4220 9279 cdba089ea343 It is advisable to do this from the Load event of the application To use the events generated by the USB it will have to connect with the functions or methods where there will be the code to do when it happens the event this is done as follows this simpleUSB1 onDeviceConnect this usb_onDeviceConnect this simpleUSB1 onDeviceDisconnect this usb_onDeviceDisconnect this simpleUSB1 onReadComplete this usb_onReadComplete Then these functions must be implemented private void usb_onDeviceConnect C digo a realizar private void usb_onDeviceDisconnect C digo a realizar private void usb_onReadComplete Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 ThinkChip C digo a realizar Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Reference Manual Type USB communication For the EasyMDB USB communication we handled two types of USB e Interrupt e Bulk transfer Interrupt mode In the interrupt mode and event is called every time that data is generated from Coin Changer and Bill Validator The data could be generated automatically or by order to send data The process that we receive the data is 2 EasyMDB receives the command executes the action
28. h_in_bill 0 msb InputBuffer 1 Isb InputBuffer 2 cash_in_bill msb cash_in_bill lt lt 8 cash_in_bill Isb textBox_status AppendText Number bills cash_in_bill ToString r n if InputBuffer O SETUP_ BILL ScalingBill InputBuffer 1 ScalingBill lt lt 8 ScalingBill InputBuffer 2 DecimalPlacesBill InputBuffer 3 StackerCapacity InputBuffer 6 StackerCapacity lt lt 8 StackerCapacity InputBuffer 7 CountryBill InputBuffer 4 CountryBill lt lt 8 CountryBill InputBuffer 5 textBox_status AppendText Scaling Bill Acceptor ScalingBill ToString r n textBox_status AppendText Stacker Capacity Bill Acceptor StackerCapacity ToString r n textBox_status AppendText Decimal places Bill DecimalPlacesBill ToString rn textBox_status AppendText Country Bill Acceptor CountryBill ToString rn if InputBuffer O SEND_CHANGE int valsendchanged 0 double realval double scaling_float valsendchanged InputBuffer 1 valsendchanged lt lt 8 valsendchanged InputBuffer 2 III 1111 part modified V1 1 111111 realval Convert ToDouble valsendchanged scaling_float Convert ToDouble Scaling textBox_status AppendText Send PayOut realval ToString r n Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think if InputBuffer O SET B
29. he following example four buttons for enabling and disabling the devices used Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void button6_Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer O SET_COINCHANGER OutputBuffer 1 1 simpleUSB1 WriteData 1 OutputBuffer 8 private void button _Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer O SET_COINCHANGER OutputBuffer 1 O simpleUSB1 WriteData 1 OutputBuffer 8 private void button9_Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer 0 SET_BILL OutputBuffer 1 1 simpleUSB1 WriteData 1 OutputBuffer 8 private void button10_Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer O SET_BILL OutputBuffer 1 O simpleUSB1 WriteData 1 OutputBuffer 8 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Display MDB This Function is for display a value in the MDB Display available in the Store of the website www thinkchip info The display has 4 digit to display a value O to 9999 in USA if you want to display a 1 50 value a value of 150 need to be sent private void button1_Click object sender EventArgs e decimal value 0 int cash O byte msb Isb value numericUpDown_display Val
30. impleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer 0 CASH_IN TUBES EXT amp amp InputBuffer 1 3 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think The first 2 bytes indicates status of coin tube for coin types O to 15 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi bO Y1 Y2 A bit is set to indicate a full tube For example bit 7 set would indicate the tube for coin type 7 is full Indicates the greatest number of coins that the changer knows definitely are present in the coin tubes A bytes position in the 16 byte string indicates the number of coins in a tube for a particular coin type For example the first byte sent indicates the number of coins in a tube for coin type O Unsent bytes are assumed to be zero For tube counts greater than 255 counts should remain at 255 Dispense Coin This function is for dispense coin individually don t recommend to use for pay out instead use PayOut function To send data use the function WriteData 3 OutputBuffer 8 The parameters for this function is T
31. jemploMDBUSB 1 proyecto d i EjemploMDBUSB H Properties o y References iu AD Microsoft VisualBasic 3 SimpleUSB 1 AD System 3 System Core 3 System Data W z 3 System Windows Forms 3 System Xml h System Xmi Ling H ES Forml cs Propiedades 1x simpleUSB1 SimpleUSB SimpleUSB 7 El ApplicationSettings Name simpleUSB1 v7 DeviceConnected False Modifiers Private User Interface EasyMDB USB V1 1 Think By default is 00000000 0000 0000 0000 000000000000 this number need to be changed by a3c4dc3e 683a 4220 9279 cdba089ea343 After changing this property we can start working on the program In the DLL there are different functions then explain each and an example of use In the following examples the SimpleUSB tool is left with the default name is simpleUSB1 Importing the DLL manually Once the project is created we will import the dll SimpleUSB as follows We will go to the right side to the Solution Explorer in the References tab give right click and will press Add Reference Soluci n WindowsFormsApplicationl 1 pro a WindowsFormsApplication1 gt Bl Properties B gt C References Agregar referencia Forml cs Agregar referencia de servicio Program cs Open a window you will click on the Browse tab and be where we will place the file SimpleUSB dll select it and we will accept T Agregar referencia l Agr
32. nnnnnos Bills Inserted ccccecesessscsccveccscecscctscscccescscsescecesessecs Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think STACKET BIN VO LO arriero ibid 35 Enable and disable Coin Changer and Bill ACCeptor cccoooccnnccnocnnnonaccnnonanonnnonaconnnnnonnnonononononaronnonanonnnnnnoss 36 DIS MOD suenos a ee nee essen ee ee 38 CON ANOS ee a ee ee 39 DEMO COS ia 39 Udo oo A E ue e PE E ae 40 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Chip Introduction In this guide the user will find all technical information for the interface and how to use the DLL file SimpleUSB dll in the software Visual Studio Hardware Led Indicator MDB Led Indicator USB Error MDB MDB Port o O o lo O lO O Power input 24VDC 34VDC 2Amp USB 5VDC 500 mA Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 ThimkChif Install guide When connecting the MDB USB Device the Windows operating system will try to search their database driver corresponding if there not finding then will ask the user to manually install driver For Windows XP is automatically request manually install the driver but for Windows Vista 7 and 8 install from Device Manager When the device is connected will appear an icon in gt DAS A gt JE Equipo the Device Manager as seen in the figure gt i Jungo gt ME Monitores A Mou
33. oDouble valuecoins scaling_float Convert ToDouble Scaling textBox_status AppendText Cash Dispensed Manually r n textBox_status AppendText Amount realval ToString r n textBox_status AppendText Type Coin typecoin ToString r n Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Tubes Status Coin Changer To know how much money is in the tubes in the coin changer it will call the function WriteData 1 BufferOutput 8 In the following example a button is used calling the Click event private void button4_Click object sender EventArgs e OutputBuffer 0 CASH_IN_TUBES simpleUSB1 WriteData 1 OutputBuffer 8 The answer will be sent to the event onReadComplete The following example reads the response from MDB USB drive the data are sent as follows InputBuffer 0 constant indicating money tubes InputBuffer 1 msb most significant data byte InputBuffer 2 Isb least significant data byte private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O CASH_IN_TUBES byte msb Isb int cash_in_tubes msb InputBuffer 1 Isb InputBuffer 2 cash_in_tubes msb cash_in_tubes lt lt 8 cash_in_tubes Isb label5 Text Cash in tubes cash_in_tubes ToString Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think
34. oint ref InputBuffer 8 if InputBuffer O BILL_INSERTED byte msb Isb byte routing int cash_inserted 0 double cash double cash_float double scaling_float msb InputBuffer 1 Isb InputBuffer 2 routing InputBuffer 3 cash_inserted msb cash_inserted lt lt 8 cash_inserted Isb cash_float Convert ToDouble cash_inserted the scaling factor depends of the country value of bills that used for example in mexico use value of 20 50 100 200 and 500 MXN value in the demo use a bill acceptor brand Bellis technologies model BV20 not always is the same use of scaling value bill scaling float Convert ToDouble ScalingBill cash cash_float 10 0 only use for Mexican model BV20 should be change for diferent country model and brand company bill acceptor textBox_status Text Cash Bills Inserted cash ToString r n textBox_status Text Routing Bill routing ToString rn Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Stacker Bill Validator The inquiry Stacker bills gives us the number of bills in the escrow not the amount of money To request this information the function is used WriteData 1 OutputBuffer 8 In the following example information is requested by using the Click event of a button private void button5_Click object sender EventArgs e if simpleUSB1 DeviceConnected true OutputBuffer 0 CASH_IN_
35. omatically enabled upon reset Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think int valaccepted 0x33 OutputBuffer O SET COINCHANGER EXT coin enable OutputBuffer 1 byte valaccepted gt gt 8 coin enable msb OutputBuffer 2 byte valaccepted amp Oxff coin enable Isb coin enable manually dispense this value could be different that coin enable value OutputBuffer 3 byte valaccepted gt gt 8 coin enable manually dispense msb OutputBuffer 4 byte valaccepted amp Oxff coin enable manually dispense Isb simpleUSB1 WriteData 1 OutputBuffer 8 The response is received in the event usb_ onReadComplete if InputBuffer 0 SET COINCHANGER EXT textBox_status AppendText Set Coin Changer Extended Version r n if InputBuffer 1 1 textBox_status AppendText OK r n else textBox_status AppendText FAIL r n Tubes Status Extended Version This function is used to know how many coins are in each tube Is the version extended of Tube Status to receive the data we need to send the function 3 times this function is Bulk Transfer data and we need to receive 18 bytes WriteData 3 OutputBuffer 8 Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think private void Button _TubeExt_Click object sender EventArgs e OutputBuffer 0 CASH_IN_TUBES EXT OutputBuffer 1 1 simpleUSB1 WriteData
36. ows finaliz la instalaci n del software de controlador para este dispositivo o le Convertidor MDB USB 2 Cerrar Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think If you installed the driver successfully be 4 r a ES 73 Puertos COM y LPT displayed in Device Manager y 22 Teclados 4 t ThinkChip Devices fs Convertidor MDB USB gt Unidades de disco gif Unidades de DVD o CD ROM Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Software Workspace in Visual Studio There are two ways to integrate the DLL we present the first way Before starting to use the DLL we need to add it to our tools we need only search the Software folder in the direction where we copy the files on the disk the file named SimpleUSB dll and drag tools in Visual Studio k Puntero 3 BackgroundWorker Te BindingNavigator tai BindingSource Button 9 SimpleUSB CheckBox CheckedListBox 135 ColorDialog EX ComboBox h 000 He oe m amp de Ss a _ Forml cs Dise o P gina de inicio m When you select the new tool and integrate in to our Form we set up a property called GUID iw AD System Data DataSetExtensions MODIFICACION BE Ese 13 System Drawing Linea Columna Copyright All rigth reserved ThinkChip mM 3 El A f x Explorador de soluciones EjemploMD 4 X 2 20 6584 oz Soluci n E
37. ppendText EasyMDB disconnected r n simpleUSB1 StopReadingInterruptEndpoint Button_Init Enabled false private void usb_onReadComplete Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O INIT_MDB_DEVICES if InputBuffer 1 COIN_CHANGER textBox_status AppendText Coin Changer Connected r n groupBox_coin Enabled true else if InputBuffer 1 BILL_ACCEPTOR textBox_status AppendText Bill Acceptor Connected r n groupBox_bill Enabled true else if InputBuffer 1 COIN AND BILL textBox_status AppendText Coin and Bill Devices Connected r n groupBox_bill Enabled true groupBox_coin Enabled true else textBox_status AppendText Not connected r n if InoutBuffer O SETUP_COIN byte msb Isb Level InputBuffer 1 Scaling InputBuffer 2 DecimalPlaces InputBuffer 3 msb InputBuffer 6 Isb InputBuffer 7 Country msb Country lt lt 8 Country Isb textBox_status AppendText Level Coin Changer Level ToString rin textBox_status AppendText Scaling Coin Changer Scaling ToString rin textBox_status AppendText Decimal places Changer DecimalPlaces ToString rin textBox_status AppendText Country Coin Changer Country ToString r n if InputBuffer O CASH_INSERTED
38. rivate void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndpoint ref InputBuffer 8 if InputBuffer O SEND_CHANGE int valsendchanged O double realval double scaling_float valsendchanged InputBuffer 1 valsendchanged lt lt 8 valsendchanged InputBuffer 2 ITINTIT1111 part modified V1 1 1111 realval Convert ToDouble valsendchanged scaling float Convert ToDouble Scaling textBox_status AppendText Send PayOut realval ToString An The data sent to the InputBuffer 1 and InputBuffer 2 is the value amount that the Coin Changer dispense for example if send 10 value and received only 8 then miss 2 value for complete 10 Maybe because the Coin Changer don t have enough money in tubes or a fail in mechanism Type Coin Value Accepted This function indicates the value of coin types O to 15 Values must be sent in ascending order This number is the coin s monetary value divided by the coin scaling factor Unused coin types are sent as OOH Coin type credits sent as FFH are assumed to be vend tokens That is their value is assumed to worth one vend The bytes position in the 16 byte string indicates the coin type s For example the first byte sent would indicate the value of coin type O the second byte sent would indicate the value of coin type 1 and so on For example the USA coin types may be Coin type O nickel Coin type 1 dime Coin type 2 quarter Coin type 3
39. rm active 40 Accept gate open but no coin detected 50 Post gate sensor covered before gate opened Z2 defined as 00 Non specific separator error 10 Sort sensor error The acceptor detects an error in the sorting sensor Z2 defined as 00 Non specific dispenser error Z2 defined as 00 Non specific cassette error 02 Cassette removed 03 Cash box sensor error The changer detects an error in a cash box sensor 04 Sunlight on tube sensors The changer detects too much ambient light on one or Copyright All rigth reserved ThinkChip more of the tube sensors User Interface EasyMDB USB V1 1 Think Chip Table code error for bill Validator 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 O10xxxxx Bill Validator Only Defective Motor One of the motors has failed to perform its expected assignment Sensor Problem One of the sensors has failed to provide its response Validator Busy The validator is busy and can not answer a detailed command right now ROM Checksum Error The validators internal checksum does not match the calculated checksum Validator Jammeds A bill s has jammed in the acceptance path Validator was reset The validator has been reset since the last POLL Bill Removed A bill in the escrow position has been removed by an unknown means A B
40. se y otros dispositivos se aladores 4 ip gg EA 5 D a 2 Puertos COM y LPT gt E Unidades de disco j Otros dispositi Select the device right click and select Properties I B a niet mig comunicaciones PC a Actualizar software de controlador Deshabilitar Desinstalar Buscar cambios de hardware Propiedades Propiedades Convertidor MDB USB A window will appear in which select Update Driver PC dores de red adoras ATA A m Convertidor MDB USB adoras de bus adoras de soni Proveedor del Desconocido controlador Controlador Detalles tivos de interf Fecha del controlador Ne disponible tivos del siste Versi n del controlador No disponible Firmante digital No est firmado digitalmente res y otros disposi Detalles del controlador Ver detales delos archivos del ispositivos segtrolador troladora simp vertidor MDB rto serie PCI A e rado dispositivo no funciona dores correctamente revertir al controlador COM y LPT instalado previamente IS Deshabilita el dispositivo seleccionado es de disco Desinstalar el controlador avanzado 25 de DVD o CL Aceptar Cancelar Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 Think Chip Select Search computer for driver software mele em gt E A Actualizar software de controlador Convertidor MDB USB PA a
41. te SET_BILL 11 const byte SEND_CHANGE 9 const byte SETUP_COIN 8 const byte SETUP_BILL 12 const byte BILL_INSERTED 5 const byte COIN_VALUE 14 const byte SET_COINCHANGER_EXT 15 const byte CASH_DISPENSED_MANUALLY 16 const byte COIN_DISPENSE 17 byte Level O byte Scaling 0 int Country 0 byte DecimalPlaces O int ScalingBill O byte DecimalPlacesBill O int CountryBill 0 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think int StackerCapacity 0 private SimpleUSB SimpleUSB simpleUSB1 new SimpleUSB SimpleUSB public Form1 InitializeComponent simpleUSB1 GUID new Guid a3c4dc3e 683a 4220 9279 cdba089ea343 groupBox_bill Enabled false groupBox_coin Enabled false Button_Init Enabled false NumericSteps Value 0 25M Numeric_PayOut Increment 0 25M private void Form1_Load object sender EventArgs e this simpleUSB1 onDeviceConnect this usb_onDeviceConnect this simpleUSB1 onDeviceDisconnect this usb_onDeviceDisconnect this simpleUSB1 onReadComplete this usb_onReadComplete private void Button connect Click object sender EventArgs e simpleUSB1 OpenConnection private void usb_onDeviceConnect textBox_status AppendText EasyMDB connected r n simpleUSB1 StartReadingInterruptEndPoint 2 8 Button Init Enabled true private void usb_onDeviceDisconnect if textBox_status A
42. ue cash Convert Tolnt16 value msb byte cash gt gt 8 Isb byte cash amp Ox00ff OutputBuffer 0 DISPLAY VAL OutputBuffer 1 msb OutputBuffer 2 Isb simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer 0 DISPLAY VAL textBox_status AppendText Display MDB OK r n Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think CONSTANTS const byte INIT_MDB_DEVICES 1 const byte COIN_CHANGER 1 const byte BILL_ACCEPTOR 2 const byte COIN_AND_BILL 3 const byte CASH_INSERTED 2 const byte ERROR_STATUS 4 const byte CASH_IN_TUBES 3 const byte CASH_IN_TUBES_EXT 13 const byte CASH_IN_BILL 6 const byte SET_COINCHANGER 10 const byte SET_BILL 11 const byte SEND_CHANGE 9 const byte SETUP_COIN 8 const byte SETUP_BILL 12 const byte BILL_INSERTED 5 const byte COIN_VALUE 14 const byte SET_COINCHANGER_EXT 15 const byte CASH_DISPENSED_MANUALLY 16 const byte COIN_DISPENSE 17 Demo Code Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think The entire project is available in the demo software EasyMDB Example Demo available in the web page www thinkchip info a Easy MDB Demo W1 1 Connect EasyMDB Disconnect EasyMDB Source Code using System using System Collections Generic using System ComponentModel
43. us AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n OutputBuffer 0 CASH IN TUBES EXT OutputBuffer 1 3 simpleUSB1 WriteData 3 OutputBuffer 8 simpleUSB1 ReadBulkEndpoint 4 ref InputBuffer 8 if InputBuffer O CASH_IN_TUBES EXT amp amp InputBuffer 1 3 textBox_status AppendText InputBuffer 2 ToString r n textBox_status AppendText InputBuffer 3 ToString r n textBox_status AppendText InputBuffer 4 ToString r n textBox_status AppendText InputBuffer 5 ToString r n textBox_status AppendText InputBuffer 6 ToString r n textBox_status AppendText InputBuffer 7 ToString r n private void radioButton_enable_coin_CheckedChanged object sender EventArgs e if radioButton_enable_coin Checked true OutputBuffer 0 SET_COINCHANGER ACTION TO BE REALIZED OutputBuffer 1 1 simpleUSB1 WriteData 1 OutputBuffer 8 if radioButton_enable_coin Checked false OutputBuffer O SET COINCHANGER OutputBuffer 1 O simpleUSB1 WriteData 1 OutputBuffer 8 private void Button coin value Click object sender EventArgs e OutputBuffer O COIN_VALUE OutputBuffer 1 1 simpleUS
44. x_status AppendText Cash Dispensed Manually r n textBox_status AppendText Amount realval ToString r n textBox_status AppendText Type Coin typecoin ToString r n if InputBuffer 0 SET COINCHANGER EXT textBox_status AppendText Set Coin Changer Extended Version r n if InputBuffer 1 1 textBox_status AppendText OK r n else textBox_status AppendText FAIL r n if InputBuffer O COIN_DISPENSE if InputBuffer 1 1 textBox_status AppendText Send Coin Dispense OK r n else textBox_status AppendText Send Coin Dispense FAIL r n private void Button_disconnect_Click object sender EventArgs e simpleUSB1 CloseConnection private void Button_Init_Click object sender EventArgs e OutputBuffer 0 INIT_MDB_DEVICES ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think private void Button_SetupCoin_Click object sender EventArgs e OutputBuffer 0 SETUP COIN ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 private void Button Tubes Click object sender EventArgs e OutputBuffer 0 CASH_IN_TUBES ACTION TO BE REALIZED simpleUSB1 WriteData 1 OutputBuffer 8 private void Button_Error_Click object sender EventArgs e OutputBuffer 0 ERROR STATUS ACTION TO BE
45. ypes of Coin and number of coins private void Button _dispense coin _Click object sender EventArgs e decimal numbercoin 0 decimal typecoin 0 numbercoin numericUpDown_numbercoin Value typecoin numericUpDown_typecoin Value OutputBuffer 0 COIN_DISPENSE OutputBuffer 1 byte numbercoin OutputBuffer 2 byte typecoin simpleUSB1 WriteData 1 OutputBuffer 8 The response only tell that is done the action but don t tell us how much amount is given The response is in the event usb_onReadComplete Copyright All rigth reserved ThinkChip User Interface Easy MDB USB V1 1 if InputBuffer O0 COIN_DISPENSE if InputBuffer 1 1 textBox_status AppendText Send Coin Dispense OK r n else textBox_status AppendText Send Coin Dispense FAIL r n Copyright All rigth reserved ThinkChip User Interface EasyMDB USB V1 1 Think Bill Validator Bills Inserted When the Bill Validator receives a bill The answer will be sent to the event _onReadComplete The following example reads the response from MDB USB drive the data are sent as follows InputBuffer 0 constant indicating that this is Bill inserted InputBuffer 1 msb most significant byte of the amount of bill InputBuffer 2 Isb least significant byte of the amount of bill InputBuffer 3 Routing of bill always be in escrow private void simpleUSB1_onReadComplete simpleUSB1 ReadInterruptEndp
Download Pdf Manuals
Related Search
Related Contents
CHEM SPRAY® Océ Repro Desk 国際ローミング設定ツール - セイコーソリューションズ株式会社 SERVICE MANUAL Page 100 9. ACTIVE PRODUCTS Franke Active Doccia Conditions Générales Services Enlèvement et Traitement User Guide : Free Download, Borrow, and Streaming : Internet Archive Copyright © All rights reserved.
Failed to retrieve file