Quantcast
Channel: GE Intelligent Platforms e-Forum
Viewing all articles
Browse latest Browse all 2516

If statement always resolves true when database tags value is unknown.

$
0
0
I developed a script on site and have been working on it in a VMware session with no PLCs and I noticed that one of the IF statements I’m working on always runs. I had been using hardcoded values to test with but I noticed it still ran when I put the tag back in.

If Fix32.SCADA.TAG.F_CV = 1 Then
MsgBox ("Script Run")
End If

So even though the tag “TAG” has a current value of “????” the IF statement resolves and I get a message box. That seems kind of not right. Am I missing something, if it's anything other than a "1" why is it running?

Viewing all articles
Browse latest Browse all 2516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>