I would like to use the state of a multistate indicator to reference a sqltag. For example:
When the state is: 21
the indicator text value is the same as the current value of the tag: “S90/HMI/Torque Value”
I don’t want to set up an expression based on the state because I have something like 45 values, and I want other people to be able to diagnose this code later.
What I was hoping for was a way inside the Designer GUI to reference the value of a string SQLtag as the text for a state. I know that this can be accomplished both with scripting and with sql calls, but this project is going to be maintained by people who are not as Ignition affluent. I would like a more intuitive way for them to be able to accomplish this task.
Example of the goal of this task:
Some way to syntactically reference in the text column of this dataset viewer a SQLtag.
i.e. When the state of the above component is 19 instead of saying “SMART FRAME PICK ACTIVE” it would say [S90\Station_20\HMI\Pick String] Where the tag at that location held a string value of a pick string.
Other HMI creation programs have a way to embed a tag value into the text of a given state of a multistate indicator. (e.g. Factory Talk ViewStudio). Maybe this post should be a future state request for Ignition as a platform.
Actually, I’d given up using multistate indicators a while ago for similar reasons. I ended up rolling my own, since we don’t use animation here.
I make mine using a standard label with a dataset attached to store process steps, Descriptions, and background color
For this one, I added a column that stores a tag path.
Finish up with some lookup functions bound to different properties, and concatenate the text together.
Here’s a sample.
[attachment=0]IndirectTest.vwin[/attachment]
EDIT: Just had a DOH! moment… actually, you could add similar properties to a multistate and do the same lookups. You can then concatenate the results and bind it to the text property. That would give the animation options back.
[attachment=3]2014-02-05_14-14-53.png[/attachment][attachment=2]2014-02-05_14-29-47.png[/attachment][attachment=1]2014-02-05_14-33-30.png[/attachment]