SiriusMark
Member
Hello again. I'm doing work on an HMI, trying to make it more functional. I have a button created that is intended to display whether my engine control switch is in one of four possible conditions (off, maint, auto, manual). The PLC uses four separate tags to monitor those four positions, so I need a way to incorporate all of them into one button. I tried this:
If {DieselGen\ECS_AUTO} Then STATE0 ELSE
IF {DieselGen\ECS_MAINT} then STATE1 ELSE
IF {DieselGen\ECS_MAN} THEN STATE2 ELSE
IF {DieselGen\ECS_OFF} THEN STATE3 else
state4
State 4 is just an error message. FactoryTalk accepts the syntax, but asks if I want to make STATE0-4 tags. I say no,I test the program, no workie workie.
So...how do I make the expression specifically reference the state of the button it is being created in? If ECS_Auto then this button is in state0, is basically what I want it to do.
If {DieselGen\ECS_AUTO} Then STATE0 ELSE
IF {DieselGen\ECS_MAINT} then STATE1 ELSE
IF {DieselGen\ECS_MAN} THEN STATE2 ELSE
IF {DieselGen\ECS_OFF} THEN STATE3 else
state4
State 4 is just an error message. FactoryTalk accepts the syntax, but asks if I want to make STATE0-4 tags. I say no,I test the program, no workie workie.
So...how do I make the expression specifically reference the state of the button it is being created in? If ECS_Auto then this button is in state0, is basically what I want it to do.