Hi
what is the best way to access GPIO on Raspberry PI in ignition?
Is it possible to access it by python script directly in ignition?
Thanks.
Hi
what is the best way to access GPIO on Raspberry PI in ignition?
Is it possible to access it by python script directly in ignition?
Thanks.
I think the GPIO are accessible at files under /sys/class/gpio
but it’s been a while. You’ll need root access though.
The best way would be a custom module.
Another option to consider would be using Codesys for Raspberry Pi
Codesys is costly for this.
One man’s costly is another man’s robust. I only give options. What you do with the information is completely up to you.
I also use node red and the MQTT modules. But as with codesys there will be a cost.
What are you doing with the IO pins, is it local? Would it be a safety issue? Another (depending on what you are switching) is the SQL modules in node red. You could write to a database and monitor it on both ends. As with any remote IO you will need some kind of life bit monitoring to make sure you have coms for safety reasons. But that could also be done through the data base. That would be a free solution.
Damean,
How have you done your MQTT flow setup to send all 4 values in one message ?
I use separate messages for each of my values as they appear as separate tags in the designer.
Here is a copy of my flow for the pi. On a lxc container i have my mqtt server and my mqtt2opc bridge by nz farmer. GitHub - nzfarmer1/mqtt2opcua: MQTT to OPCUA protocol converter/gateway
It took me a bit to work out best practices but i ended up defining a handler to handle a topic pi/#. after that any pi i need to read the topic begins with pi/oven or pi/ cooling tower. Honestly i was able to combine a pi, analog and digital widgetlord boards into a light weight mqtt plc. Its like franks red hot now " i put this * on everything"
reactor_flow.txt (34.5 KB)