Fransu Viljoen
Good day
 
I am running OpenPLC on a Raspberry Pi 5.
I'm using it to control a small conveyor system.
All my sensors are connected to a Input module, and I'm reading the inputs with Modbus into OpenPLC.
I have a relay hat on the GPIO pins, and I switch the relay to give the run command for my motor drives.
The issue that I have is that the when the coil in OpenPLC is off, the coil of the relay is on.
So I had to connect the motor on the NC contact of the relay, and keep it energized with OpenPLC
So when the raspberri Pi looses power, the relays goes off, and the motors start up.
 
I think the issue is with the wiringPi thats installed.
Are there a way to fix this.
 
Thanks you
Reply 0 0
thiagoralves
The HAT you are using uses inverted logic. This is quite common with some relay boards for Raspberry Pi and Arduino boards. You can check with your HAT manufacturer if there is a way to use non-inverted logic (some provide a jumper for that). If there isn't a way to revert it, then you will have to use negated coils in your entire program to invert the logic in software.
Reply 0 0
Fransu Viljoen
Hi Thiago
Thank you for your reply. It helped me alot.
I decided to rather use a input and output module with a TCP interface. So I'm using the modbus function in OpenPCL to activate a contact in the output module, that start the motor.
Reply 1 0
Reply