iPRO-RC - notes count issue

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
mzdunek
Posts: 25
Joined: Fri Apr 29, 2022 8:45 am

iPRO-RC - notes count issue

Post by mzdunek »

Hello,

I have observed, that field CointCount in iPRO-RC's recycler stores value which cannot be updated.
For example now CoinCount is 33, when trying to set actual count (after for example putting manually notes into recycler with recycler's door opening) with:

Code: Select all

TheDispenser.CoinCount = 10;
TheDispenser.Status = DISPENSER_UPDATE_COUNT;
AESImhei.WriteDispenserDetails(D, TheDispenser);
CoinCount does not change at all - after reading params it is still 33.

I tried dumping recycler into cash box with:

Code: Select all

TheDispenser.Status = DISPENSER_CASHBOX_DUMP;
AESImhei.WriteDispenserDetails(D, TheDispenser);
But it does not work too.

What am I doing wrong?
iPRO is connected through ID-003 and other functions like accepting and dispensing notes work well.

Thanks,
Marcin
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: iPRO-RC - notes count issue

Post by davebush »

Hi,

You can prove that the underlying Paylink code works by issuing a dump using the Demo program. (On the dispensers screen there is a button against each dispenser)

If you look at the log when you do that, you will see messages that are obviously Paylink detecting the request and carrying it out.

You can then check that log against the log when you run your code.

Regards

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: iPRO-RC - notes count issue

Post by davebush »

This is the code for our very simple Dispense Count test harness:

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "..\..\..\Aesimhei.h"

void PayCoins(long NoOfCoins) ;

int main(int ac, char **av)
    {
    long OldOpen =1234 ;
    long OldEscrow = 1234 ;
    while(1)
      {
      long OpenStatus = OpenMHE() ;
      if (OpenStatus != OldOpen)
         {
         printf("Open %d => %d\n",OldOpen, OpenStatus ) ;
         OldOpen = OpenStatus ;
         }

      if (OpenStatus == 0)
         {
         EnableInterface() ;
         break ;
         }
       Sleep(1000) ;
       }

    DispenserBlock Disp ;
    for (int i = 0 ; ReadDispenserDetails(i, &Disp) ; ++i)
       {
       Disp.CoinCount = 101 ;
       Disp.Status = DISPENSER_UPDATE_COUNT ;
       WriteDispenserDetails(i, &Disp) ;
       }
    while (1)
       Sleep(1000) ;
    }
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
mzdunek
Posts: 25
Joined: Fri Apr 29, 2022 8:45 am

Re: iPRO-RC - notes count issue

Post by mzdunek »

Dump indeed works, but updating count does not, and gives log like "Coincount update to 32000 not implemented" (even if I set 20 not 32000).
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: iPRO-RC - notes count issue

Post by davebush »

Hi,

That error is (should be!) when you use DISPENSER_UPDATE_COUNT on an ordinary hopper, where you can't change the field. The error message should have been prefixed with the dispenser type - what was the full line?

Did you try my test code - which updates every dispenser? (Note I just realized you need a value less than 100!)

Do you have any other dispensers on the system?

Regards

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
mzdunek
Posts: 25
Joined: Fri Apr 29, 2022 8:45 am

Re: iPRO-RC - notes count issue

Post by mzdunek »

Greping "ID" on logs gives only this:

Code: Select all

09:38:36.441 ID-003: Enable
09:38:36.441 API: ID-003 Status to 0
09:38:36.441 ID-003 Rcycler Box: Count 19912 is above maximum
09:38:36.441 ID-003 Rcycler Box: Count 32928 is above maximum
09:38:36.560 ID-003: Enable acceptance
09:38:36.773 ID-003: Status 1a=>c3
09:38:36.773 ID-003: Status c3=>11
09:38:36.949 ID-003: Disable
09:38:36.949 API: ID-003 Status to 4
09:38:36.949 ID-003: Disable acceptance
09:38:36.949 ID-003: Status 11=>c3
09:38:37.077 ID-003: Status c3=>1a
I have run only setting
TheDispenser.CoinCount = 30;
TheDispenser.Status = DISPENSER_UPDATE_COUNT;

But even after that CoinCount is still 15.

Here is full code:

Code: Select all

int count = 30;
EnableInterface();
AESImhei.DispenserBlock TheDispenser = new AESImhei.DispenserBlock();
for (int D = 0; AESImhei.ReadDispenserDetails(D, TheDispenser); ++D) {
    if (1000 == TheDispenser.Value) {
         TheDispenser.CoinCount = count;
         logger.info("USTAWIAM DISP COUNT dla " + TheDispenser.Value + " NA " + count);
         TheDispenser.Status = DISPENSER_UPDATE_COUNT;
         AESImhei.WriteDispenserDetails(D, TheDispenser);
     }
}
Utils.sleep(0.2);
TheDispenser = new AESImhei.DispenserBlock();
    for (int D = 0; AESImhei.ReadDispenserDetails(D, TheDispenser); ++D) {
        if (1000 == TheDispenser.Value) {
            logger.info("Disp Value:" + TheDispenser.Value);
            logger.info("Disp CoinCount:" + TheDispenser.CoinCount); // prints 15
            logger.info("Disp Status:" + TheDispenser.Status);
            logger.info("-----------------");
        }
    }

Utils.sleep(0.2);
DisableInterface();
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: iPRO-RC - notes count issue

Post by davebush »

Hi,

This line:
ID-003 Rcycler Box: Count 19912 is above maximum
shows Paylink detecting the DISPENSER_UPDATE_COUNT request. For some reason the requested value appears to have been corrupted. I can't see any problems with your code, so it is possibly a bug in Paylink.

Is this code C#?

What version of the firmware are you running? The latest is 4.1.12.15

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
mzdunek
Posts: 25
Joined: Fri Apr 29, 2022 8:45 am

Re: iPRO-RC - notes count issue

Post by mzdunek »

This code is Java.

10:34:29.391 Ver 001.001.012.015-526 Dec 13 2023 15:03:57
Paylink driver, [v4.1.12.9]
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: iPRO-RC - notes count issue

Post by davebush »

Hi,

Checking the Java interface, it accidentally omits the CointCount field. The DLLs here: http://www.aesoffice.eu.com/HTTPSpace/P ... eiJava.zip should fix the problem.

Regards

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
mzdunek
Posts: 25
Joined: Fri Apr 29, 2022 8:45 am

Re: iPRO-RC - notes count issue

Post by mzdunek »

Can you send files for Linux?
davebush
Posts: 482
Joined: Fri Oct 22, 2004 12:20 pm

Re: iPRO-RC - notes count issue

Post by davebush »

Hi,

In fact the only file needed for Linux is already in that zip - AESImheiJava.cpp

If you copy that into the folder PayLink/Java/ (replacing the version that is there) you can then execute ./Build.sh to compile it and make Install to install the new .so file into your system

Regards

Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
mzdunek
Posts: 25
Joined: Fri Apr 29, 2022 8:45 am

Re: iPRO-RC - notes count issue

Post by mzdunek »

Hello, thanks, I have tested it today and it works properly.
Post Reply