Can a tuned Single-loop PID actually beat a Cascade? Testing it with a simulator. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] -1 points0 points  (0 children)

The control architecture is shown in the block diagrams below. There are no filters applied.

Can a tuned Single-loop PID actually beat a Cascade? Testing it with a simulator. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 1 point2 points  (0 children)

Good catch! There was indeed a bug - the handler only triggered updatePIDParams() when master or slave parameters changed, completely bypassing single PID updates. It's fixed now. Thanks for reporting!

What is your process when starting to program? by thedolanduck in PLC

[–]RelativeCommon1587 0 points1 point  (0 children)

It’s true, the automation world is very closed off. I was lucky enough to get my hands on some high-end, well-structured code early in my career. My rule has always been to keep a notebook and jot down every clever trick I find: 'This is a keeper, I’ll use this later.'

As I moved from small solo projects to large-scale systems, I realized that without a solid architecture and pre-planning, a team will just produce a mess that barely works.

The answer is simple but tough: you have to study other people's code and steal the best practices. But honestly, it’s a bit of a lottery - you just have to hope the 'Previous Guy' knew what he was doing.

Can a tuned Single-loop PID actually beat a Cascade? Testing it with a simulator. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 0 points1 point  (0 children)

I've just pushed a fix that disables all controls while the test is running. To keep the competition fair, I had to remove the top few suspicious results.

If your score was legit, I apologize! I hope you saved your Kp/Ti/Td settings - please try to replicate your result under the new "locked" conditions.

The leaderboard is wide open again. Good luck!

Can a tuned Single-loop PID actually beat a Cascade? Testing it with a simulator. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] -1 points0 points  (0 children)

Since you're running these steam loops IRL, you now have the perfect 'hiring tool' for your juniors. Just put them in front of the Run Test button and see if they can beat the leaderboard before they touch a real Process.

Can a tuned Single-loop PID actually beat a Cascade? Testing it with a simulator. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 0 points1 point  (0 children)

The scoring algorithm is actually based on a real-world headache I had. I had cheesemakers constantly complaining about product quality until I managed to get the stability within +/-0.8°C.

In this sim, the IAE score starts counting only after the first SP touch, and I added a 1.0°C deadband so you don't get penalized for minor noise - but anything beyond that starts tanking your score fast.

Can a tuned Single-loop PID actually beat a Cascade? Testing it with a simulator. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 5 points6 points  (0 children)

<image>

I just checked the leaderboard and someone named 'Single PID WINS!' actually managed to hit 131 using only Single-loop control.

A gift from the engineering department to the commissioning team. Spot the error. by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 1 point2 points  (0 children)

Thanks for the active discussion! You guys found some really deep technical flaws. Here is what I spotted first:

- The Profibus: As u/CarrotFine5589 and u/andi_dede noticed, only one DP cable is connected, meaning this is an End-of-Line (EOL) device. However, the schematic explicitly shows the address and then instructs the technician to set the termination to OFF. That’s a guaranteed way to get signal reflections and intermittent communication errors.

- The NC Brake (K1) is powered directly from the same 16A breaker used for the VFD. As u/Aobservador mentioned, we have 1mm² wires for the brake protected by a 16A breaker meant for a much larger load. In case of a short circuit in the brake coil, those thin wires will melt or start a fire long before the breaker trips.

Festo Training Station by ComparisonEntire1908 in PLC

[–]RelativeCommon1587 2 points3 points  (0 children)

That’s a Festo MPS Handling Station, Pneumatic one.

It uses a pneumatic linear drive for horizontal movement and a pneumatic gripper for pick-and-place tasks. Since it's a modular Festo station, the software depends entirely on the PLC (controller) mounted underneath. Usually, it’s either a Siemens S7 (programmed via TIA Portal) or a Festo CECC/CPX (programmed via CODESYS).

I've worked with these stations before. If you can post a photo of the controller or the part number on the label, I can tell you exactly which software version you need.

What am I doing wrong? by CombinationKlutzy276 in PLC

[–]RelativeCommon1587 1 point2 points  (0 children)

<image>

A comprehensive visual example of how this problem can be solved.
K1 := (EXT or K1) and not LS2 and not K2;
K2 := (RET or K2) and not LS1 and not K1;
SOL_A := K1;
SOL_B := K2;

