# Andrew Fontenot

Members

26

4

1. ## If logic to differ between conditions

Are you wanting to train the reference profile on different time based on the grade in production? I don't believe you can do that currently. You would have to build different reference profiles and splice them together, and you could do that in a single formula to make it easier to manage. I can work up an example if that is what you are trying to do. Andrew

3. ## Scatterplot and Combined Conditions

Hey Abby, I was able to reproduce your issue, and it seems it is due to the way Seeq creates the Step trend, it is placing two values at each point in time a new value occurs to create the stepped transition. I was able to fix this by using Formula to create two new signals which are discrete. \$x.toDiscrete() I still used the original stepped values to create the In Range/Out of Range conditions, but used the discrete values to display on the scatter plot. My limits are 0 - 4 for Y and 40 - 50 for X. Here's the before and after. Hope this helps, Andrew BEFORE AFTER
4. ## xyTable Function

xyTable does return a table. According to the error though, the Formula tool cannot. It looks to me like the functions that return Tables are mainly used underneath the hood to create histograms. But I agree, I'm not sure why formula can't return a table either.
5. ## Capture deviating asset from average temperatures after cleaning all signals

I think the problem you will have with this analysis is creating the average of all bearing temperatures. The only way I know to do it is to use Formula and add every bearing temperature using the formula... average(\$signal1, \$signal2, ...) This will be very time consuming. If instead you could use each bearing temp's daily average as a reference or some other statistic that is relative to each particular bearing temp or some other constant, then this will become much easier. I'm assuming you are using an asset framework where each asset has a signal called 'Gearbox Temperature HSSNDE'. Start with any one temperature signal in the display. Use the formula tool to create a new signal with only values that meet your threshold. Do this using the .keep() function \$signal.keep(\$sample -> \$sample.value() > 1.0) Now use Identify -> Value Search to identify a condition where the temperature exceeds your limit. Make sure to ignore capsules shorter than 10 minutes to meet your requirement. Finally, use Table View to create a table with each Asset and how many capsules occur (number of capsules from the previously created condition). The asset table feature is a newer feature, so you may need to have the appropriate version of Seeq, I'm not sure when it was added. I know this doesn't deliver exactly what you're asking for, but hopefully it will get you started. Andrew
6. ## Differencing / differentiating discrete values to assess changes in averaged values over different batch runs.

To get the difference between adjacent discrete values, I would use the following formula... \$signal.toStep(2d).runningDelta() the runningDelta() function requires a continuous signal, so the signal must first be converted to a continuous signal using to toStep() with the included maxInterpolation parameter. The maxInterpolation must be large enough to span the time between to adjacent batches. You could then convert the delta signal back to discrete if you'd like with toDiscrete(). If you want to calculate slope, you'll also need to the time between each value. There are probably many ways to do this, but I converted the discrete value to a condition using the following formula... \$signal.toStep(2d).toCondition() I then used Signal From Condition tool to output the duration of each capsule as a signal name 'Condition Duration'. I now have two signals at the same time, Delta and Condition Duration. I used the formula tool again to calculate slope as rise/run or Delta/Condition Duration. Hope this helps, Andrew
7. ## Time format and multiple CSV import

That makes sense. There are many different formats the DateTime can be in, but to my knowledge, you must provide a single column with a DateTime. Perhaps a Seeq engineer knows of a way.
8. ## Time format and multiple CSV import

The csv must contain one DateTime column if importing Signals, or two DateTime columns (Start and End) if importing conditions. If you open the csv in excel, you can simply sum the Date and Time columns to get a new DateTime column. As the error states, one example of this is row 7 which has a value of 11:00:43. This is only a Time, Seeq requires a DateTime such as 9/28/2021 11:00:43. Hope this helps, Andrew
9. ## xyTable Function

