4 ms·
Ah yes, PLC programming. I expect there will be a lot of stories from PLC programmers in this thread ;)
by CapacitorSet 9y ago
Ah yes, PLC programming. I expect there will be a lot of stories from PLC programmers in this thread ;)
- jnord 9y ago"It is easy to make a mistake but if you really want to stuff it up you need a PLC". :)
- eat_veggies 9y agoHey! I'm working at my first software internship and I will very soon be doing some PLC programming on moderately important chemical equipment. Do you have any tips on how to not spectacularly fuck everything up?
- CapacitorSet 9y agoI found it helpful to not change "complex" outputs directly, but rather call a function that does that for me and handles the complexity in one place. For instance, if a brake must be removed before activating a motor, rather than pasting the same code every time you need to use the motor, wrap that in a small function block and use that. In general, make the code easy to interpret, especially when debugging - which means organizing your code and using simple abstractions. State machines can be useful because they're easy to interpret if you comment your states, leading to high-level understandings like "the machine is waiting for an item" rather than "it will do something when I0.5 goes high".