Mariano Herrero
Hello, I've prepared a very simple program to test its operation.
The program consists of two input variables, connected to pushbuttons, which set and reset a variable used for the output, connected to an LED.
The program compiles and is sent to the Arduino without errors.
The program works fine: one pushbutton turns on the LED and the other turns it off.
Once on, the LED turns off after a few seconds, the pushbuttons stop working, and the LED turns back on after a few seconds. The pushbuttons are working again.
Any suggestions?
Thanks for your help.
Reply 0 0
thiagoralves
Most likely your button wiring is wrong.
Reply 0 0
Mariano Herrero
hi again
I've checked the wiring and everything seems fine. Initially, everything works correctly. I think the inputs are very sensitive to interference: when I touch them with my fingers, they read a high level, acting on the outputs.
I've tried using the "Live debug remote PLC" option to read the status of the inputs and outputs, but I haven't been able to. At the end, I get the message "Error connecting to target board. Make sure your board is running OpenPLC Runtime with debug enabled, and that your connection settings match your board parameters."
Thanks for your help.
 


Reply 0 0
Mariano Herrero
It was definitely an electromagnetic interference problem. I fixed it by using pull-down resistors on the inputs, and the circuit is stable now.
Any suggestions regarding the error with the Live debug?
Thanks
Reply 0 0
thiagoralves
Inputs need pull down or pull up, otherwise they float. Without them, when the button is not pressed, there is nothing connected to the input.
 
On the debugger, you need to enable Modbus (either RTU or TCP) in order to be able to use it.
Reply 0 0
Reply