Not that I can find any by googling, but ... does anyone know of any open source code/development frameworks/test software/etc for the Multidrop Bus commonly used in vending machines?
-
2What is your platform? A pure mcu or something like Windows/Linux? Which language do you want to use? Do you have to connect more than one device? – jeb Nov 23 '11 at 20:27
-
I went with an Atmel UC3 since it could handle 9-bit serial port data. I coded in C, with no operating system (I started with FreeRTOS, then realized that none was needed). – Mawg says reinstate Monica Aug 24 '15 at 07:24
-
If you like to program with Delphi in Windows, the this might be useful https://github.com/coassoftwaresystems/delphi-modbus – Mawg says reinstate Monica Aug 24 '15 at 15:14
1 Answers
In my opinion there isn't a free framework for the MDB, as this bus is only used by profit oriented companies and nobody would make his own code open source (me too).
But the MDB protocol itself isn't very complex, it's the error handling for the several devices that is a bit complicated, as it should be 100% safe.
And today it can be tricky to implement the 9bit serial layer, as this isn't standard, even many MCUs didn't support it any more.
Edit: How I would implement it today
Regard all specification, especially the timings/timeout (ex. NAK-Timeout of 5ms).
I would use state machines to collect the configuration data, setting the normal mode of operation, set settings and all other things.
In the first step(not later) plan to build at any state an error handling, what should happen if the communication get lost, or you got an unexpected answer?
I would also implement logging much as possible, as sometimes there will money get lost and you have to explain why.
-
+1 Thanks. Any other info, or tips or URLs? It sounds like you know about it – Mawg says reinstate Monica Nov 23 '11 at 00:12
-
Hey, Jeb, look at this - http://eliverse.com/content/vendiverse/ what do you think? – Mawg says reinstate Monica Oct 22 '17 at 12:18
-
-
But, interestingly, there is a USB <--> MDB adaptor & an MDB Hat for Raspberry Pi – Mawg says reinstate Monica May 14 '19 at 05:25