Help with nFactoryTalk View Syntax

Leery24

Member
Join Date
Mar 2018
Location
Carlisle
Posts
3
Hi everyone,
I'm trying to write an expression in the indicator field of a multistate indicator but it doesnt matter what i do it isnt giving me the result i was expecting. From reading other posts here i do believe it is possible but i cant work out why it isnt working on this occasion. here is the expression...

If ({S4\N10_13_0} == 1) Then 1
Else If ({S4\N7_80_10} == 1} Then 2
Else 0

It appears as though the first line of the expression is working as when i turn the first tag on it does show state 1. the rest of the time it shows error.
Could someone please shine some light on what it could be that is going wrong.
King Regards
 
Maybe a typo but the 2nd expression ends with } not ). If the tags are both bits then the equal 1 is not needed. The expression could be:

If {S4\N10_13_0} Then 1 Else
If {S4\N7_80_10} Then 2 Else 0

Note: Expressions are solved from top to bottom. So if both are true then it will show top expression. Just something to remember if you need to set priority in an expression.

something like If {this} then Fault else If {that} then Warning Else OK.
 
Last edited:

Similar Topics

Hi all, hope you are having a great day, I am in need of your help to create a AOI or program that does this kind of job: I have a IO Link...
Replies
4
Views
84
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
342
Hi Everyone, i was hoping for a little help with this module. i have data that needs to be read from a different plc through the Modbus plus...
Replies
11
Views
222
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
228
Back
Top Bottom