Lazy_Fox
Member
Hello,
I am fairly new to AB PLC and HMI.
I am using Factorytalk View to create an HMI application.
While using Macros, I wanted to create a script to move an object vertically (up or down) when push button (either UP or DOWN) is pressed.
I wrote the macros as follows.
<Tag>: Distance
<Expression>: If (UP) Then (Distance + 10) Else If (Down) Then (Distance -10) Else Distance
But when running the application, The Object is only moving upwards (i.e Only the If condition is read) but not moving down (i.e else if condition is not read).
Is there anything wrong with my syntax?
I am fairly new to AB PLC and HMI.
I am using Factorytalk View to create an HMI application.
While using Macros, I wanted to create a script to move an object vertically (up or down) when push button (either UP or DOWN) is pressed.
I wrote the macros as follows.
<Tag>: Distance
<Expression>: If (UP) Then (Distance + 10) Else If (Down) Then (Distance -10) Else Distance
But when running the application, The Object is only moving upwards (i.e Only the If condition is read) but not moving down (i.e else if condition is not read).
Is there anything wrong with my syntax?