Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Controls Guy on March 25, 2020, 02:27:05 PM
-
I got a W315 for putting an OSR inside a loop. I think what DM is going to do is that on the first PLC scan in which X39 is true, ANDPD X39 will be true for all the loop iterations that occur during that PLC scan (all of them unless I allow it to yield). Is that correct? If so, that's what I want it to do, and I'll disable the warning for that instance.
-
Would have to see the code to make sure I'm understanding, but it will only be true until the instruction is invoked again. If the instruction is in the loop, it would only be true during the first pass through the loop.
-
This is inside a loop that iterates about 20 times without yielding:
STRE MHR[V0] LightingModePhot
ANDPD X39
MATH DST511 "1" "MC[300 + ((V0 - 1) / 3)]"
-
Will only be true the first pass through the loop.
-
Will only be true the first pass through the loop.
Ah OK. Will do AND X39 ANDN MyMemoryBit inside and set MMB equal to X39 after the loop.