MikeBriggs
Member
I'm trying to figure out a weird behavior I'm seeing in my CCW program. It's for controlling a gas polarizer (for medical imaging). I'm using an INT called "PolarizeStep" for counting through various steps in the process. Have a look at the attached screenshot please.
If you look at rung 80, you'll see that it starts with two checks that pass - NowPolarizing is true, and PolarizeStep equals 6. During this process some liquid containers are being moved down. Once they're both at the bottom, "BothAtBottom" becomes true, and PolarizeStep should advance to 7. Note that BothAtBottom IS true, but PolarizeStep remains at 6.
To make things weirder - the next rung, which is for when PolarizeStep does equal 7, is being triggered. It seems to think that PolarizeStep currently equals BOTH 6 and 7, because both of those rungs are being triggered.
The problem that this is creating is that the timer in rung 6 can expire (even though it should no longer be running since BothAtBottom is true), and trigger an error (the stuff below the part in rung 80 where PolarizeStep should be moving to 7).
Has anyone seen anything like this before? Where CCW thinks a variable has two values at once? My best guess is that rung 80 IS advancing PolarizeStep to 7, which triggers rung 81, but something somewhere else in the program is making PolarizeStep go back to 6. But, there is only one place where PolarizeStep can be set to 6, and it's in a rung that should only be getting triggered if PolarizeStep is 5.
Help!
If you look at rung 80, you'll see that it starts with two checks that pass - NowPolarizing is true, and PolarizeStep equals 6. During this process some liquid containers are being moved down. Once they're both at the bottom, "BothAtBottom" becomes true, and PolarizeStep should advance to 7. Note that BothAtBottom IS true, but PolarizeStep remains at 6.
To make things weirder - the next rung, which is for when PolarizeStep does equal 7, is being triggered. It seems to think that PolarizeStep currently equals BOTH 6 and 7, because both of those rungs are being triggered.
The problem that this is creating is that the timer in rung 6 can expire (even though it should no longer be running since BothAtBottom is true), and trigger an error (the stuff below the part in rung 80 where PolarizeStep should be moving to 7).
Has anyone seen anything like this before? Where CCW thinks a variable has two values at once? My best guess is that rung 80 IS advancing PolarizeStep to 7, which triggers rung 81, but something somewhere else in the program is making PolarizeStep go back to 6. But, there is only one place where PolarizeStep can be set to 6, and it's in a rung that should only be getting triggered if PolarizeStep is 5.
Help!