Home

BG_Automation
There is a newer version of this page. You can find it here.

Project Members:

Background

I purchased this Relay PI-Plate and it works very well using python. I though i could expand its uses with codesys and make my own driver. I emailed the support and asked for a C library or if they would explain more about how the driver works. They said no, they would not help. The python libaray was the only thing they would supply, but I was welcome to develop my own library based on their python library. I read how to develop a SPI bus device driver on the forge and though I would give it a shot. Below is what I discovered so far.

My main goal would be to add a device under the SPI bus master and map each relay to a boolean value. Also the relay. I would like to get also poll all the board information and map that to a variable.

Product Data
https://pi-plates.com/relayr1/

User Guide
https://pi-plates.com/relayplate-users-guide/

Command Reference
https://pi-plates.com/downloads/RELAYplateQuickReferenceGuide.pdf

Data

Relay Plate Address
Relay Number
Relay State

Relay Functions
Turn Relay On
Turn Relay Off
Toggle Relay
Relay All (Byte)
Return Relay State

LED Functions
Set LED
Clear LED
Toggle LED

System Functions
Get Firmware Version
Reset

Address Range of boards 0 to 7
Relay Range 1 to 7