Jump to content

adding 2 signals, when one signal shows no value, result is missing


Recommended Posts

Posted

Hi there,

I used $a +$b to add 2 signals, what i find weird is that when one of the signal is 0, the other has value, the result is still 0.

I only the sum result at a time when both signal has values. 

How can I fix this?

Thank you

  • Seeq Team
Posted

Hi Felix-

To do this, you will need to replace the missing data gaps in your signals with 0.  This can be done by following the steps in the following forum post: 

Please let me know if you have any additional questions.

Thanks,

Lindsey

 

  • Like 1
  • Seeq Team
Posted

Felix,

Please let me know if this is the problem you have:

Here is the result of adding two signals when one of them has gaps in it: 

image.png

 

Solution

Step1: Identify the gaps in Signal1 using the following formula: 

  • $s1.isNotValid()

image.png

Step 2: Substitute the gaps in Signal1 with zero using the Splice function: 

  • $Signal1.splice(0.tosignal(),$Gap)

image.png

Step3: Use the newly created signal(Without gaps) and add it to the second signal:

  • $Signal1NoGap+$Signal2

image.png

Please let us know if this answers your question. 

Thank you

 

 

 

 

 

  • Like 1

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...