Manglemender
Member
Philip,
I'm very glad that you're open to examining different ideas, it's a great way to learn and there are certainly some very knowledgable contributors to this forum.
I'm not convinced that your simple ladder method would be more efficient but I do conceed the point that it might be easier to understand. Poor documentation on the part of the original programmer is a more common cause of confusion.
Modern processors are so fast that code optimisation is a dying art. I still remember a time when I had to juggle priorities and execution sequences to get the cycle time of the program below 100mS and you would only use floating point maths if absolutely necessary; Many old S5 PLCs can't even do floating point maths.
I would recommend that anyone interested in PLCs should study assembly code/machine code programming first to gain an understanding of what hoops the CPU has to jump through to perform any given task.
Nick
I'm very glad that you're open to examining different ideas, it's a great way to learn and there are certainly some very knowledgable contributors to this forum.
I'm not convinced that your simple ladder method would be more efficient but I do conceed the point that it might be easier to understand. Poor documentation on the part of the original programmer is a more common cause of confusion.
Modern processors are so fast that code optimisation is a dying art. I still remember a time when I had to juggle priorities and execution sequences to get the cycle time of the program below 100mS and you would only use floating point maths if absolutely necessary; Many old S5 PLCs can't even do floating point maths.
I would recommend that anyone interested in PLCs should study assembly code/machine code programming first to gain an understanding of what hoops the CPU has to jump through to perform any given task.
Nick
Last edited: