HTML5: Best viewed in Mozilla Firefox.

This page will be moved to a new location: DCIUX

Header image


Simple Raspberry Pi PLC.

Analog converter example.

Create and test an analog converter example.

Last modified: De Coninck Ivo

This guide will show you how to create and run an analog converter example on the Raspberry Pi board.

IMPORTANT! First read below!

First allow root login via SSH, so that more functions of the ladder diagram editor are available.
Copy the public key pair from the client machine to the Raspberry Pi board.
sudo scp ~/.ssh/ root@

Download the necessary software for the Gnublin board, and place them into directory: '/root/plux'.
cd /root
mkdir plux
cd plux
unzip -d ./

ADC Ladder Diagram.

Last modified:

ADC ladder diagram example.

rpi.ladder.adc.png rpi.ladder.adc.png
Test a ladder diagram
Fig1. - Analog converter ladder diagram.

Create a ladder diagram like the example.

In the first network (0) output 0.0 is set to true if the value of analog input 0 is greater than 30.
For the next network (1) output 0.1 is set to true if the value of analog input 0 is greater than 60.
For network 2 output 0.2 is set to true if the value of analog input 0 is greater than 90, etc.

Download the ladder diagram: adc.dg.


Save, Build and Download Ladder Diagram.

Last modified:

Save and Build the Ladder Diagram.
Fig2. - Build ADC Ladder Diagram.

Download Ladder Diagram to RPi.

Fig3. - Download Ladder Diagram.

Download configuration panel.

Fig4. - Download configuration.
  1. Local User Name: The login name for the local machine.
  2. Local Password: The local user password.
  3. Local IP-address: The local machine's addres.
  4. PLµX User Name: root login for the embedded linux machine (Raspberry Pi).
  5. PLµX Password: Not needed (textfield not enabled).
  6. PLµX IP-address: IP address on the embedded linux machine(Raspberry Pi).

Download of file 'adc.dg' succeeded.

Fig5. - Download succeed.


Start/stop the plµx software on the Raspberry Pi board.

Last modified: De Coninck Ivo

Using the ladder diagram editor. Works only under Linux using SSH!
On the toolbar click the Start button, or Click on Start in the PLC menu.
Fig6. - Run the Raspberry Pi PLC.

This menu entry brings up a dialog box, which allows the user to set username, pasword en ip-address for the local machine en the embedded linux machine.
Fig7. - Run Configuratieon window.

PluwRun succeeded.
PLuX is running on the Raspberry Pi board.
Now you see all the connected devices:

  1. I2C module PCA9555 with 8 Digital Inputs and 8 Digital Outputs.
  2. I2C module ADS7830 with 8 Analog Input.
Fig8. - Run succeeded.


Analog converter example in action.

Last modified: De Coninck Ivo

Best viewed in Mozilla Firefox.


< Previous

Leave a Message.