PiBridge – How communication between Revolution Pi modules works

PiBridge Banner

You’ve already heard this name in nearly all of our previous blog posts: PiBridge. But what exactly is it and how does this back-plane bus work? Here is the short version:

  • A 20 pin system connector works as bus coupler for stackable modules
  • A maximum of 10 modules + RevPi Core can be coupled
  • A maximum of 2 RevPi Gate modules can be used in a system
  • 4 signal lines are used for controlling automatic initial module and position detection
  • 2 signal lines are used for high speed RS485 communication
  • 8 signal lines are used for discrete bidirectional 100 Mbps Ethernet channels right and left of RevPi Core
  • Default cycle time for communication over Ethernet channels between RevPi Core and Gate is 5 ms for reading 512 byte data and writing 512 byte data
  • Cycle time for communication over RS485 channel between RevPi Core and 3 RevPi DIO (3 x 14 inputs and 3 x 14 outputs plus status data per channel) is under 10 ms

Startup phase

During startup of the system or restart of PiBridge all modules are in a “waiting for configuration” state. Only the module mounted directly right of RevPi Core does react to RS485 communication. It does exchange status data with PiControl driver running on the Core. PiCon detects the module type and compares it to the type registered in a configuration file (you need to generate this file using PiCtory, our graphical configuration editor). In case of consistency the module gets its specific configuration data including the module address. As soon as a module has completed detection and configuration it does enable its neighbor module on the same side of RevPi Core for RS485 communication. When all right side modules have been detected and configured RevPi Core continues with enabling the left side modules for detection and configuration via RS485. When all modules are detected and configured the two left- and rightmost modules do enable their bus termination and high speed cyclic RS485 data exchange will start.

Any mismatch between the detected configuration and the one found in the configuration file will force PiControl into error state indicated by LED signals.

PiBridge Pin Configuration

Cyclic data exchange on Ethernet channels

PiBridge’s Ethernet channels actually are exclusively used for RevPi Gate modules. Each of the channels can exchange up to 512 byte of input and 512 byte of output data per cycle between RevPi Core and RevPi Gate. Our IO-modules are not connected to these channels but simply loop the signals through the connector to their neighbor modules. There are independent Ethernet channels respectively for modules on the right and the left side of RevPi Core. So, on each side you can mount one RevPi Gate module.
Future extension modules which will use these Ethernet channels and their high bandwidth may do so by connecting to one of the channels using a built-in Ethernet switch. This way more than one module per side using Ethernet channels may be installed in a Revolution Pi system.

RevPi Gate modules do not have a built-in switch function and therefore (and because of their fixed bus termination on the RS485 channel) need to be mounted in outmost left or right positions.

Cyclic data exchange on RS485 channel

During startup this channel is used for status and configuration data exchange. In this phase the modules at the start and end position of the RS485 line are not yet known and therefore bus termination is switched off an all modules (except Gate modules) and data exchange rate is reduced. After all modules have been detected and configured the outmost left and right modules get a command to switch on their bus termination. Finally all modules switch their data transfer rate to high speed (115,200 bps) and start cyclical data exchange of process data. This data exchange uses a propriety protocol optimized for small amounts of data per telegram. For the experts of you: we have drastically increased the rate of payload per telegram length by cutting down protocol overhead

Leave a Reply

Your email address will not be published. Required fields are marked *