Hi everybody,
For a while I’ve been wondering, in every plc forum where the use of loops come to discussion I find most people answering that it’s best to stay away from them and that there are better, easier and mostly less scan time demanding solutions out there. Why is that?
I mostly program in ST and in many projects I make use of lots of arrays combined with lots of FOR TO loops and in my experience they’re the next best thing.
Why would referencing data from an array of 40 Dwords using a FOR X:= 0 TO 40 DO loop be any more scan time demanding then the PLC scanning through 40 rungs of statments?
Just curious if I’m missing something here.
Cheers
For a while I’ve been wondering, in every plc forum where the use of loops come to discussion I find most people answering that it’s best to stay away from them and that there are better, easier and mostly less scan time demanding solutions out there. Why is that?
I mostly program in ST and in many projects I make use of lots of arrays combined with lots of FOR TO loops and in my experience they’re the next best thing.
Why would referencing data from an array of 40 Dwords using a FOR X:= 0 TO 40 DO loop be any more scan time demanding then the PLC scanning through 40 rungs of statments?
Just curious if I’m missing something here.
Cheers
Last edited: