11-19-2009 08:55 AM
The following code came from the security system sample CLD exam. I don't understand why a single frame sequence structure was used in this case? Can anyone explaine?
Thanks in advance.
Solved! Go to Solution.
11-19-2009 09:05 AM
It's to prevent a race condition. Presumably, that indicator can get updated in another case, but the shift register would not. In that case you want to see if the indicator data is different before the indicator gets updated with the contents of the shift register. Without the frame the indicator could be updated before the local variable gets read.
I'm also kind of surprised to see the method being used to construct the path that way in a sample CLD exam. Paths should not be specified using strings. (Waving finger in the air) Bad programmer, bad programmer.
11-19-2009 09:09 AM
Well, VI Joe,
It is to avoid race around condition
It makes sure that the data from the indicator Zone status Indicators is read through its local variable before a new data being written to the same indicator.
Perhaps it could have been avoided by having a shift register for storing old data. But the developer might have thought that its unnecessary to add another shift register for a simple value change comparison at a single case
11-20-2009 07:30 AM