Conectar MEI CF7000 a Visual Studio
MEI CF7000 Visual Studio
In this article we show you how connect a Coin Changer MDB protocol MEI CF7000 to Visual Studio in less than 5 minutes
Add the DLL in your Visual Studio project
Create a project in Visual Studio, and add the DLL file “SimpleUSB.dll in Toolbox
Add the code in to the GUID properties a3c4dc3e-683a-4220-9279-cdba089ea343 in the parameter, this is the Globally Unique Identifier (GUID) for a hardware device class. This number is unique for EasyMDB USB.
Connecting the device USB is simple with the function OpenConnection().
Access easily to the events DLL from Properties.
Start communication with Coin Changer and Bill Validator
To start communicating with the cash devices, we need to send a series of commands to the board EasyMDB USB, this commands are predefined constants.
The chart below, show us the steps that we have to do, this sequence is for establish correct communication with EasyMDB, plus the information that give us this commands, it’s important for a correct programming interface.
For example, we are going to start the communication with Coin Changer, once we are start the connection USB.
This command give us a important information of Coin Changer has:
Indicates the feature level of the changer. This will distinguish the changers feature level to the VMC.
All accepted coin values must be evenly divisible by this number. For example, this could be set to 05H for the USA nickel.
Indicates the number of decimal places on a credit display. For example, this could be set to 02H in the USA.
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 0, 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 (Z2 = 00 and Z3 = 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 (Z2 = 18 and Z3 = 40) and for the Euro is 1978 (Z2 = 19 and Z3 = 78).
Receptions of coins and bills
The reception of coins inserted and bills, is by events generated in simpleUSB1_onReadComplete() , the chart below show how to process the data reception.