I’m looking to have a message display bar which can have many different descriptions shown by referencing value of a certain tag. My main experience is with AB FactoryTalk View Studio and in this it uses a local message file (if this helps any).
I can write an expression but this is too laborious.
if({Local Messege Tags/StepHMIMsgNo} = 1000, “0 - Off”,
if({Local Messege Tags/StepHMIMsgNo} = 1001, “1 - Spare”,
if({Local Messege Tags/StepHMIMsgNo} = 1002, “2 - Spare”,
Use the lookup expression: lookup - Ignition User Manual 8.1 - Ignition Documentation. Create a dataset tag with all of the messages and states and then use the lookup expression to pull from the column that has the messages.
2 Likes
I still can’t seem to get it to work… See attached below. I have created my dataset memory tag and added some columns and rows. I have the tag I want to use as the value.
so your almost there. You need to provide a no result value. And the last 0,0 isn’t required. It will automatically look in column 0 for the value to find, and pull the results from column 1.
IE:
lookup({dataSetTag},{messageNumber},'Unknown')
BTW post your code in the future bracketed by ``` to get it tor format so we can edit for ya