The plugin is compatible with PI vision 2019 and 2020 if the PI webAPI is also manually installed.
TrendMiner 2019.R3 or later
TrendMiner PI Vision Plugin
The Trendminer PI Vision plugin enables you to send your data directly from your PI vision board to your TrendHub platform ready for analysis.
The advantage of this option is that there is now no need to look for your tags in the asset browser setup in TrendMiner, you select your tags in PI Vision and send them directly to TrendHub where they will be readily displayed for analysis.
With the first release of the PI Vision TrendMiner plugin, users can now access a PI Vision symbol in their symbol list.
The symbol can be configured with the url of your TrendMiner environment (cloud or on-premise) and optional prefix of the connected historian.
Once setup, the TrendMiner symbol in PI Vision can open up all the attributes on your PI Vision display in the TrendHub interface in the same time frame as defined in your display.
1. Download the navigationLink zip file from https://files.trendminer.com/hps/pivision/.
2. Use the file explorer to go to the PI Vision directory. In the file explorer navigation bar type in %pihome64%, this will open up the PI Vision directory.
e.g. C:\Program Files\PIPC
a. Navigate to \PIVision\Scripts\app\editor\symbols\ext.
e.g. C:\Program Files\PIPC\PIVision\Scripts\app\editor\symbols\ext
3. Extract the downloaded file in this directory.
! Important: do not change the names of these files.
a. Three files are added to this directory:
- i. sym-navigationLink.js
- ii. sym-navigationLink-config.html
- iii. sym-navigationLink-template.html
b. Three directories, each containing one file, are added to this directory:
- i. libraries/angular-piwebapi-kerberos-1.11.0.min.js
- ii. icons/trendminer-icon.svg
- iii. assets/open-in-trendhub.svg
4. Confirming the plugin is visible within PI Vision.
a. Go to PI Vision
e.g. https://example.com/PIVision, example.com has to be replaced with the configured url.
b. Click on 'New Display' in the top right of the screen.
c. A new 'symbol' (highlighted in the picture below) has been added.
For this example another 'symbol' will be used to provide the data we want to visualize in TrendHub. More specifically the 'Trend symbol' will be used.
1. Click on 'New Display' in the top right of the screen.
2. Select the 'Trend symbol' in the top bar.
3. Select in the list below the assets or attributes/tags you want to visualize.
4. Drag and drop the selected asset or attribute/tag onto the dashboard.
5. Repeat step 1-3 if you want to add multiple assets or attributes/tags.
6. Select the 'TrendMiner Navigation Link symbol'.
7. Select an asset or attribute/tag.
Note: This can be any random attribute/tag, it will not be included in the attributes/tags that will be visualized in TrendHub. Selecting an attribute/tag in order to be able to drag and drop a symbol on the dashboard is a requirement of PI Vision.
8. Drag and drop the 'TrendMiner Navigation Link symbol' onto the dashboard.
9. Right click on the 'Open in TrendHub' button and select 'Configure...', resulting in a sidebar appearing on the right side of the screen.
a. TrendMiner server: the full url pointing towards the TrendMiner installation e.g. https://my-trendminer-application.my-company.com.
b. Prefix: Sometimes historian servers in TrendMiner are configured with a prefix. Ask an admin what the configured prefixes for the servers are. If no prefix has been configured, this field can be left empty.
The screen where a configured prefix can be found by an admin.
10. Click the 'Open in TrendHub symbol' on the dashboard. This will open a view in TrendHub, visualizing all the attribute/tags that are configured on the other symbols that are on the dashboard.
Note: Duplicate attributes/tags will be filtered out. In the examples used in this guide 'Temperature' and 'Concentration' are visible twice on the dashboard (step 5), once in the TrendHub visualization.
Important: All attributes/tags (used in steps 3. and 4.) must come from the same 'historian server'. Or in other words, they all need to use the same prefix (as described in step 9b).
Opening the developer tools (console / network tab)
If one of the solutions in the troubleshooting list refers to 'open the console' or 'open the network tab', these steps can be followed to do so.
The shortcut for all browsers is normally the key 'F12'.
For Firefox and Chrome on Windows and Linux 'Ctrl + Shift + i' should also work.
For Firefox and Chrome on MacOS Command + Option + i' should also work.
Manual steps for each browser are documented below.
Internet Explorer 11
Left click on the cogwheel in the top right of the browser window.
Click on 'F12 Developer Tools'.
This will open the developer tools.
Blocked by CORS policy
If PIVision is visited over 'http://', try to visit it over 'https://'.
When clicking on a correctly configured 'Open in TrendHub' button, nothing happens. When looking at the console it shows an error.
The error shown looks different for each browser:
Internet Explorer 11
Make sure that the URL used, exists in the configuration of PI Web API.
To see which URL or 'origin' is allowed, the following link can be visited:
PI_SERVER should be replaced by the server on which PI is installed. This is the part before '/PIVision' of the URL on which PI Vision can be viewed.
Note: Depending on how the server is configured, this might show a screen that says 'Insecure connection'.
When visiting this URL, a response will be shown including the 'CorsOrigins' (see following figure).
The 'CorsOrigins' list should contain the 'origin' on which PI Vision is visited.
E.g. http://tm-pi2018.ad.trendminer.net/PIVision is used, the 'origin' in this case is 'http://tm-pi2018.ad.trendminer.net', which is not in the list of 'CorsOrigins'. However 'https://tm-pi2018.ad.trendminer.net' is in the list of 'CorsOrigins'.