Jump to content

Start and End values of a signal


Recommended Posts

Hi,

you can get the start and end value the following way:

1. Import data from CSV and create a capsule for complete range of data by doing a simple Value Search:
image.thumb.png.763e981128e6f07938590d8f17f744d8.png

2. In order to get only the first and the last value of the imported data create another two capsules that represent a small interval just after start and just before end of the capsule created in step 1. 
image.png.7e68a3f96418d920aa7e8424182f7003.pngimage.png.1b1be987434cbd8c20dff2a1dcd6ac10.png

3. Use the "Signal from Condition" tool to calculate the start and end values:
image.png.cbd7c9b747fe602d0822f70d6562d804.pngimage.png.727b7822bcc77c7cacd27672d11539d0.png

You could also skip step 2 and use the capsule created in step 1 inside step 3 as the bounding condition. But then you have to specify a maximum duration of the capsule which may decrease performance.

Regards,

Thorsten

 

 


 

Link to comment
Share on other sites

  • Seeq Team

Hello,

You can use the pick() function to find the value at or just before now.

The below formula will pick the last sample value of a signal that exists within a capsule created from 1 day before now, to now. The result is a scalar showing the value at now.

$signal.toScalars(capsule(now() - 1d, now())).pick(-1)

To select the sample value just before now, change the pick() function in the formula.

$signal.toScalars(capsule(now() - 1d, now())).pick(-2)

The scalar value given as the result of this formula will continue to update as new data comes in and updates the current value.

Regards,

Emily

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...