What are some ways to be organized when writing combinational logic? When I write combinational logic, I just do it as I go along and it often leads to confusion because combinational logic doesn't have any structure.
I'm a lot more organized when writing sequential logic because I have a flow chart.
In my opinion, the structure of PLC programs should mainly consider readability criteria rather than minimizing logical terms. It's also quite unusual to have very complex combinational logic expressions in PLC programs I think. Which PLC programming language you're referring to?
Combinational logic at PLC enviroment are commonly required to perform simple tasks, like interlocking.
However, according speed constraints of target in where it is applyed, you must take much care, due internally, those jobs are treated sequentially, depending up of internal PLC archicteture.
( You build combinational blocks wich are processed by PLC firmware, sequentially )
If you can find some structure to the design of the machine or process you are controlling, then with various binary/integer flags you can create a psuedo-sequential program. Flags are set or reset according to the state of the machine. If a flag is not set then it prevents a sequence of lines/networks being evaluated.
A lot of car manufacturing production lines use PLC's with a very well defined sequential standard - using ladder logic with sub-routines.