How to Run Piscope on industrial Raspberry PLC | Step by Step
Learn how to run piscope on your Raspberry PLC and see the digital pin activity
21 December, 2021 by
How to Run Piscope on industrial Raspberry PLC | Step by Step
Boot & Work Corp. S.L., Fernandez Queralt Martinez

Introduction

waveform viewer is a software tool for viewing the signal levels of either a digital or analog circuit design. 

Piscope is a digital waveform viewer, or logic analyzer, for the industrial Raspberry Pi, therefore, for the Raspberry Pi PLC controller too.

In this blog post, we will be installing Piscope and we will check the pin activity from our programmable logic controller.

Latest Posts

Arduino Web Server Tutorial
Tutorial: Learn how to make an Arduino Web Server with your Ethernet Shield
How to connect Node-RED to Arduino-based PLC
Learn how to use Node-RED with Arduino based PLCs and this Arduino & Node-RED Tutorial
How to Open Logic Analyzer and Run RS485 with Raspberry PLC
Send data through RS485 from your Raspberry PLC and receive it in the Sales Logic Analyzer!

Pigpio

pigpio is a library written in the C programming language for Raspberry Pi automation, which allows control of the General Purpose Input Outputs (GPIO), and it works on all versions of the Pi.

The pigpio daemon offers a socket and pipe interface to the underlying C library. A C library and a Python module allow control of the GPIO via the pigpio daemon.

To see more features, please visit pigpio's website >

How to install pigpio

In order to install pigpio from your Raspberry Pi based PLC, do the following:

1. Check that you have Internet connection.

2. Update the package manager:

sudo apt update

3. Install pigpio

sudo apt install pigpio

Piscope

GTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs).

piscope is a logic analyser or digital waveform viewer, and a GTK+3 application that uses pigpio to provide raw GPIO level data. 

piscope may be run on a Pi or on any machine capable of compiling a GTK+3 application.

How to install piscope

In order to install piscope, please do the following:

wget abyz.me.uk/rpi/pigpio/piscope.tar
tar xvf piscope.tar
cd PISCOPE/
make hf
make install

How to run piscope

1. Run the pigpio-daemon and execute piscope.

sudo pigpiod
sudo piscope &

This is the window that will open, showing all the GPIO.

How to run piscope - How to Run Piscope on Raspberry PLC | Step by Step

Industrial Raspberry Pi PLC GPIO

Although all the inputs and outputs from the open source PLC Raspberry Pi go to an I2C chip, there are some that are not and go directly to the Raspberry Pi industrial PLC GPIO. These are the ones that we will be able to control, like:

Serigraphy - Raspberry GPIO - How to Run Piscope on Raspberry PLC | Step by Step
Raspberry GPIO - How to Run Piscope on Raspberry PLC | Step by Step

You can see more information about it in the Raspberry PLC datasheet and user guides, that you can download from the Raspberry PLC product page >

Testing

Now, choose the GPIO you want to test. In our case, we will force the value for the I0.0 input: gpio 13.

Change the input values by running:

echo 13 > /sys/class/gpio/export
echo out  /sys/class/gpio/gpio13/direction
echo 1 > /sys/class/gpio/gpio13/value
echo 0 > /sys/class/gpio/gpio13/value
echo 1 > /sys/class/gpio/gpio13/value
echo 0 > /sys/class/gpio/gpio13/value

Go to the piscope window, and monitor the GPIO from your Raspberry Pi PLC!

Testing - How to Run Piscope on Raspberry PLC | Step by Step
How to Run Piscope on industrial Raspberry PLC | Step by Step
Boot & Work Corp. S.L., Fernandez Queralt Martinez
21 December, 2021
Share this post
Archive

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>

Do you want more information?

Just fill the form!

Tell me more!