Jump to content

patjdixon

Members
  • Posts

    27
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by patjdixon

  1. This is great, but in my case I already have a topic and worksheets created.  What I would like to do is append the end of each Organizer worksheet with the appropriate plot.  For example, my worksheets could be 'Tensile' , 'Burst', 'Tear', and 'Fold'.  On each one, I want to append the plot of the property to the worksheet, so 'Tensile' would have a plot of Tensile, 'Burst' a plot of Burst, etc.

    I cannot figure out a way to do pull/push to make this work.  Any ideas?

  2. I have DataLab code that generates a plot:

    image.thumb.jpeg.b00a26329452311c2861d1bc08a0fd8b.jpeg

    I thought there was a way in DataLab to push "ax" to an Organizer topic/sheet, but I can't find any information on how to do this.  The result I am looking for would be like:

    image.thumb.jpeg.c69dc10943b6c9d17c2b861a594caa1f.jpeg

    Is there a way to do this, or do I have to export an image from DataLab and then manually import it into Organizer?

  3. I am having trouble removing signals from DataLab.  I tried this, and it looks like it set all signals to ARCHIVE:

    image.thumb.jpeg.e2d6dafb83b2c71cce9d69add5322682.jpeg

    Notice the ID 18B29A83-783F-475D-B2BB-7ACF2BFB8362 for QCS_BasisWeight_RampCond says it is Archived:

    image.thumb.jpeg.6a20e05c314374b4875affb81d97cf69.jpeg

    However, in WorkBench the same ID shows it is not archived:

    image.thumb.jpeg.012210dfae3187f9c1049f1bd9208c63.jpeg

    How can I use DataLab to remove/delete/archive signals?

  4. I am trying to access the 'Formula Parameters' on specific signals that I created.  I notice that if I do a spy.search to return the signals I created, when I try to show 'Formula Parameters' they are not there:

    image.thumb.jpeg.428e96ddd6b638c81101aa252f40adcb.jpeg

    However, if I do a spy.search on a worksheet, I can access the 'Formula Parameters':

    image.thumb.jpeg.38d1cf4e66ba64acabfb94d267fa4efd.jpeg

    image.jpeg.ac7dc8f87fb640d1cedad6123f1e1c02.jpeg

    Notice I am access the same signal ID in both cases.

    Is there some way to do spy.search on specific signals and have that search return the  'Formula Parameters'?

     

    image.jpeg

  5. I had an archived asset tree 'PM_SIM_AssetTree' with items in it that were not archived.  This was because of a prior error on my part.  To fix it, I used an API call to delete it.  Afterwards, the script runs each time and overwrites the existing tree

  6. What I am trying to do is create a DataLab script that will create an asset tree regardless of whether it is a new tree or an existing tree in the workbook.  Ideally I would just like to overwrite whatever tree is already there so that every time I run the script I end up with the same asset tree.

    The problem I have is that apparently every time spy.assets.Tree is used, it tries to create a new tree.  This contradicts the SPy documentation for Asset Trees 1 - Introduction, which says: 

    "Say you have an existing asset tree in Seeq, perhaps from an external datasource like OSIsoft PI AF, and you wish to clean up the tree or add calculations to it for further analysis. You can define a tree in SPy using this existing tree as a starting point by referring to it by name in the spy.assets.Tree input."

    image.thumb.jpeg.c8feb8a96fe53320dc4ce86954fadecf.jpeg

    If I try to create a reference to my existing tree PM_SIM_AssetTree using PM_SIM_AssetTree = spy.assets.Tree('PM_SIM_AssetTree', workbook=scopedtoid), I get an error saying that there is an invalid item.  The path suggests that it is trying to insert a new tree instead of creating a reference to the existing tree:

    image.thumb.jpeg.bb7c031f7dcfe816b85cdf1d44116395.jpeg

     

    It doesn't matter whether I use workbook=scopedtoid or workbook=workbook_name, I get the same result.  I know that the scopeid reference to my workbook is correct.

    What is required to do either of these?

    - detect the existence of a tree and remove it so that I can create the new one

    - create the tree everytime with overwrite if it already exists

     

  7. It did not fix it.  The "insert" and "push" copy the signals, do not move the signal.  The results is a copy of the signal without the formulas.  I do not want to lose the formulas.  Therefore, this did not work.  What I need is a way to move the signals to the designated asset tree folder and preserve all configuration

  8. Now I see!  I was assuming maxValue($SearchArea) was hard coding the search.  Your explanation makes sense: maxValue is returning a search result, but then $signal.within($ValidData) is only passing the capsules in the condition to it.  Therefore, as long as $SearchArea fully includes the capsules in $ValidData it will work.  I just need to hard code dates well before and well after any capsules I would use.

    Thanks!

    • Like 1
  9. There seems to be a misunderstanding.  I do not want to find the max for a moving window.  I want to find the max for "Data valid".  I want to specify the condition for "Data valid" and find the max for capsules with that condition.  In my case I have only 1 capsule for this condition. Whatever that max value is, I want the signal to apply for all time, like a constant.  We have accomplished creating the signal for all time, but the capsule("2020-01-01T00:00:00Z","2022-07-28T00:00:00Z") uses a fixed time period instead of the "Data valid" condition.  If there is a way to use "Data valid" instead of hard coded times, I will have what I want.

     

  10. Shamus, that is fantastic, we are really close!

    The missing piece is the capsule.  I do not want to hard code the dates in.  I would like to use all capsules in the "Data valid" condition.  In my case there is only one capsule for "Data valid", but regardless I would like that condition to determine when to obtain the max or min.  Is there a way to do that?

    image.thumb.jpeg.619d83afe69535d0fc7c358cf8ff3406.jpeg

    image.jpeg

×
×
  • Create New...