Documentation Vision Library+ Documentation

Vision Library+ / Assets

Custom Asset Visualization+

Custom Asset Visualization+ shows a visualization that you let an AI write as one HTML document, fed with the current values of many AF elements at once: the elements you drop on it or that its search finds, with the attributes you pick. A status board of all lines, a ranking by OEE or a plant grid colored by state becomes display content without a dedicated symbol.

Overview

Custom Asset Visualization+ shows a visualization that you let an AI write as one HTML document, fed with the current values of many AF elements at once: the elements you drop on it or that its search finds, with the attributes you pick. A status board of all lines, a ranking by OEE or a plant grid colored by state becomes display content without a dedicated symbol.

A status board, a ranking by OEE, a grid colored by mode and the starting cards, each an AI-written document over the same 11 assembly lines

When to use it

Use this symbol when you need to:

  • Compare many assets in one view, such as a status board of every line or pump.
  • Rank or group assets by an attribute, such as lines by OEE or by mode.
  • Have an AI write the visualization from a description, without programming skills.
  • Let operators narrow the view with an Asset Filter+, or click an asset to filter other symbols.

Choose Asset Comparison Table+ or an Asset Analytics symbol such as Asset Analytics Chart+ when a ready-made table or chart is enough. For one document per asset, or for writing values, choose Custom Visualization+; for event frames, Custom Event Visualization+.

Before you begin

  • The administrator has installed the frames folder and can limit code editing. See "Install the Vision Library+ Files" and "Configure Custom Visualization+" in the installation and administration guide.
  • The assets are AF elements, ideally of one template, with the attributes you want to show.
  • You have access to an AI that your company allows. The prompt you paste there holds the search, the column names and units and, only when you ask for it, five sample elements.

Add and set up the symbol

  1. Open the Assets pane and search for the elements, for example Line.
  2. In the symbol list of the Assets pane, select Custom Asset Visualization+.
  3. Select one or more elements, such as Line 1, Line 3, Line 4 and Line 5 under Assembly Lines, and drag them onto the display.

The symbol shows a starting example: the number of elements and bad values, then one card per element with its template and every attribute, each value with its unit. A bad value shows its state, such as No Data, in red.

The starting example with four dropped lines, 17 bad values, and cards listing every attribute of Line 1 and Line 3

Dropping an element adds all attributes of its template, 45 on these lines. Next, keep only the attributes you need, as the first task shows.

Common tasks

Choose the attributes the document gets

Use this when a drop added more attributes than the document needs, or an attribute is missing.

  1. Right-click the symbol and select Configure Custom Asset Visualization+....
  2. Under Assets, the summary (1) says how many elements were dropped, and Current Attributes (2) lists the attributes the document gets.
  3. Select the attributes to drop from the list. Use Shift+click for a range and Ctrl+click to keep single ones out of the selection.
  4. Select Remove (3).
The Assets group with Dropped elements: 4, Current Attributes 45, and the Remove button

The removed attributes move to Additional Attributes. Here Current Attributes keeps Mode, OEE, Production Amount and Speed (1). To bring one back, select it under Additional Attributes (3) and select Add (2). Reorder the current attributes with the arrow buttons above Add.

Four current attributes, the Add button, and 41 additional attributes

The document gets the change at once. Each attribute reaches it as a column named with a leading |, such as |OEE. Save the display.

Use this when the document should show every element that matches, such as all lines of a template, instead of a fixed list.

  1. Right-click the symbol and select Add Dynamic Search Criteria....
  2. PI Vision builds a search from the dropped elements and opens its Search Criteria pane: Search Root (1) is their parent, Asset Type (2) their template, and Number of Results (3) the most elements the search returns.
  3. Change the search if needed. Search Root also offers Return All Descendants, and Asset Type filters by attribute values.
  4. Select Refresh, then save the display.
PI Vision's Search Criteria pane with Search Root Assembly Lines, Asset Type Selected and Number of Results 16

The symbol now shows every matching element, here 11 lines, with the attributes you kept. To change the search later, open Configure Custom Asset Visualization+...: under Assets, the summary (1) shows root, template, name and limit, and Edit search criteria (2) opens the same Search Criteria pane. Search Criteria... in the context menu does the same.

The Assets group of a search with its summary, Edit search criteria and Ignore Master

