It's not relevant, but this line is obviously wrong:
TheAcceptor.Status = DISPENSER_REASSIGN_VALUE;
You do not need to set Status at all, and especially not to a Dispenser value!
If you're programming in 'C' or 'C++' this line:
AcceptorCoin coin = TheAcceptor.Coin;
makes a local copy of the structure, so any modifications are just lost. (You need to make coin a pointer)
You can try out the values to see if they work, without getting into writing code by using the Demo program. The Demo program does very little apart from using WriteAcceptorDetails to update the Paylink.
Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.
I can see nothing obviously wrong with you code snippets.
My best suggestion is that you run “MilanDiag” to observe the Paylink log being written and then run the "Demo" program to control Paylink
The Acceptor details and Dispenser details screens mirror quite closely the fields in AcceptorBlock and DispenserBlock, and the Demo program issues WriteAcceptorDetails() / WriteDispenserDetails() calls every time you update fields on the screen.
You should see the results of these updates being actioned, and Paylink deciding what to do with inserted coins, on the log. Some of the messages may be obscure but many of them should be perfectly understandable. This should then give you a reference log of Paylink working properly.
Once you’ve done that you should then be able to compare the logged results of executing your code against this reference
Regards
Dave
Aardvark software developer. Please put all communication on the problem through the board for the benefit of others.