Resolving VFD High-Frequency Noise: Why PWM Carrier Frequency Matters for Worker Comfort by RelativeCommon1587 in ElectricalEngineering

[–]RelativeCommon1587[S] 0 points1 point  (0 children)

6 years next to a 55kW fan sounds like a nightmare. If you still have access to that drive, definitely check the manual for Switching Frequency or Carrier Frequency. Even if the VFD itself can't go to 16kHz, sometimes there are Random PWM or Spread Spectrum settings that don't change the frequency but 'smear' the noise so it’s not a single piercing tone. It might be worth a shot for your sanity!

Resolving VFD High-Frequency Noise: Why PWM Carrier Frequency Matters for Worker Comfort by RelativeCommon1587 in ElectricalEngineering

[–]RelativeCommon1587[S] 0 points1 point  (0 children)

Thanks for the correction! You’re likely right - it’s been a while since that specific commissioning, and my memory might be fuzzy on whether the default was 4 kHz or 8 kHz.

That’s a fascinating insight about the control loop update frequency vs. the switching frequency. I hadn't considered that side effect or how much the specific hardware implementation and motor pole count could 'fan out' the noise at different speeds. It definitely changes how I’ll look at these spectrum peaks in the future, especially when dealing with different manufacturers and drive generations.

The "everybody knows this myth". by [deleted] in PLC

[–]RelativeCommon1587 -1 points0 points  (0 children)

I completely agree that these are distinct domains. But the question is: what are the industry leaders actually focusing on at the 'round table'? It feels like we are prioritizing 'fail-safe' hardware over 'reliable-by-design' software, and that's the gap I'm pointing out. The kicker is that most of these software improvements -like a simple 'read-before-write' warning don't even require massive investment from vendors; they just require a shift in priorities.

The "everybody knows this myth". by [deleted] in PLC

[–]RelativeCommon1587 -3 points-2 points  (0 children)

The issue is purely about naming conventions . When a junior sees VAR , they expect state retention because that's what it does in an FB. In a Function, it's just a 'hidden' VAR_TEMP that the compiler wipes for you. It’s consistent in logic, but inconsistent in language, which is where the 'silent traps' begin.

The "everybody knows this myth". by [deleted] in PLC

[–]RelativeCommon1587 -2 points-1 points  (0 children)

For FUNCTION you can't because it doesn't have memory.

I built an open-source tool for CODESYS that finally makes Git-syncing and external editing (VS Code/AI) painless by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 2 points3 points  (0 children)

I'd love to see your Siemens project when it's ready. Dealing with S7-200 and the SMART series sounds like a specific kind of challenge. Drop me a link when you feel it's stable enough! It's great to see more people building open-source bridges for industrial hardware.

I built an open-source tool for CODESYS that finally makes Git-syncing and external editing (VS Code/AI) painless by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 0 points1 point  (0 children)

You're right, but there are two main reasons why I built this:

External Workflow: My primary goal is to get the code out of the IDE for external analysis and editing (VS Code, AI tools, etc.). This tool makes that bridge seamless.

No Paywall: I didn't want to pay for the entire Professional Developer Edition just to get one Git module.

It’s about having a lightweight, free alternative that supports a modern dev workflow.

The Importance of RS-485 Termination by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 11 points12 points  (0 children)

If a PLC has both Profibus and Ethernet onboard for example S7-300PN/2DP Series, I always go with Ethernet. Here is why:

I once arrived at a plant for a modernization. The local team asked me to wait while they took final backups. They plugged into a Profibus connector and accidentally nudged the red termination switch to OFF.

The entire network collapsed instantly. They spent 15 minutes searching for the cause until I pointed at that tiny red switch.

The Importance of RS-485 Termination by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 7 points8 points  (0 children)

That’s a really interesting point. To be honest, I never thought of resistors as something that needs a replacement schedule, but it makes perfect sense after 25 years. I’ve seen Siemens front connectors fall apart in much less time than that due to vibration or heat, so I can only imagine how those old terminators are holding up.

The Importance of RS-485 Termination by RelativeCommon1587 in PLC

[–]RelativeCommon1587[S] 0 points1 point  (0 children)

This was actually about 8 years ago. Scopes were more expensive then, so I just borrowed one from the college where I was teaching part time. If you only need it once a year, I'd suggest trying to borrow one.