Zahid
Hi...i got a problem where when start the plc i can only read input and there's no output..runtime install on rpi..i already verify arduino wiring averything correct even arduino address correct..

Button =%IX100.0 
LED = %QX100.0

Simple program where button pressed then LED will on..
Reply 0 0
thiagoralves
Can you expand more on this? How can you be so sure that output is not being activated, instead of being an input problem? How is your slave devices configuration? How is your wiring? What happens if you upload a program that toggles output independently of any input?
Reply 0 0
Zahid
image3.png this is my ladder, LED 2 set to built in led and LED1 wired to pin 2 arduino uno. Also button wired to pin 7 and resistor pull to ground.



IMAGE2.png here screenshot in monitoring. as u can see it can show input when button pressed but led not light up.
Reply 0 0
Zahid
Optimizing ST program...
Generating C files...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Moving Files...
Compiling for Raspberry Pi
Generating object files...
Generating glueVars...
varName: __IX100_0 varType: BOOL
varName: __QX100_0 varType: BOOL
varName: __QX100_3 varType: BOOL
Compiling main program...
hardware_layer.cpp:31:10: fatal error: wiringPi.h: No such file or directory
#include <wiringPi.h>
^~~~~~~~~~~~
compilation terminated.
Error compiling C files
Compilation finished with errors!

just now i notice got error while compiling
Reply 0 0
thiagoralves
You need to install wiringpi on your raspberry pi, otherwise OpenPLC won’t be able to control you Pi’s gpio pins. Since you’re using only slave devices for IO, you can just change the hardware layer to blank Linux instead and you will be fine
Reply 0 0
Reply