Using vision version 8.21
I have no control over what is in the plc but I need to do the following:
Create four maintained PB's which each have their own boolean tag value, for example: Bool1, Bool2, Bool3, and Bool4
Create one label with a script on the text field to do the following:
if Bool1 is true, text will say 'Bool1',
if Bool2 is true, text will say 'Bool2',
if Bool3 is true, text will say 'Bool3',
if Bool4 is true, text will say 'Bool4',
else have text say 'None' as failsafe if none of true
Within the plc program if one boolean goes high the others go low so there is never a situation where two booleans can be true at the same time.
I attempted to create the following but its telling me the if statement cant have four arguments...
if (Bool1, 'Bool1', if(Bool2, 'Bool2', 'None'), 'None')
Any suggestions on how to do this easily?