Jump to content

Recommended Posts

Hi All,

I've got few Scaler values in my data-set (E.g High,On,OFF) , I have convert all of them into Capsule by toCapsule() Function.

Now wanted to remove only those capsules which are having "OFF" Status.

Regards,

Jitesh Vachheta

Scaler_Values.jpg

Edited by Jitesh Vachheta
For Missing Tag
Link to comment
Share on other sites

Hi Jitesh,

you can achieve this by filtering the values with the filter() function:

$stage.toCapsules().filter($x -> $x.getProperty("Value") != "OFF")

You should think of using toCondition() instead of using toCapsules(), as toCapsules() generates a capsule for each interval between recorded points even if the value stays the same. You can see this in the Capsules window of your screenshot. By using toCondition() you will get only one capsule per change of value:

$stage.toCondition()

image.png.12d5f14b06a2f090f05b6b907aa9bd39.png

If you want to filter the results of toCondition() you have to specify a maximum duration for the capsules before using filter():

$stage.toCondition().setMaximumDuration(1wk).filter($x -> $x.getProperty("Value") != "OFF")

Regards,

Thorsten

 

 

  • Thanks 1
Link to comment
Share on other sites

Hello Jitesh, 


Another option to filter the OFF condition would be to create a Value Search for when your compressor is OFF, then create a composite condition between the OFF condition and the Compressor Stages Conditions to only output when your compressor is on Stage 1, 2 or in Transition (You can achieve that by using the outside logic). 

image.png

 

Use this new condition as the input into your histogram. 

 

image.png

 

Finally, I agree with @Thorsten Vogt suggestion to use tocondition() instead tocapsules(). 

Hope this helps.

Danilo

 

 

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