Everyone wants digital – we do analog!

We have the analog module AIO on our Revolution Pi!

piCtory configuration

Of course, we first have to insert the module in our piCtory configuration.

But that’s not all! In the analog module we have many configuration parameters in piCtory (in the Value Editor under MEM), which we MUST adapt to our needs. These determine the behavior of the AIO.

Connection plan

Temperature with PT 100

Let’s start with a simple PT100 to measure the temperature. The AIO gives us two inputs – we use RTD1 on pin 10, 12, 14, 16.

In piCtory we now have to set, save and restart the driver for the MEMs for our 4-wire PT100:

Let’s connect our PT100 to the AIO module.

When we sign in to our RevPi via SSH, Python3 with RevPiModIO lets us easily read the value:

pi@RevPi0000:~ $ python3

>>> import revpimodio2
>>> rpi = revpimodio2.RevPiModIO(autorefresh=True)
>>> rpi.io.RTDValue_1.value

We have a pleasant room temperature of 28.3 ° C on our power supply (here is finally summer).

Use analog outputs

Next, let’s look at the analog outputs. For our tests, we configure the value range for the first output in piCtory of -10 V – 10 V. Save the changes and reset the driver.

At pins 3 and 5, we measure the voltage with our multimeter.

Again, we sign in to our Revolution Pi via SSH and use the interactive Python shell:

pi@RevPi2191:~ $ python3

>>> import revpimodio2
>>> rpi = revpimodio2.RevPiModIO(autorefresh=True)

>>> # Read current value (should be 0)
>>> rpi.io.OutputValue_1.value
>>> # Set new value (5 Volt)
>>> rpi.io.OutputValue_1.value = 5000

>>> # Or -5 Volt
>>> rpi.io.OutputValue_1.value = -5000

Alternatively for testing: RevPiPyPLC

Of course we can do our tests graphically from a network computer via RevPiPyControl. Here we can monitor our values or set the outputs.

What’s next?

Of course you have to think carefully about the configuration, what you want to do. There are many MEM configuration parameters to control the behavior.

You can easily control a frequency converter and things like that.