I'm going over a few ST subroutines I added to a task a few months ago. I noticed somethings that I didn't catch when I wrote it..
I was adding so many redundant permissive bits for some reason. Since then, I've been making a point to write cleaner code and wanted to get everyone's opinion on how they structure routines..
For example, In the code I just mentioned, I was adding high/low level interlocks in my IF statement to run a certain mode.. I was also adding the same interlock in my "IF run_mode_active" statement to open Valve A.
Do any of your interlocks that are in your Start/Stop logic anywhere else, sequencing logic, output permissive?
Hopefully this is making sense, I've been drinking!
I was adding so many redundant permissive bits for some reason. Since then, I've been making a point to write cleaner code and wanted to get everyone's opinion on how they structure routines..
For example, In the code I just mentioned, I was adding high/low level interlocks in my IF statement to run a certain mode.. I was also adding the same interlock in my "IF run_mode_active" statement to open Valve A.
Do any of your interlocks that are in your Start/Stop logic anywhere else, sequencing logic, output permissive?
Hopefully this is making sense, I've been drinking!