Page 1 of 1

Write control commands to devices

Posted: 09 Mar 2017, 17:32
by pvoosten
We are trying to find a solution to use a single protocol (like MQTT) for high-level, centralised automation. To achieve that, we need devices that talk MQTT on one end and that can talk to the industrial control systems, sensors, ... on the other end.

The fieldbus communication devices that can be attached to the RevPi Core are all slaves. Does that mean that they can only be used to listen on the fieldbuses, not to send commands to PLCs or other devices on the industrial network? The latter would also be necessary for our purposes.

Re: Write control commands to devices

Posted: 09 Mar 2017, 17:54
by volker
Hi,
good question! Maybe it's a good idea to explain some basics in fieldbus vocabulary to clarify this:
A Slave or master role in fieldbus has nothing to do with the ability of listening or sending data. This roles just describe who is initiating and controlling the communication on a bus.
Typically this is a PLC with naturally the master role. Only this master device can configure slaves, initiate cyclical or a-cyclical communication and handling any kind of "diagnosis" of the slaves.
Slave devices are doing the work for the master. They are normally Sensors or Actuators. A master tells them to send a sensor value and they are answering with the value. or a master is telling them to turn an axis and they are doing that motion. So the information is in all these cases always a bi-directional one. The master is saying something and the slave is answering. The slave normally can't just start communicating. Depending on the fieldbus type there are different techniques for a slave to "call" a master in case of any urgent message which needs to be sent to the master. E.g. in Profibus there is a certain bit in the cyclical answer of the slave to the cyclical polling initiated from the master, which is telling the master to request an a-cyclical diagnosis from a slave.
So basically fieldbus communication is mostly a cyclical polling of data from the slave or pushing of data to the slave done by the master.
And yes, using a slave gateway you could easily send data to any PLC which has been derived from a MQTT Broker. And you could also read data from the PLC and send it to an MQTT Broker. This will of course always involve PLC programming because the PLC needs to be set up to poll or to push data from the slave. Without PLC knowledge this is a hard work. E.g. the TIA programming tool is a highly sophisticated non self-explaining windows application which will drive you crazy if you're not an expert in handling it. PLC is a world of its own and fieldbusses too are. A gateway device will not reduce the efforts needed to program the PLC and to understand this different world.