Greetings,
I am trying to utilize mappView Snippets; however, I must confess that the Help documentation remains entirely opaque to me.
My hardware configuration comprises a 4PPC50, running Automation System version 4.12 and mappView 5.24.
Due to historical precedents, the authentication system is managed within the controller’s program logic. The login history is archived in the array LoginHist[0..15].
My objective is as follows:
Within the LoginHist[0..15] array, each structure member contains an integer field named “level”, which assumes one of four values with the following semantics:
0 = “view only”
1 = “maintenance”
2 = “technician”
3 = “engineer”
In the visualization, I wish to present a summary table on a single page, wherein each row (indexed 0 through 15) displays the textual representation corresponding to the login level, rather than the raw integer values (0 through 3).
I possess a file named snippets_TextLists.snippet containing the following snippet definition:
I’m sorry, but after saving the post, some of the code isn’t showing up.
So snippet is declared with id=“TextListLoginRole”, type=“IndexText” and formatItem=“IAT/LoginRole.{1}”
I have incorporated the following into Visualizat.vis:
<SnippetsSets>
<SnippetsSet refId="snippets_TextLists" />
</SnippetsSets>
Furthermore, my LocalizableTexts.tmx file contains:
<tu tuid="LoginRole.0">
<tuv xml:lang="cs-CZ">
<seg>ZÁKLADNÍ</seg>
</tuv>
<tuv xml:lang="en">
<seg>VIEW ONLY</seg>
</tuv>
</tu>
along with analogous definitions for indices 1 through 3.
In the file LoginHist.binding, I have appended:
<Binding mode="oneWay">
<Source xsi:type="opcUa" refId="::AsGlobalPV:LoginHist[0].level" attribute="value" />
<Target xsi:type="snippet" refId="TextListLoginRole" attribute="value" />
</Binding>
On the page LoginHist.content, I have inserted a TextOutput widget, currently configured solely for LoginHist[0].level.
Herein lies my impasse. I have exhaustively reviewed all options within the Data.value.Binding property, yet I remain uncertain of the correct path forward.
Perhaps I am pursuing an erroneous approach: Is it feasible to display text strings derived from a single “TextList” across multiple TextOutput widgets on the same page, each referencing a distinct index?
Thank you for your assistance.
Luboš Hemelík

