HTML5: Best viewed in Mozilla Firefox.

This page will be moved to a new location: DCIUX

Header image

RPIsPLC.

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/id_rsa.pub root@192.168.1.222:~/.ssh/authorized_keys

Download the necessary software for the Gnublin board, and place them into directory: '/root/plux'.
Or:
cd /root
mkdir plux
cd plux
wget http://dcisite.be/download/plux.embedded.zip
unzip plux.embedded.zip -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.

Top

Save, Build and Download Ladder Diagram.

Last modified:

Save and Build the Ladder Diagram.

editor.build.png
Fig2. - Build ADC Ladder Diagram.

Download Ladder Diagram to RPi.

editor.download1.png
Fig3. - Download Ladder Diagram.

Download configuration panel.

editor.download2.png
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.

editor.donwload.oke.png
Fig5. - Download succeed.

Top

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.

editor.adc.run.png
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.

editor.adc.run.config.png
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.
editor.adc.run.oke.png
Fig8. - Run succeeded.

Top

Analog converter example in action.

Last modified: De Coninck Ivo

Best viewed in Mozilla Firefox.


Top

< Previous

Leave a Message.