Doubt on IF statement

Hello Arduino fans :slight_smile:

I'm ladder programmer and I'm studingy more about arduino and C.

I have done Ladder as below on CLP, but I would like to do on arduino.

I tried to do using IF conditions but when I release the button my K1 coil turn OFF.

How can I do a Interlocking on C ?

Thanks

I tried to do using IF conditions but when I release the button my K1 coil turn OFF.

Where is your code? Where is your schematic that shows how you sewed the button on? Why didn't you use a switch?

juliodv:
I tried to do using IF conditions but when I release the button my K1 coil turn OFF.

My guess is you used if .. else and that else turn off coil. Of course that guess is because there is no code in your post.