Matthias Posted November 25, 2021 Posted November 25, 2021 Hello everybody, I have a signal (e.g. of a valve) that is 1.0 for being open and 0 for being closed. I would like to calculate the percentage temporal progress of this signal during the 1.0 period. Please refer to the figure I added. -> In the end I would like to create a signal that shows me the temporal percentage progress every time the signal valve opens (i.e. the signal becomes 1.0). Thank you. Regards Matthias
Thorsten Vogt Posted November 25, 2021 Posted November 25, 2021 Hi Matthias, you can try this: First, calculate the duration of each capsule using "Signal from Condition" tool: Then you can use timesince() to calculate the percentage value over the duration and also splice() to insert it into the base signal of 0% everytime the condition is met: 0%.splice(timesince($condition.removeLongerThan(40h), 1min)/$duration, $condition) Did I understand your question correctly? Regards, Thorsten 1
Matthias Posted November 26, 2021 Author Posted November 26, 2021 Great Thorsten! Thank you. This is exactly what I need. Regards Matthias
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now