You should be able to just use the built-in prediction tool under Model & Predict -> Prediction. If there is a delay in the off-line samples and you need to move the signal in time by a constant amount, you can use the \$signal.move() function in a formula to create a new time-adjusted signal for use in the Prediction tool. The Prediction Model section of the Prediction tool will show you information regarding the regression such as rSquared, p-values, etc. The Prediction tool should take care of creating the value pairs from the input signals, perhaps a Seeq Engineer can give more specific info on this if needed.
10. ## xyTable Function

So what is your objective, what signal/scalar/condition do you want to the formula to output? xyTable will produce a table of value pairs for your two signals, what are the next steps required to produce the signal/scalar/condition?
11. ## xyTable Function

That's exactly what the formula does, it returns a table, but this is different from the Table View in Seeq Workbench. It's purpose is not to create a graphical table in Workbench. If you are trying to create a graphic table of samples, I'm not sure if this is your objective, you could use Table View in Condition Mode to do this. One way, would be to create a Score Card Metric for each signal and specify the rolling window for which you'd like a value in your table. Here's an example.
12. ## xyTable Function

What are trying to accomplish? This formula returns a table, but Seeq expects a condition, formula, or scalar so I imagine you are seeing the bad response error because of this. xyTable(capsule('2021'), \$a, \$b, 100) is the correct syntax, but you can't return a table.
13. ## xyTable Function

See capsule() in the formula documentation.
14. ## How to create a 'signal from condition' using formula tool

You could also create the signal in Seeq using the Signal From Condition tool, then select Item Properties for that signal to view the formula. You could do the same for the condition referred to in the formula and replace \$capsules with the condition's formula.
15. ## AF Event Frames Connector AddToAssetTree Obsolete

I noticed that AddToAssetTree and AssetPath properties of the AF Event Frames Connector are obselete as of R51+, according to the knowledge base. Is there now an alternative method to adding a condition from AF Event Frames into the a particular element of the asset tree? I'd like for a specific AF event frame condition to show up in the Data pane for a particular asset, without having to explicitly search for it. Andrew
16. ## Metric Calculations

Awesome. Happy to hear!
17. ## Metric Calculations

I believe the unbounded error is because the original code creates conditions for >=0 and <0 with no maximum duration. You can change \$gte and \$lte to have max durations and this may fix the issue. \$gte = (\$delta >= 0).setMaximumDuration(7d) \$lt = (\$delta < 0).setMaximumDuration(7d) In your example, the reversal count will not count 3, it will count one. Let's transform your example as runningDelta() would and assume the previous value was also 5. 5 -> 5 -> 10 -> 15 -> 10 becomes 0 -> 5 -> 5 -> -5 Now let's identify the gte and lt conditions. We would see an \$gte {0 -> 5 -> 5->}, and an \$lt at {-> -5}. Use our formula and the result would be 1 reversal. However this does bring up a potential issue. If the example had another 10 at the end, the delta samples would become 0 -> 5 -> 5 -> -5 -> 0 and that would create an additional \$gte capsule at the very end, resulting in 2 reversals. You could fix this by change the \$gte to only greater than instead of greater than or equal zero. Thanks, Andrew
18. ## Metric Calculations

