The demo covers a small automation achieved by a Cosino board equipped with a SoftPLC runtime system.

Once activated, the SoftPLC communicates with a couple of Z-Wave devices available on the market and with a IOs module which is connected with a RS485 serial communication interface with the MODBUS-RTU protocol.

The automation with Cosino consists of acquiring the status of a Z-Wave motion sensor and forwarding it to the IOs module through MODBUS protocol, which activates the buzzer and the lamp for the duration of activation of the sensor. In the opposite direction, the state of a button connected to the IOs module is acquired and forwarded to the Z-Wave switch, which turns on a fan. The duration of the fan activation, after pressing the button on the IOs module is extended to 10s by the SoftPLC.

softplc test bench

The SoftPLC programming system consists of a SW tool for your PC that allows you to edit a diagram in the IEC61131-3 FDB language, compile it the program and download it to Cosino.

The program runs every 2 seconds the following sequence:

  1. acquisiton of the status of the button, through the activation of a function block which reads from MODBUS protocol.
  2. acquisiton of the status of the motion detector, through the activation of a function block which reads from zWave protocol.
  3. processing of the aquired data
  4. sending the new status to the RIO for driving the buzzer and lamp, through the activation of a function block which writes to MODBUS RTU protocol.
  5. sending the new status to the Z-Wave bynary switch, through the activation of a function block which writes to Z-Wave protocol.

Any other protocol can be easily added in the future to the SoftPLC system in order to interface different sensors and actuators.

Facebooktwitterlinkedin
Project details
Like it?
More sharing options

A softplc runs on Cosino and interfaces different controller modules (Modbus, Z-Wave). The interpreter reads/writes protocol variables through dedicated FDB blocks.

Leave a Reply

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

+ 69 = 77