J.A.du Toit said:
Hi Guys,
Thanks a million for all your replies, I was away on Holiday the past week. That's the reason why I didn't post any comments.
The idea behind this exercise was that, if the protocol needed a bit of "hammering", a PIC-Microchip (much cheaper) could be programmed to act as a translator/blacksmith.
In principle, you could try this but...
1. The MPI bus is sort of Profibus.
2. Siemens and other vendors MPI adapters can connect to Profibus also.
3. When you connect an MPI Adapter to MPI/Profibus it does nothing
4. It gets commends from the RS232 side
5. The first commands tell the Adapter to participate in MPI/Profibus Token Ring Network
6. From the moment the adapter is in this network, it continues to communicate actively on the MPI/Profibus side to do at least the token passing.
7. The adapter gets some message from the RS232 side
8. It puts this message on MPI/Profibus when it is it's turn to speak.
9. It gets an answer from another MPI/Profibus participant (usually the PLC) and gives it back on RS232 side
10. If you want to do this with a microcontroller, you must implement a lot of the Profibus specifications. Profibus timing constraints are not easy to meet and Profibus speed goes up to 12MBaud. All adapters I know of use Profibus ASICs (special chips) for Profibus communication. While it might be quite possible to implement 187.5 kBaud Profibus communication with an average uC, you never know whether it is 100% Profibus compliant. So it may make a good programming adapter, but become very dangerous if somebody connects it to Profibus and real machinery is involved.
11. The data on RS232 side of MPI adapters is encapsulated by 3964R (older) or another (newer) transport protocol.
12 As far as I know, this same RS232 communication goes over VIPA's "green cable" and so do look the byte sequences you posted here.