A search returns at most its Number of Results, and at most PI Vision's own limit for a search: 16 elements unless a PI Vision administrator raises it. When the search finds more, the starting example says "The first 5 elements; there are more". Dropped elements are not limited by this setting.

Get a document from an AI

Use this when you can describe the view in words and the symbol already has the elements and attributes you want.

  1. Right-click the symbol, select Configure Custom Asset Visualization+..., and under Code select Edit code.
  2. To show the AI what the elements look like, turn on Include sample rows (1). The next copy sends five elements to the AI, and the box is off again after that copy.
  3. Select Copy AI prompt (2).
  4. Paste the copied text into your AI chat and add your request, for example "One tile per production line showing its name, OEE, Speed and Mode with units. Mark bad values with their state text and values older than 15 minutes as stale. A header with OK / problem counts. A click selects the line."
  5. Paste the AI's answer into the code area and select Run (3). The preview shows the draft on the current elements, and Output lists errors.
  6. Select Apply (4), close the pane and save the display.
The code editor with Include sample rows turned on, Copy AI prompt, the preview with Run, and Apply

The prompt lists the search, every column with its type, and each attribute with its unit, so pick the attributes before you copy. Once the code area holds your own document, the button splits into Copy AI prompt (change) and Copy AI prompt (new); use (change) to ask for one change at a time. For advice on the request, see Write a request that gets a good result.

Compare a few values with an Asset Comparison Table+ on the same elements before operators rely on the document.

Filter the elements with Asset Filter+

Use this when operators narrow the view by clicking an asset in an Asset Filter+ on the display.

  1. Add an Asset Filter+ over the same elements, for example on the same search.
  2. In your request to the AI, ask it to show the filter state, for example "Show how many elements are shown, and say so when none match."
  3. Click an asset in Asset Filter+.

Every Custom Asset Visualization+ on the display receives only the matching elements, without a new search. After a click on Line 4 (1), the status board (2), the ranking (3), the grid (4) and the cards (5) show only Line 4. Clear the selection to see every element again.

Line 4 selected in Asset Filter+, and four documents showing only Line 4

To keep one symbol on all elements, for example to show selected against total, turn Ignore Master on (3 in the second image of Find the elements with a search) for that symbol.

Who owns the code: you own a generated document and its correctness on live operations. Software Athlete supports the symbol and its document functions.

Use the symbol

What an operator sees and can do is defined by the document. The status board below was written by an AI from the copied prompt.

A status board of 11 lines with numbered callouts
What it shows
(1)The counts of lines without and with a problem.
(2)A bad value, shown with its state instead of a number.
(3)A value older than 15 minutes, marked as stale.
(4)The status bar of each tile: green without a problem, red with one.
  • Hover, click and keys do what the document provides. See Use the symbol in the Custom Visualization+ guide.
  • Values refresh with every PI Vision data update, every few seconds, and at once when the display time range or the search changes.
  • Asset Filter+ selections narrow the elements at once, without a new search, unless Ignore Master is on.
  • Writes: the symbol reads values only. It changes nothing in AF or the PI Data Archive.

Configure the symbol

Right-click the symbol and select Configure Custom Asset Visualization+.... The pane has the groups Assets, Code, Parameters, Filtering and Style.

Assets

SettingWhat it does
Asset searchA read-only summary: the number of dropped elements, or the root, template, name and Max results of the search.
Edit search criteriaOpens PI Vision's Search Criteria pane for the symbol's search: database, search root and Return All Descendants, asset name, asset type and attribute values, asset category, number of results and asset order. Search Criteria... in the context menu does the same. Available when the symbol has a search; otherwise a note points to Add Dynamic Search Criteria... in the context menu. See Find the elements with a search.
AttributesCurrent Attributes are the columns the document gets, in order; Additional Attributes are the other attributes of the elements. Move attributes between the lists with Add and Remove, and reorder them with the arrow buttons. See Choose the attributes the document gets.
Ignore MasterOn: the symbol ignores Asset Filter+ selections and delivers every element. Off by default. See Filter the elements with Asset Filter+.

Code

Code source, Code attribute, Relative to the display asset, Edit code and Allow time range work as in Code of the Custom Visualization+ guide. The symbol has no Allow writes.

Code editor

The controls work as in Code editor of the Custom Visualization+ guide. Include sample rows adds five elements to the next copy of the prompt, then the box is off again.

Parameters

One row per setting the document declares. See Parameters in the Custom Visualization+ guide.

