New and confused!

buddhaman001

Member
Join Date
Feb 2014
Location
mobile, al
Posts
52
First off HI! I absolutely love this forum and want to thank everyone for helping me (though they don't know they have). I'm part of a startup and as such am having to learn all of this on my own, Everyone says I've been doing great but I know I have yet to learn enough to unlock the full potential of these programs.

So what I'm working on tonight is a main icon that will change color at any error in its corresponding display, to do this I'm writing an expression for a color change on the icon (I will be writing actual alarms tomorrow)

My expression list is for factorytalk. Could someone take a quick gaze and see why this is throwing a value other than 0 or 1?

Code:
If {Plant11\Booster1Fault} Then 1 
Else
If {Plant11\Booster2Fault} Then 1
Else
If ({Plant11\chlorinescale} < 50) Then 1
Else
If {Plant11\generatorfault} Then 1
Else
If ({Plant11\Booster1} OR {Plant11\Booster2} == 1) AND ({Plant11\Flowmeter1} < 50) Then 1
Else
If ({Plant11\SystemPower} == 0) Then 1
Else
If ({Plant11\flowmeter2orresidual} > 1.8 OR < .7) Then 1
Else
If ({Plant11\Systempressure} < 40 OR > 80) Then 1
Else
If ({Plant11\groundstoragelevel} < 12 OR > 25) Then 1
Else 0
 
SORRY! that was the wrong revision.

Code:
If {Plant11\Booster1Fault} Then 1 
Else
If {Plant11\Booster2Fault} Then 1
Else
If ({Plant11\chlorinescale} < 50) Then 1
Else
If {Plant11\generatorfault} Then 1
Else
If ({Plant11\Booster1} OR {Plant11\Booster2}) AND ({Plant11\Flowmeter1} < 50) Then 1
Else
If ({Plant11\SystemPower} == 0) Then 1
Else
If ({Plant11\flowmeter2orresidual} > 1.8) OR ({Plant11\flowmeter2orresidual} < .7) Then 1
Else
If ({Plant11\Systempressure} < 40) OR ({Plant11\Systempressure} > 80) Then 1
Else
If ({Plant11\groundstoragelevel} < 12) OR ({Plant11\groundstoragelevel} > 25) Then 1
Else 0
 
Hi,

Wild stab in the dark because programming languages, especially scripting languages, can be very unique.

The line that contains “< .7”, would throw an exception in most languages.

Try “< 0.7”

SWAG 
 
If (({Plant11\Booster1}) OR ({Plant11\Booster2})) AND ({Plant11\Flowmeter1} < 50) Then 1
Else

They look OK except this one. Maybe need syntax change (in red) or make it two seperate statements.

If ({Plant11\Booster1}) AND ({Plant11\Flowmeter1} < 50) Then 1
Else
If ({Plant11\Booster2}) AND ({Plant11\Flowmeter1} < 50) Then 1

But I think you need to Open and Close Statements on either side of argument. (statment1) OR (statement2)

It looks like all the others are like that.
 
I was wondering the same thing. I thought maybe he's using a Multi-State indicator and getting an Error.
 
I am...an idiot. It was a combination, one, the single line tag checks helps alot (removing or and ands. Also....I didn't have a RTu connected...yeah I facepalmed at myself.

Guys thank you very much for your help. I hope someday I will be versed enough in this type of software I can contribute to the forums!
 

Similar Topics

Which of the following input operations require a conversion to digital form prior to input? a) disk b) analog c) contact closures d) limit...
Replies
12
Views
3,877
Hey all! I recently purchased myself a Panelview Plus off of ebay and i was hoping that i could upgrade the firmware on it to Version 9 or so and...
Replies
7
Views
2,744
Good morning everyone. I am apparently confused on the COP instruction. What I am trying to do is copy a DINT to a DINT in a User Defined Data...
Replies
16
Views
6,938
Hey guys, Im currently using the above flex IO to turn on two outputs these outputs go to two flashing red beacon lights. Here's the scenario: My...
Replies
4
Views
1,706
I'm event AV Technician (Sound, Projection, and Lighting). Over the last couple of years I've used a Weigl ProCommander PHX to control some event...
Replies
9
Views
2,694
Back
Top Bottom