Jump to content

Splice could not scale the replacement signal because there are only 0 replacement samples


tai
Go to solution Solved by Kristopher Wiggins,

Recommended Posts

My power meter totalizer signa having loss sometime and it is show blank. 

i use formula $signal.replaceNotValid(0) repalce not valid to value 0.

i use value search, to identify the value 0 as error condition.

i create another new signal 1.toSignal(), plan to spliceblend it.

and use spliceblend function.  $totalizer with blank($new signal, $error condition.removeLongerThan(10min)).

but end up result still the power meter totalizer with blank.

 

the warning message as below.

3 warnings: Splice could not scale the replacement signal because there are only 0 replacement samples in the capsule. At least two are required. Click the wrench icon to open the formula editor

Capture.PNG

Link to comment
Share on other sites

  • Seeq Team
  • Solution

Hi tai,

As noted in the error, the issue is due to you not having data during these error windows. By default, the .toSignal() function places samples every 1 day and since your error condition tends to last less than a minute, the .toSignal() may not have samples during this window. To fix this, you can supply a time parameter into .toSignal() to have a more frequent sampling. For example, 1.toSignal(10s) to have it samples every 10 seconds.

Some other things you may want to consider are

  • For your error condition, rather than just making a value search on when the value is 0, also restricting it to past data. replaceNotValid will also place results in the future when there isn't data but appending .within(past()) to your "replace error power totalizer" should only show these 0 values for past data
  • validValues() is another useful function when you run into data gaps. It "connects the dots" by ignoring the gaps and connecting samples if they're within the maximum interpolation of the signal. You can change this interpolation using .setMaxInterpolation(time_input)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...