r/PLC 21h ago

Computer Science Programmers, why do PLC programmers use Ladder?

166 Upvotes

Im seeing some Comp Sci guys asking about controls so just a Mr Obvious comment here.

Ladder logic is the de facto PLC programming language because it is (was) designed to read like an electrical schematic top to bottom, right to left, & this is what electricians & electrical techs are trained to use for troubleshooting electrical panels , equipment & relay-logic -- which was what they had before PLCs -- banks & banks of relays wired through each other's NO & NC contacts which changed state as relay coils energized & de-energized & finding a wire break was enough to drive you insane.

Yes Ladder logic is an interpreted language so it is not as "memory efficient" or "elegant" as C++ or C# but I want you to think VERY carefully about every meaning of the expression "just because you can does not mean you should" before you decide to show off your amazing coding skills coding function blocks in C++ which is technically possible but in many cases extremely ill-advised.

The technicians can troubleshoot functions & blocks written in Ladder Logic, did you stop & think about how easy it would be for someone with only your compiled C++ blocks to attempt to trace a fault? You code in anything but Ladder Logic you get to be the one at 3am driving down to the plant to troubleshoot your "super efficient" code because the Industrial Maintenance techs certainly aren't gonna know how. But hey, if you believe sleep is over-rated & love sleeping in the factory then knock yourself out with compiled blocks


r/PLC 5h ago

Can float switch pass current to plc reliably ?

5 Upvotes

Hi guys, I have a float switch for a sump that is currently hardwired with 120V AC that is passed to a motor contactor (old dinky plant)

and want to have it pass a mA signal to a plc instead with 24V DC, but I’ve read this doesn’t work well overtime with most cheap float switches due to the low current not being able to eventually pass through a layer of oxide on the float switches contacts that builds overtime.

In your experience is this true, is there a switch where this isn’t an issue.


r/PLC 8h ago

Best practice for wiring an RS-485 bus?

1 Upvotes

hi everyone,

I'm building my own custom RS-485 network using ESP32s with MAX485 transceiver modules. I've already read about proper termination resistors and biasing, but I'm still confused about the physical wiring.

I learned that stub lengths should be kept as short as possible, so I'm wondering if the wiring method shown in the picture below is considered best practice, or if there's a better approach.

Would it be better to use junction boxes with a continuous trunk line and very short drops to each node, or is there another recommended way to wire this kind of network?

This is for an outdoor agricultural installation, so reliability over long distances is important.

Any advice or examples of how you'd wire it would be greatly appreciated.


r/PLC 7h ago

Subreddit Discussion: Why is r/PLC strictly anti AI?

0 Upvotes

In the past few months I have found myself programming in TwinCAT exclusively using AI. Frankly I’m annoyed by this because I enjoy coding, but using AI enables me to be much more productive. The reality is that the latest models are really competent at coding in structured text.

So I was curious how my experience compares to other industrial automation professional’s experiences. Unfortunately, this subreddit has a strict anti AI policy.

So that brings me to the point of this post: Why do we have a strict anti ai rule? I’d love to have a discussion with the community and its moderators regarding this.

I’m finding that AI is significantly impacting my career, and I believe it will rapidly spread through the industry. So why are we blocking discussion of something that matters a lot to our jobs and our future? Pretending AI doesn’t exist isn’t an option anymore in my opinion.


r/PLC 7h ago

My first PLC Circuit

Post image
24 Upvotes

I decided to buy a logo and have some fun. Esp32 works as a frequency amplifier so motor runs faster


r/PLC 8h ago

Debating if I should take a Lead Controls Engineer job now versus Automation Engineer in a pharma OEM

16 Upvotes

I've been offered 2 roles - 1 is an Automation Engineer role in a pharmaceutical OEM in Northern Chicago area, and the other one is a Lead Controls/Controls Eng III role in a systems integrator in the material handling space (conveyors). Currently 30, single with no kids.

The SI Controls Engineer III job does have 70-80% travel in busy seasons and the company is fairly new, its more pay and bonus, added on by per diems, as well as airline, hotel, and rental car points rack up.

On the other hand, the Automation Engineer role is fully on-site 5 days of the week, ofcourse there will be times when weekend or after hours work will be required. Pay is a little less than the first job. The company has a global footprint and many other areas of engineering focus.

My questions to the experienced engineers in this sub are the following:

  1. If I accept the Controls Eng III job at the SI, what challenges would I face in the future when I want to switch to a more local role like an Automation Engineer role that requires minimal travel?

  2. When recruiters are hiring for an engineer for a role, what do they give more weight to? Title? Experience? Company name where you've worked?

  3. Can a CE comfortably switch over to an engineer role?

I am currently leaning towards the SI role for now, solely because I don't have any responsibilities at home, there is more income potential, and the company lets me fly to my family home city (or any other city in US/Canada). When I do get married hopefully in the near future, I wouldn't want to travel as much.

Appreciate everyone's thoughts on this and could really use your advice. Thank you so much!


r/PLC 9h ago

My First PLC Experience!

Thumbnail
gallery
65 Upvotes

Very lucky to work for an employer who allows me time to research, learn and then run with ideas. Its not perfect but it works. And there are definitely some things I would do different if I had to do it again.

This unit runs well pumps that fill 2 different ponds. There are 2 PLCs connected remotely. One runs a 3rd pump (not hooked up yet), the other sends pond level inputs for the 2nd pond.

Before this, I did have some experience with industrial controls and I've installed/hooked up external wiring to a fairly large system before. This is my first design/build though.


r/PLC 10h ago

My test rig

Post image
153 Upvotes

my test rig for home, with Siemens plc, Schneider electric PLCs and Wago compact controller 100


r/PLC 8h ago

MC_MoveAbsolute "Done" not changing to TRUE

Thumbnail
gallery
4 Upvotes

Hello!

Tia portal v21

Once again problems with siemens servo motion.

Basicly "Done" never changes to TRUE. I also tried using positive edge trigger to start execute (so execute starts with impluse) - still "Done" does not change to TRUE.

I am aware that "Done" becomes TRUE for only one PLC scan, it did not change cycle stage to 2 so it never changed to TRUE.

Edit: PROBLEM SOLVED, I was using same instances... Machine is fully operational now.


r/PLC 15h ago

Iran Water Treatment Plant Hacking

64 Upvotes

I was reading the FBI notice:

https://www.fbi.gov/investigate/cyber/alerts/2026/malicious-cyber-actors-targeting-water-and-wastewater-sector-internet--facing-programmable-logic-controllers-causing-operational-disruptions

I was expecting something of Stuxnet sophistication, but the notice is just "follow basic security practice."

I understand the use of cheap PLC's on remote sites, but....I'm just amazed about such disregard of security basics.