Filtering

Channels for the selections and filters the document declares. See Filtering in the Custom Visualization+ guide.

Style

Theme, Surface and Container Style. See Style in the Custom Visualization+ guide.

Document API

A document has the functions of the Custom Visualization+ document reference except vlp.write and vlp.showEvent, and the payload has no sources. It receives the elements as two row sets, and reads history and summaries by element and attribute. Copy AI prompt gives the AI this text for this symbol.

MemberWhat it does
vlp.onRows(fn)Calls fn with each row set once it has loaded, then whenever an update or an Asset Filter+ selection changed it. Tell the sets apart by rowset.name: assets and assetValues. Rows can arrive before or after the first vlp.onData, and either set before the other.
assets columnsFirst Id (the element path, the key of an element), WebId, Name (the element name or its label), Description, TemplateName and HasChildren, then one column per current attribute, such as `\OEE, and \Mode\Level1, \Mode\Level2` for the levels of a digital value.
assets rowsOne object per element, in the order of the search's Asset Order or of the drop. A value is a number, text, true / false or null; times are ISO 8601 UTC text. null means a bad value or no data, or an attribute that the element does not use.
assetValues columnsId, Attribute (the assets column name, such as `\OEE), Value, Time, Good, Questionable, Substituted, Units and State`.
assetValues rowsOne object per element and attribute the element has. Good is false for a bad value, with the PI system state, such as No Data, in State. Units is the unit of that value, which can differ from element to element.
rowset.rowCountThe elements that match the Asset Filter+ selection; with no selection, all elements.
rowset.totalCountThe elements the symbol found before the selection.
rowset.truncatedtrue when the search reached its result limit, or more than 10,000 elements match: rows then holds the first ones.
rowset.loadedAtWhen the delivered rows were read.
rowset.errornull, or a short text saying why the last load failed. No matching element is not an error.
vlp.history(options)History of attributes of the delivered elements over the display time range. Keys: attributes (required, column names such as `\OEE), assets (Id values, default all delivered rows), mode and maxPoints as in the [document reference](../custom-visualization-reference.md). At most 100 series and 50,000 points per call. Each series carries id, attribute, units and its own error`.
vlp.summary(options)Figures per interval, such as an hourly average, of attributes of the delivered elements over the display time range. Keys: attributes, assets, then types, interval or intervals, offset, calculationBasis and totalPer as in the document reference. At most 20 series and 1,000 intervals per call; a digital or text attribute has only Count and PercentGood.
vlp.select(name, values)Publishes a selection from a click or key. Publish the Id values of the clicked elements: an Asset Comparison Table+ filters on its property Id, an Asset Analytics symbol on Path or Asset, as described in "Configure a Linked receiver" in Filtering dashboards.

Troubleshooting and limitations

SymptomCauseWhat to do
The symbol stays empty, even with the starting example.The frames folder is missing on the PI Vision server.Ask the administrator to copy it as described in the installation and administration guide.
The document gets far more attributes than it uses, and reacts slowly.Dropping an element adds all attributes of its template.Remove the unused attributes under Assets, as in Choose the attributes the document gets.
A search shows fewer elements than exist, and the document says there are more.The search reached its Number of Results, or PI Vision's limit for a search, 16 elements by default.Raise Number of Results. Beyond PI Vision's limit, ask a PI Vision administrator to raise it, or drop the elements instead.
An attribute shows nothing on some elements.The attribute is excluded on those elements in AF, or has no value.Check the element in PI System Explorer; the document should show such a value as not applicable.
The view shows too few elements, or none.An Asset Filter+ selection, or the document's own filter.Clear the selection, or turn Ignore Master on. Otherwise select Run, read Output, and ask for a fix with Copy AI prompt (change).
A code or time range problem.See the other guide.See Troubleshooting and limitations in the Custom Visualization+ guide.

Limitation: A symbol delivers at most 10,000 elements. A search returns at most PI Vision's limit for a search, 16 elements unless a PI Vision administrator raises it; dropped elements are not limited by it. Updates slow down beyond about 1,000 elements.

Limitation: The symbol delivers the current values in its row sets. History and summaries are read for the display time range only, at most 20 times a minute per symbol. A document cannot write values or open event frame details.

Limitation: The symbol cannot be converted to a collection.

Limitation: Software Athlete supports the symbol and its document functions. You own the code of generated documents and its correctness on live operations.