nishizu
Hello, im trying to use openplc with an old raspberry pi b, but it is not working as expected.

I created a simple project, with just a button ( connected to %IX0.5 and ground) and a led (+ terminal connected to %QX0.4 and - terminal connected to ground). When i press the button the led should light up  but it doesnt.

The log seems fine:

OpenPLC Runtime starting...
Interactive Server: Listening on port 43628
Skipping configuration of Slave Devices (mbconfig.cfg file not found)
Issued start_modbus() command to start on port: 502
Modbus Server: Listening on port 502
Modbus Server: waiting for new client...
Issued start_dnp3() command to start on port: 20000
DNP3 ID manager: Starting thread (0)
DNP3 ID DNP3_Server: Listening on: 0.0.0.0:20000


here is the program:
Inkedopenplc.jpg   
Can someone help me understand what i'm doing wrong? Thanks a lot in advance.
Quote 0 0
thiagoralves
It is very likely that your problem is related to pin mapping. It wasn't me who wrote the old Pi driver and I don't have an old Raspberry Pi to test, but just for comparison, here is the mapping for the current Pi driver (in wiringPi pin number):

inputs = { 8, 9, 7, 0, 2, 3, 12, 13, 14, 21, 22, 23, 24, 25 }
outputs = { 15, 16, 4, 5, 6, 10, 11, 26, 27, 28, 29 }

And here is what is in the old Pi driver:

inputs = { 7, 0, 2, 3, 12, 13, 14 };
outputs = { 4, 5, 6, 10, 11 };
Quote 0 0