Jump to content

David Edelman

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by David Edelman

  1. Hi John - thank you for the expansive detailing on this solution.  Do you know if any updates have been made in R61-R64 that would better support large asset trees? We have about 500 instruments and 10 calculated signals from a PI Asset Framework hierarchy that we would like to expose to Power BI. Is your technique above still the only way to scale it across the entire tree?

    Thanks, David

  2. We have string-type signals that show the current operating mode. On the historian, these signals have a compression setting of 8 hours, meaning a new value is written no later than 8 hours after the previous value was written. So during any 12 hour period, there will be 1 or 2 values written to the historian even if nothing has changed.

    We are trying to count the number of changes to the string signal during a 12 hour period. For numeric signals, we can use 

    $signal.remove($signal.runningdelta() == 0)
    .aggregate(count(), $capsule, durationkey())

    This makes sure that if the numeric signal (also with a compression setting of 8 hrs max) does not actually change during the 12 hour period, that data point will not count.

    Is there an equivalent way for doing this with string signals? 

    Thanks, David

  3. Hi Kris - 

    I worked with Katie P. during office hours and it seems that the error message was getting thrown because my Unit_00 had no elements under it, but the rollup was created correctly for those Unit_XX branches that did have elements under them. It seems it was just a warning message.

    Thanks, David

  4. Trying to do a rollup calculation on an existing asset tree from PI AF, but I can't get the roll_up_parameters value to be something that the engine recognizes.

    DCS_Cont_Tree = spy.assets.Tree(data = '0EE7E6A5-A74E-EEF0-AF7C-06C2A34ADF5A')
    
    DCS_Cont_Tree.insert(name = "PV Range High",
                    formula = '$signal_a + $signal_b',
                    formula_parameters = {'$signal_a' : 'SP', '$signal_b': 'PV_Hi_Deviation'},
                    parent = 4)
    
    DCS_Cont_Tree.insert(name = "PV Range Low",
                    formula = 'max($signal_a - $signal_b, 0)',
                    formula_parameters = {'$signal_a' : 'SP', '$signal_b': 'PV_Lo_Deviation'},
                    parent = 4)
    
    DCS_Cont_Tree.insert(name = "Too High",
                    formula = '($signal_a > $signal_b).merge(0min).removeShorterThan(10min)',
                    formula_parameters = {'$signal_a' : 'SP', '$signal_b': 'PV Range High'},
                    parent = 4)
    
    DCS_Cont_Tree.insert(name = "Too Low",
                    formula = '($signal_a < $signal_b).merge(0min).removeShorterThan(10min)',
                    formula_parameters = {'$signal_a' : 'SP', '$signal_b': 'PV Range Low'},
                    parent = 4)
    
    DCS_Cont_Tree.insert(name = "Nonconforming",
                    formula = '$signal_a or $signal_b',
                    formula_parameters = {'$signal_a' : 'Too High', '$signal_b': 'Too Low'},
                    parent = 4)
    
    DCS_Cont_Tree.insert(name = 'Unit Total',
                        roll_up_statistic = 'Counts',
                        roll_up_parameters = '/.*x.*/ >> Nonconforming',
                        parent='Unit_??')
                      
                      

    For the last command I get "Roll up parameter "/.*x.*/ >> Nonconforming" does not match any items in the tree."

    I have tried various types of regex that I know of and nothing has worked. I have also tried creating "Nonconformance" as a signal with no luck.

    My tree looks like this

    image.png.a09d90177768eb122dae9ae182f05a1b.png

    The children of the Unit_XX level have similar names, but not quite the same. The only thing that is definitely the same among them is the presence of an 'x'. There could be 3 or 4 characters before the x and 5-6 characters after the x. Some of the Unit_XX members have no children in this AF asset tree.

    What am I missing?

     

    Thanks, David

  5. I have engineers that want to see two signals that are inversely proportional to each other on the same lane, but with one of them going low (top) to high (bottom). 

    So in the attached plot, we want the pink signal to match the shape of the other two. Other than altering the pink signal such that it is showing "negative" values, I can't find an easy way to invert an axis.

    Any help appreciated.

    Thanks, David

     

    invert.png

  6. We are iteratively building PI AF structures and PI Analysis calculations over several hundred signals. When we backfill the calculations for the year, we have to "Clear Cache" on each signal individually to see the updated results.

    Is there a way to clear all cache, either per user, per workbook or across the entire environment?

    We are on R61.1.9-v202310161755, SaaS version, reading from OSISoft PI and OSISoft PI AF

    Thanks, David

  7. I am attempting to overlay a numerical value (wind direction in deg from N) with the cardinal directions (N, NNW, NW, etc). I have used the toStates() function with "group" to convert the number into a string, but I cannot get the Y-axis for the string value to "line up" with the numerical value (or vice versa). See attached image.

    Is there a way to change the size of the axis or otherwise get them to line up as indicated by the arrows?

    Thanks,

    David

     

    2023-03-29 08_56_58-Window.png

  8. I have a signal that gives the wind direction in degrees from North (0-360). I want to convert a range of values to a cardinal direction, so I used "toStates" with a custom group to do so

    $wind_dir = group(
    capsule(0, 22.5).setProperty('Value', 'N'),
    capsule(22.5, 67.5).setProperty('Value', 'NE'),
    capsule(67.5, 112.5).setProperty('Value', 'E'),
    capsule(112.5, 158.5).setProperty('Value', 'SE'),
    capsule(158.5, 202.5).setProperty('Value', 'S'),
    capsule(202.5, 247.5).setProperty('Value', 'SW'),
    capsule(247.5, 292.5).setProperty('Value', 'W'),
    capsule(292.5, 337.5).setProperty('Value', 'NW'),
    capsule(337.5, 360).setProperty('Value', 'N')
    )
    
    $w0wd.toStates($wind_dir)

    This formula works, but the Y axis is sorted alphabetically (W, SW, SE, S, etc). Can I force a particular sorting (N, NE, E, etc) or is there a different/better way to implement the above?

     

    Thanks,

    David

  9. I am pulling in a relatively noisy signal, and trying to get a feel for how many raw data points I am looking at (to compare with how many points I see after several transformations). However, the "Count" column on the "Tables and Charts" view is way off of the number of records I get if I export that signal through "Import/Export" to Excel.

    For example, for a signal shows "Count" of 2,343, but when I export that signal to Excel, there are 14,580 timestamps with a value. Even if I remove duplicates (thinking it is a distinct count) there are 3,908 values.

    Is there something I need to do on the Seeq side to get an accurate count of the data points?

    Thanks,

    David

  10. Hi - 

    I am new to Seeq but have completed the Foundations course. I am trying to calculate the average of a signal over a 12 hour period. Since "Periodic -> Hours" only produces one capsule per day, I created 2 conditions, both Periodic -> Hours (12), with the second ($Second12h) offset from midnight by 12 hours. I then was able to calculate the average with this formula, averaging the 12 hour averages

    average(
    $signal.aggregate(average(), $First12h, startkey()),
    $signal.aggregate(average(), $Second12h, startkey())
    )

    Is there a more elegant way of doing this? I actually want to shrink down the periods to 6 hours or lower, so trying to see if I will need to create a large number of conditions (24/x conditions, where x is the length of the period in hours)

     

    Thanks!

    David Edelman.

×
×
  • Create New...