tcl799
I am trying to find out how to create a scenario  where I can switch on a circuit and power up a coil then intermittently switch the coil on and off every x number of seconds.

I tried using a pulse timer but that is a one time event, is there anything I can look at that will help me understand how to create looping effects in OpenPLC?
thiagoralves
https://openplc.discussion.community/post/light-timet-10425366?pid=1310737847
Reply 0 0
tcl799

So I took a look at that and for some reason I am unable to get the desired effect:

Please be patient I am new to OpenPLC

 
Reply 0 0
thiagoralves
You gotta use the same variable in the contact and in the coil. If you use different variables (you’re using “Input” and “Output”) you won’t have an oscillator.
Reply 0 0
AlexisBerci
Thank you so much. I was able to use this for my school work. I added another rung for the output.
|----------|input|--------|oscillator|--------(output)------|
Reply 0 0
Homeprototyping
I tried this but it seems to lockup my program at first it works fine but after a few minutes every thing freezes way?
Reply 0 0
thiagoralves
Check your circuit. If stop goes false even for one cycle, the oscillator will stop.
Reply 0 0
Homeprototyping
Check your circuit. If stop goes false even for one cycle, the oscillator will stop.
I dit check its seems ok when i remove the timers everything works fine ill try to upload a video of my project.
Reply 0 0
Homeprototyping
I dit check its seems ok when i remove the timers everything works fine ill try to upload a video of my project.
Sorry for the poor quality i had to put it in gif format. You can see when i start the first time it runs no problem but the second time it freezes up.
Reply 0 0
thiagoralves
This is really odd, from your program’s screenshot it should work just fine. I don’t know if there are other things defined in your program that is messing things up, but it seems like you have faulty hardware or something like that. Try using a different board with minimal circuitry first and check if that works
Reply 1 0
christorheeder.sa
This is really odd, from your program’s screenshot it should work just fine. I don’t know if there are other things defined in your program that is messing things up, but it seems like you have faulty hardware or something like that. Try using a different board with minimal circuitry first and check if that works
I did as you said and everything works fine is it posable that the coil of my 220v ac contactor can create electro magnetic interference if mounted to close to my plc wiring?
Reply 0 0
christorheeder.sa
I did as you said and everything works fine is it posable that the coil of my 220v ac contactor can create electro magnetic interference if mounted to close to my plc wiring?
20250309_075644.jpg
Reply 0 0
thiagoralves
I did as you said and everything works fine is it posable that the coil of my 220v ac contactor can create electro magnetic interference if mounted to close to my plc wiring?
Absolutely. That’s why people use PLCs in industrial settings. Bare-bones Arduinos can’t withstand the noise and electromagnetic interference these environments have.
 
For a more budget-friendly device, you can try P1AM from Automation Direct. They are very much noise resistant, Arduino-compatible and work with OpenPLC.
Reply 0 0
christorheeder.sa
Absolutely. That’s why people use PLCs in industrial settings. Bare-bones Arduinos can’t withstand the noise and electromagnetic interference these environments have.
 
For a more budget-friendly device, you can try P1AM from Automation Direct. They are very much noise resistant, Arduino-compatible and work with OpenPLC.
I do have an arduino opta sure that will also work?
Reply 0 0
thiagoralves
Possibly. Better than a bare-bones Arduino board for sure
Reply 0 0
Reply