Conectar MEI CF7000 a Visual Studio

 En easymdb
[:en] 

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

mei cf7000 visual studio

Add the DLL in your Visual Studio project

 Create a project in Visual Studio, and add the DLL file “SimpleUSB.dll in Toolbox

mei cf7000 to visual studio

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.

mei cf7000 to visual studio

Connecting the device USB is simple with the function OpenConnection().

mei cf7000 to visual studio

Access easily to the events DLL from Properties.

mei cf7000 to visual studio

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.

mei cf7000 to visual studio

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.

mei cf7000 to visual studio

For example, we are going to start the communication with Coin Changer, once we are start the connection USB.

mei cf7000 to visual studio

mei cf7000 to visual studio

Setup Coin

This command give us a important information of Coin Changer has:

  • Level:

    Indicates the feature level of the changer. This will distinguish the changers feature level to the VMC.

  • Scaling:

    All accepted coin values must be evenly divisible by this number. For example, this could be set to 05H for the USA nickel.

  • Decimal Places:

    Indicates the number of decimal places on a credit display. For example, this could be set to 02H in the USA.

  • 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 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).

mei cf7000 to visual studio

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.

mei cf7000 to visual studio

[:]
Publicaciones Recomendadas

Dejar un Comentario

0

Comience a escribir y presione Enter para buscar