mappView: mapping a text from a "TextList" to TextOutputs using indices

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

Hi @Lubos_Hemelik

Lets see if we can help you out in your quest!

Here is an example from the mapp-framework and may help you makes sense of the help by seeing a working example

You already have this or some from of it.

<Snippet id="IndexTextSnippetRecipeMsgBoxType" xsi:type="session" Type="IndexText" formatItem="IAT/mappFramework/Recipe/MsgBox.Confirm.{1}" />

You have a text file

And the bindings to tie it all together

<Binding mode="twoWay">
   <Source xsi:type="opcUa" refId="::RecipeMgr:MpRecipeUIConnect.MessageBox.Type" attribute="value" />
   <Target xsi:type="snippet" refId="IndexTextSnippetRecipeMsgBoxType" attribute="value" />
  </Binding>
  <Binding mode="oneWay">
   <Source xsi:type="snippet" refId="IndexTextSnippetRecipeMsgBoxType" attribute="value" />
   <Target xsi:type="text" refId="IAT/mappFramework/Recipe/MsgBoxType" attribute="value" />
  </Binding>
  <Binding mode="oneWay">
   <Source xsi:type="snippet" refId="IndexTextSnippetRecipeMsgBoxType" attribute="value" />
   <Target xsi:type="session" refId="SessionVarMsgBoxType" attribute="value" />
  </Binding>

Your use case is bit different overall but the underlying concepts should be the same.
Let us know if this helps in any way or if you already had this configured.

Dear Marcel,

Thank you for your proposed solution. The direction you suggest is undoubtedly correct; however, I have yet to achieve a successful resolution. This difficulty stems primarily from my own background, as I spent many years working with Visual Components, where TextLists and ColorLists could be effortlessly configured for each display element directly within its properties, requiring only the assignment of process variables (PVs) for the corresponding PLC indices.

Please forget my original question for now; I’m sending a new version in the image to give a clearer idea.

In mappView thus far, I have been able to employ only the most essential procedures. I modify widget texts and colors (styles) exclusively through EventBindings.

Given that the types of information displayed are repetitive, I sought to streamline my workflow.

I require guidance on how to correctly accomplish the following in mappView:

Since neither the Training Manual nor the Help documentation has provided assistance thus far, I believe a step-by-step explanation is necessary.

Thank you,

Luboš