I am using the Paylink connected to several Universal Hoppers in an ATM-like scenario. Sometimes we need to completely empty the hoppers, like for audits. Since this can take a while (10-15 minutes), I've added a "cancel" feature to stop a payout in progress.
Basically, my code looks like this:
Code: Select all
// Disable all dispensers
foreach(var dispenser in Dispensers){
dispenser.Inhibit = 1;
dispenser.WriteDetails();
}
Thread.Sleep(2000);
// Re-enable all dispensers
foreach(var dispenser in Dispensers){
dispenser.Inhibit = 0;
dispenser.WriteDetails();
}
The problem is that every dispenser is no longer inhibited, the AESImhei.LastPayStatus() shows as "Inhibited". Even if I attempt to do a subsequent payout, it doesn't dispense anything and LastPayStatus stays as Inhibited.
So, how do I stop a payout in progress, and then re-enable the AESImhei device for future payouts?