syldesj
I did my first Ladder program with OpenPLC with the runtime in a Raspberry Pi 3.  

This first project https://www.openplcproject.com/reference-your-first-project worked perfectly using the %IX0.0 and %IX0.1 as in the example.  I inverted the inputs in the PLC program as proposed. 

However, I tried to used %IX0.2 ans %IX0.3 instead of %IX0.0 and %IX0.1 so I don't have to invert the inputs but it doesn't work.  Pressing the buttons do nothing.

I'm I missing something?
Quote 0 0
thiagoralves
There are a couple of things to check. First, check your circuits, make sure you’ve added the proper pull ups or pull downs depending on your wiring. Check the monitoring page to make sure that when you press the button, it is being registered at the monitoring page as well. If the input is shown in there, but still nothing is happening, then you have a problem with your ladder logic or your output circuitry. Finally, make sure no other program or configuration (like UART, SPI, etc) isn’t interfering with your Pi pins. It is always recommended to install OpenPLC on a fresh Raspbian image to avoid conflicts.
Quote 0 0
syldesj
Thanks for the reply.

My circuit is exactly the same as when I use IX0.0 and IX0.1.  If just connect the wires to IX0.2 and IX0.3 instead.  And I load my new program that is using IX0.2 and IX0.3.  This is a fresh raspbian installation that I did only for this.  It's like if the only pins that are working are GPIO2 (IX0.0), GPIO3 (IX0.1), GPIO14 (QX0.0) and GPIO15 (QX0.1).  Is there something that you know that I should do that have the other pins working?

Thanks
Quote 0 0
thiagoralves
%IX0.0 and %IX0.1 on the Pi have internal pull ups, and therefore are active in low, while %IX0.2 and %IX0.3 do not have pull ups and are active high. So yes, you will have to change your circuitry for it to work.
Quote 0 0
syldesj
I just realised that this morning!

I connected the 2 buttons to the 3.3v instead of the ground and it works perfectly.

Thanks a lot
Quote 0 0