Describing hoppers besides their nominal value

Support for the Milan Intelligent interface, sold by Money Controls as the Paylink USB unit and for the earlier PCI card version.

Moderators: aardvark, davebush, Admin

Post Reply
dotnetguy
Posts: 17
Joined: Wed Nov 30, 2016 2:56 pm

Describing hoppers besides their nominal value

Post by dotnetguy »

We use hoppers for dispensing coins and tokens. Token prices can change and transactions are handled in our application, so we don't care if paylink/hopper is aware of prices.
What kind of setup and algorithm do you suggest for dispensing tokens and coins?

1) If Standard.cfg is

Code: Select all

Hopper at 4 Value 50 //Token price = 0.5EUR
Hopper at 5 Value 50 //0.5 EUR
For dispensing tokens our application has to inhibit coin hopper(s) at given address(es) and call

Code: Select all

AESImhei.Payout(50)
to dispense 1 token. If application wants to dispense coins it has to inhibit token dispenser(s) at given address(es) and call

Code: Select all

AESImhei.Payout(50)
to dipsense 1 0.5 EUR.
Cons:
  • Our application depends on token and coin hopper addresses
  • Our application needs to inhibit coin hopper each time when tokens are requested and vice-versa
2) If Standard.cfg is

Code: Select all

Hopper at 4 //Token
Hopper at 5 Value 50 //0.5 EUR 
it means that our application can call

Code: Select all

AESImhei.Payout(50)
to dispense 0.5 EUR with out worrying that paylink might use token hopper. If tokens are requested it would mean that our application has to inhibit all dispensers with assigned value, assign value(50) to dispensers that has not one and then call

Code: Select all

AESImhei.Payout(50)
to dispense 1 token.

Pros:
  • Our applicaiton does not depend on hopper addresses and can resolve coin and token hopper difference on runtime.
Cons:
  • Our application needs to write token hopper value each time when token are requested
2.1) for previous solution it is possible to use

Code: Select all

AESImhei.PaySpecific()
to dipsense tokens without inhibiting coin hoppers, but that would still mean calling

Code: Select all

AESImhei.SetDispenseQuantity(int,int,int)
and it feels very clumsy.

My 2 cents of feedback.

Ideally I would like to use your api like:

Standard.cfg

Code: Select all

Hopper at 4 "Token"
Hopper at 5 Value 50 "Coin50"
Hopper at 6 Value 100 "Coin100" 
Dispensing 1 token

Code: Select all

AESImhei.Payout(1, "Token")
Dispensing 3 units of 0.5 EUR

Code: Select all

AESImhei.Payout(3, "Coin50")
Dispensing total of 3.5 EUR

Code: Select all

AESImhei.Payout(350)
Pros:
  • It is clean and clear (apart from static calls and void return value, but that's another subject)
  • No need to read or write dispenser snapshots for paying out
  • You can target specific hoppers in configuration
I understand and like have option to control each dispenser individually, but it would be a bit overkill in my situation. I also understand that currently hopper cannot dispense without having value assigned to it, but I see that paylink should not be concerned about what values hoppers have been assigned if user is not specified them.

I, as an application developer, care about how many "units" has paylink dispensed and keeping responsibilty of maintaining and handling transaction releated concepts on application layer.
davebush
Posts: 490
Joined: Fri Oct 22, 2004 12:20 pm

Re: Describing hoppers besides their nominal value

Post by davebush »

Your application is relatively unique, in that almost everyone else is dispensing only coins, and those that are dispensing tokens are not dispensing coins as well.

At the end of the day, the only thing that the electronics / code knows about the hoppers is the address.

The address on the hopper is reported in the Dispenser block, so it is easy for you to locate the dispenser block for each hopper - and although the ReadDispenserDetails() uses a serious amount of typing, the underlying code execution is very small.

I think the solution that I would code is to configure all the hoppers with a value matching their address and ignore all the automatic features of Paylink payout.

The application then works in terms of hopper address; it works out what it wants each hopper to dispense and then calls AESImhei.SetDispenseQuantity(Index, Count, Product) [where Product is Count * Address] for each hopper and then AESImhei.PaySpecific(TotalProduct) to perform the dispense.

You could just code 1 for the value of each hopper, but by matching the address you get the cross check features of having to put the correct Product and TotalProduct.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
dotnetguy
Posts: 17
Joined: Wed Nov 30, 2016 2:56 pm

Re: Describing hoppers besides their nominal value

Post by dotnetguy »

I appreciate your reply.

Seems that there isn't a elegant solution for my problem. I'll consider your suggestions.
Post Reply