shanrei
I tried to implement a ladder diagram using the PLCOpen Editor as in the figure below:
PLOpen Editor.jpg 

After generating the ST file, I then uploaded the program to the Arduino. After uploading the program and wiring the buttons as input and a LED at the output of my Arduino, I expected a start-stop behavior. What I got instead was the LED turning on momentarily and then turning off right after when I push "button". It seems like "button1" doesn't do anything at all. Am I doing this wrong or is there something else I need to include in this diagram?
Quote 0 0
thiagoralves
You are doing it wrong. The lamp should be in parallel with button, not button1. When you release button, the circuit opens therefore turning lamp off. If lamp is in parallel with button, when you release it, the circuit will remain closed by lamp.
Quote 3 0
shanrei
Thank you very much!
Quote 0 0