mercunium Posted April 2, 2023 Share Posted April 2, 2023 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 More sharing options...
AZVendor Posted April 3, 2023 Share Posted April 3, 2023 We don't do programming here. Link to comment Share on other sites More sharing options...
Vendo Mike Posted April 3, 2023 Share Posted April 3, 2023 AZ is right, we're not writing code here. To me, it sounds like your having it access an incorrect ram location somehow. That 80p value has to be stored somewhere for it to be recovered and displayed. Link to comment Share on other sites More sharing options...
mercunium Posted April 3, 2023 Author Share Posted April 3, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now