Ignition and Raspberry Pi GPIO

Hello all,

With Maker Edition out, I finally decided to play with the Pi and Ignition. The first thing I thought of was to do a small test and try a button to light up an LED with the built-in GPIO. Not so easy.
First, I tried to import the gpiozero library to use it from Ignition’s python (jython). I found several issues and got discouraged.
Then I thought of using a socket server/client communication scheme. This went better, but I had some issues too.
Now, before I go with all the details, logs, code and so on, I would like to ask the question: is anybody else doing something like this? Have you been successful with any of the methods above? Or is there a better way I am unaware of?

Thanks,
Tana

1 Like

The easiest would probably be to install an OPC UA server on the RPi. And connect to that server with Ignition.

See this article as example: https://www.kalycito.com/running-opcua-on-raspberry-pi/ (you don’t need to install a client, Ignition will be the client)

Thank you for your answer! I have been toying with this for a few minutes now. It looks really interesting, but it is not quite what I was looking for. Firstly, I don’t really need a full-fledged OPC-UA server for what I want to try. Secondly, by what I can see, it requires a touch of C programming (which I haven’t touched in 20 years!). It is definitely a possibility, though.

The alternative is making a driver module using a Java GPIO library (like PI4J).

That driver could then provide the pins as tags.

If you want to stick to scripting, you could include a Java library in Ignition, and call to that. see Adding java custom classes to Ignition . Or you could use OS calls to shell program that can communicate with the GPIO.