Hello.
I have noticed that after a payout the pay status is PAY_FINISHED but if I disconnect the USB and try do get last pay status it is PAY_ONGOING.
Is this normal?
I have also noticed that when a dispenser becomes empty and I put coins in it the status is still empty until I do a payout, so I have to return coins to update status? Is there any other way?
Thank you very much for your attention.
This is the code I am running:
long
startOperation ()
{
printf("start operation\n");
long OpenStatus = OpenSpecificMHEVersion("AE000002",65538) ;
if (OpenStatus != 0)
printf("IMHEI open failed - %ld\n", OpenStatus) ;
else {
printf("check usb\n");
USBStatus usbStatus = USBDriverStatus();
printf("usbStatus %d\n", usbStatus);
printf("enable interface\n");
EnableInterface() ;
}
return OpenStatus;
}
void
PayCoins (long NoOfCoins)
{
if(startOperation() != 0) {
return;
}
PayOut(NoOfCoins * 100) ;
long status = LastPayStatus();
printf("paystatus %ld\n", status);
while (status == PAY_ONGOING) {
Sleep(10) ;
status = LastPayStatus();
}
status = LastPayStatus();
printf("paystatus %ld\n", status);
if (status != PAY_FINISHED)
printf("Error %ld when paying %ld coins\n", status, NoOfCoins) ;
else
printf("%ld coins paid out, Value %ld\n", NoOfCoins, CurrentPaid()) ;
printf("finish\n");
DisableInterface();
}
Check USB Status
Moderators: aardvark, davebush, Admin
In answer to your first point, the operation of the Paylink is undefined when the USB lead is not connected. You can tell the status of the USB link using USBDriverStatus().
The PAY_EMPTY problem is because the information relates to the result of operating the mechanism and checking to see if any coins are ejected. The only way to get a different status is to again operate the mechanism.
Some hoppers are fitted with metal plates to detect the presence of coins. If these are fitted, then the Dispenser block field CoinCountStatus provides feedback as to which ones are shorted by the coins.
The PAY_EMPTY problem is because the information relates to the result of operating the mechanism and checking to see if any coins are ejected. The only way to get a different status is to again operate the mechanism.
Some hoppers are fitted with metal plates to detect the presence of coins. If these are fitted, then the Dispenser block field CoinCountStatus provides feedback as to which ones are shorted by the coins.
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.