If you'd like to make the number of samples consistent over time, I'd use the resample() function in a formula. \$signal.resample(1min) If you pass resample() a period such as 1min, the result is a signal that will have a sample every 1 minute, regardless of the input sample frequency. To compute the error, I would create a new signal which is the difference between PV and SP. Then create a periodic condition for which you'd like to sum up this value and use the 'Signal from Condition' tool to sum the new signal over the given condition. To count the number of values in a period, use the 'Signal from Condition' tool to count the number of samples in your signal using whatever periodic condition you'd like as a bounding condition. For the number of reversals, I'd first use .runningDelta() to create a running delta signal of the signal you'd like to count the number of reversals for. I'd then create a condition using the 'Value Search' tool for anytime the delta signal is greater than or equal to zero, and another condition for anytime the delta signal is less than zero. Then, using the same method as above, create a periodic signal over which you'd like to calculate the number of reversals and use the 'Signal from Condition' tools to count the number of capsules within a given period. The total number of reversals should equal the number of >= 0 capsules plus number of <0 capsules minus 1. You could do this all in one formula if you'd like. \$delta = \$cv.runningDelta() //Conditions when delta >= 0 & < 0 \$gte = \$delta >= 0 \$lt = \$delta < 0 //Condition when to total the number of reversals \$period = periods(10min) //Signal for total number of \$gte/\$lt conditions \$gteCount = \$gte.aggregate(count(), \$period, startKey()) \$ltCount = \$lt.aggregate(count(), \$period, startKey()) //Signal for total number of reversals \$reversals = \$gteCount + \$ltCount - 1 //Output the reversals signal with Step interpolation \$reversals.toStep() And here's some of the outputs. Andrew
19. ## Arithmetic Series in Formula

I'm in the same situation Mike. I don't see anyway around this if you try to use the exponentialFilter function. The error is because .toScalars() returns a Group of Scalars, not a single scalar. I got around that by calling average() on the Group:Scalar, still to no avail, the function still wants it to be a constant.
20. ## Combining disconnected discrete data trends using last good values

We have similar issues with some tags. In our case, the tags are already Step tags but still have gaps that are smaller then the max interpolation setting. In this case, we use \$signal.validValues formula to achieve exactly what you've described.
21. ## Search and Display SEEQ signals/KPIs for related AF assets

Bharat, Depending on how you're assets are organized in AF, you may be able to use the TreeMap view. From the documentation, "Treemap is a monitoring tool that may be leveraged by those that use an asset tree structure, such as PI Asset Framework. Treemap compares a plant's similar assets and identifies when user specified conditions occur. This tool allows users to quickly gauge the performance of an asset relative to other, similar assets." We use this method to monitor for deviations between redundant flow meters on dozens of different assets. In our case, we developed two conditions which identify Hi and HiHi deviations throughout the day. Then, in TreeMap view we see each related asset and whether there was an identified Hi or HiHi deviation during the selected time range. Each block representing a different asset is colored based on whether there were Hi or HiHi conditions found. By clicking on the TreeMap block, Seeq will then display a trend of that particular asset and it's underlying process data. You can also display a couple different signal aggregations during the conditions in each block, so we show maximum deviation values for each meter. It's not a perfect solution, but I hope this helps, Andrew TreeMap - https://seeq.atlassian.net/wiki/x/IQABHQ
22. ## Excel Export Summary Improvements

Include signal values for Start/End of each capsule in capsule summary. This may also take care of number 2 Include string signal values at Start/End of each capsule in capsule summary. Include capsule properties and values in Information tab
23. ## Chemical Usage Report

I've faced similar issues. You may find it more accurate to take the opposite approach. If the error you are seeing is due to the totalization of all the decreases, you could instead totalize the increase and add that to the difference between the starting/ending amount. Example: Calculate amount used by subtracting the ending amount from the starting amount over whatever time span you'd like. Let's say it's daily and at the start you were at 1000lbs and the end you were at 500lbs plus you totalized an increase period (delivery) during that day of 250lbs. Your daily usage would then be (start - end + delivered) = 750lbs. Andrew
24. ## SQL Connector V2 Condition Incorrectly Shows "In Progress"

I understand the uncertainty aspect, but showing a capsule which does have an end time as "In Progress" is not correct. Thank you for the information.
25. ## SQL Connector V2 Condition Incorrectly Shows "In Progress"

I have successfully setup two (MS SQL) condition queries in the SQL Connector V2 JSON file. When I add these conditions to a trend, the last capsule shows "In Progress" in the Capsules table although the SQL does return an end date for this capsule. The capsule at the top of the trend does end at the correct time, but it is hollow as if the capsule is in progress. Any help on this would be appreciated, Andrew
×