Arduino PLC?

Hello everyone,

Im a newb at this language so I am having difficulties getting typical plc functions coded for my arduino.

I need things like latch/unlatch, one shot etc.

Counters and timers I get, but not latching counters.

One example: I want to capture the input after it goes high, then isolate it from further input changes, allow several operations to occur through out the program before unlatching.

Anyway cutting to the chase, I have scoured the forum looking for copy paste functions or a header file that I can add?

I cant imagine this does not exist somewhere in world, and have that nagging feeling I am reinventing the wheel by writing these from scratch?

I know there are some libraries that will probably provide what you want. A quick search gave this one:

I can't say whether that is the best option. I would suggest doing a bit of searching to compare the various options. You can try the keyword "ladder logic" in your search instead of "PLC".

The forum is a good place to get information, but it's not ever where I go to look for code. The best place to find code is GitHub. When I'm looking for Arduino code, I will often restrict my searches to the github domain simply because often the non-GitHub results end up being a bunch of noise. It's not to say that there is no good code outside of GitHub, but in a search where I am already getting tons of results it's worth narrowing it down. In a search where I am getting few results, I would not restrict it to GitHub and would actually take the time to see if I can dig something worthwhile out of the non-GitHub results.

The PLC/Arduino does come up in the forums, but very infrequently, so I don't expect that there are many knowledgeable folks here and even fewer who regularly answer questions.

If library issues become too burdensome, consider learning how to code in the subset of C++ you need to program the Arduino - it'll be much easier to get help.

Possibly of use: soapbox-snap-arduino-tutorial/

Sweet!

Thanks everyone, and of course after asking the dumb question I stumbled across this! Posting it for anyone else interested.

https://forum.arduino.cc/index.php?topic=333433.0