Sanman Mehta Posted July 26, 2021 Share Posted July 26, 2021 (edited) TLDR Asset trees are great way to scale your analysis to N number of assets. Currently one needs working knowledge of SPy(Seeq-python) to build multi layered asset tree. With the attached jupyter notebook, Add-on tool can be created as shown here so that users can generate their own multi layered asset trees in their workbenches which can then be shared with colleagues. Pre-Requisite: Seeq Data Lab (powered by SPy module) Detail steps: 1. Get a CSV file (can be done in excel and saved as CSV format) that has hierarchy of your asset tree structure. The columns in screenshot below represent various hierarchical levels (columns A,B,C &D). You don't need exactly 4 columns, the solution supports any number of columns/hierarchical levels. 2. Include a column for "Process Value" (column F in screenshot below) which are your tag values and a column for "Asset Tree Name" which will appear in the tree and are the common attribute names among assets (column E in screenshot below). 3. Use the attached jupyter notebook and create Add-on tool so any user can access the tool from Tools pane in workbench. This is one time step and should be done by someone who has experience with Seeq Data Lab. The Tool name can be "Create Asset Tree from CSV File". Here is KB article on setting up new Add-on tool. https://support.seeq.com/space/KB/961675391/Add-on%20Tool%20Administration%20and%20Development 4. Use attached csv file and have your colleague who knows nothing about python, run the tool. UI is self explanatory as seen below. 5. Refresh the workbench from which user created the Asset Tree and watch the results appear like so: Optional step 6: If there is no Add-on tool available, or you would like to build it step by step then add calculations, roll ups etc., check out the jupyter notebook named step_by_step_asset_tree attached below. Example_SDL_Asset Tree (1).csv Step_by_step_asset_tree.ipynb Create_asset_tree_with_dynamic_class_R58_or_later.ipynb Edited February 15, 2023 by Sanman Mehta Added new notebook compatible with R58 onwards 1 1 Link to comment Share on other sites More sharing options...
Sanman Mehta Posted July 28, 2021 Author Share Posted July 28, 2021 Many of you asked for a video so here it is. I too prefer video over text and images. Sanman 1099034144_assettreefromcsvfile.mp4 Link to comment Share on other sites More sharing options...
john.gillingham Posted April 1, 2022 Share Posted April 1, 2022 Hi, I'm trying to build out an asset tree using your Step_by_step_asset_tree.ipynb script; however, I am getting a syntax error when I run: %run dynamic_class.py ... which I assume has to do with my signal format as when I run the example it works as intended. Is anyone able to provide any insight into this? Much appreciated. Link to comment Share on other sites More sharing options...
Sanman Mehta Posted April 1, 2022 Author Share Posted April 1, 2022 Hi John, The error is pointing to column name having a period (.) Can you try after removing any period from column name in csv file? If you can email me the csv file to (sanman.mehta@seeq.com) I can take a look as well. Link to comment Share on other sites More sharing options...
SBC Posted July 11, 2022 Share Posted July 11, 2022 Is the Process Value the same as Tag Path for the tag in historian (for example if PI is the data source) ? Link to comment Share on other sites More sharing options...
Sanman Mehta Posted July 11, 2022 Author Share Posted July 11, 2022 Process value is your unique pi tag. Link to comment Share on other sites More sharing options...
SBC Posted July 11, 2022 Share Posted July 11, 2022 1 minute ago, Sanman Mehta said: Process value is your unique pi tag. Just wanted to clarify if the unique Pi Tag should include the server also : For example: \\<PI SERVER>\<PI Tag name> Thank you very much for your prompt support. Link to comment Share on other sites More sharing options...
Sanman Mehta Posted July 11, 2022 Author Share Posted July 11, 2022 The script is designed to only tag pi tag (not pi server). If searching pi tag in workbench results in one unique tag then the script will work. Otherwise please reach to me directly for support. Link to comment Share on other sites More sharing options...
SBC Posted July 14, 2022 Share Posted July 14, 2022 When I import a new Asset Tree using csv (after opening a Workbwench), the Asset Name/Tree is visible only from the parent workbench I started with. Is this by design of SeeQ or just an artifact of how asset trees visibility is managed in my org's SeeQ platform ? Link to comment Share on other sites More sharing options...
Sanman Mehta Posted July 15, 2022 Author Share Posted July 15, 2022 Hi SBC, This is by design. Although you can make the asset tree available in all workbenches by specifying “workbook”=None in your spy.push call near the bottom of the script. Add on tool is running script in background which you can find and update. Link to comment Share on other sites More sharing options...
SBC Posted July 16, 2022 Share Posted July 16, 2022 Can a SeeQ condition be added as an "attribute" (Process Value) to each asset by some method (either while creating the asset tree via csv import or after the asset tree is create) ? Context: I am looking to have the same condition formula applied to different assets but keeping certain parameters flexible. For example, I am checking is $signal > 7 for Pump A vs $signal > 10 for pump B, where $signal is the same calc across all pumps. Link to comment Share on other sites More sharing options...
VpJ Posted August 16, 2022 Share Posted August 16, 2022 Can these asset groups be accessed by different work-benches? I spent quite a bit of time creating asset groups manually in a workbench only to later realize it wasn't accessible from other work-benches. Is it possible to make that available globally? Thank you! Link to comment Share on other sites More sharing options...
Seeq Team Joe Reckamp Posted August 16, 2022 Seeq Team Share Posted August 16, 2022 Hi VpJ, Currently, asset groups are only available in a single workbench. You can see some differences between asset groups and asset trees (including that workbook/global scoping) here: https://seeq.atlassian.net/wiki/spaces/KB/pages/1590165555/Asset+Groups#Asset-Trees-vs.-Asset-Groups 1 Link to comment Share on other sites More sharing options...
VpJ Posted August 16, 2022 Share Posted August 16, 2022 Thank you for the quick response, Joe! Will try making asset trees through the datalab so that it's accessible globally! Link to comment Share on other sites More sharing options...
Sanman Mehta Posted August 16, 2022 Author Share Posted August 16, 2022 Hi VpJ, If you build it out using any of the solutions mentioned above, it is relatively easy to make it available in all workbenches. 1 Link to comment Share on other sites More sharing options...
Muhammad Ehsan Posted October 19, 2022 Share Posted October 19, 2022 Hi Sanman, I am trying to install the tool using Add on tool manager, but a SPY.Exception is prompting stating User "my email" not found. Can you help with it? Regards Ehsan Link to comment Share on other sites More sharing options...
Sanman Mehta Posted February 15, 2023 Author Share Posted February 15, 2023 Hi Ehsan, That looks like a general SPy error and I would recommend filing a ticket with support@seeq.com so we can look into it further. Sanman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now