Jump to content

MDB Question


Recommended Posts

Hi all,

I'm hoping there are some MDB experts here as I have a bit of a problem.

I am programming a Raspberry Pi as a cashless device using a dedicated RS232 to MDB expansion card. Everything seems to be going well with my development except when I add (cashless) credit to the machine. The machine shows the credit I add (example £2.00), but then regardless of what selection is made, the price returned by the VMC is always 80p, i.e. 13000008002C47.

The selection number in the code is always correct, so I could just use this and maintain a database of prices of selection numbers and look this up for each sale, but if I forget to update the database but do update the price in the machine, this could lead to customers being charged unexpected prices.

Does anyone know why this is happening? I have tried changing the scale factor, and the decimal places, but it always returns 80p!

 

Mark.

 

Just a bit of background as I am new to the forum! The vending machine is a secondhand snack and can machine (Necta Samba) that was bought using staff welfare funds at an ambulance station in England. I am the paramedic that runs it and I have an interest in programming and coding so I want to add the ability to pre-pay an account and then deduct purchases from the balance. Everything else is coded, working, and ready to go, but I need to know how much to deduct from the account! The profits from the machine go straight back to the staff welfare fund and I do all this for the fun of it (and the challenge).

Link to comment
Share on other sites

Thanks for the replies. I know there's not a lot of discussion about MDB here, but there's not many places online that talk about it so thought I would try here.

As it reliably reports the spiral each time, I may just go for the having a separate database option, but I'll carry on researching for now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...