5

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?

Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
  • 2
    What 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 Answers1

3

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.

Clifford
  • 88,407
  • 13
  • 85
  • 165
jeb
  • 78,592
  • 17
  • 171
  • 225