Trigger for calculation
Hi all,
I need to trigger a calculation based on the divergence of two signals, basically as soon as the signals begin to diverge I need to perform a calculation based on the values .2s before and .2s after the divergence.
Can anyone suggest a way to automate this? I am not sure what kind of trigger is best!
Thanks!
Project Manager
Dear John,
It is possible to automate the event calculation that you have requested, but I would need some more information to help you better.
Does this event happen only once and you stop storing after, or does it happen more frequently and you want to calculate values after each time? Do you want to store only the calculation and you do not want to store all the data before or after? Or maybe this event happens in an undefined time during storing and you want to store the data before and after, with simple calculation in between?
In short, can you please specify your problem a bit more in detail, so we can see if the math formula or any function will suit this problem better?
Best regards,
Aljaž Blažun
Hi Aljaž,
There are two events that we need to evaulate at the same time. The first occurs only once, the second is continuous. We will be storing all data throughout the test.
The first event is the point at which the ground speed of a vehicle begins to diverge from the wheel speed, this is the trigger. The evaluation is simple, average deceleration within a .4s block, (.2s before trigger and .2s after) divided by gravity.
The second is a little more complex as we need to calculate the amount of time from the trigger point (in this case a simple digital IO) where the rotational speed of an axle differs by more than 5% from the ground speed of the vehicle, this is to be performed continuously until the ground speed falls below 60km/h and then the total period in which the axles speed was below 95% of ground speed is divided by the total time from trigger to 60km/h. Please see the attachment for a more thorough explanation
Attached files:
Project Manager
Dear John,
There is a function inside the math formula that would suit you. It’s called Stopwatch. You define the start and end trigger and it outputs the time difference between them. You can learn more about it using the following link: https://manual.dewesoft.com/x/setupmodule/modules/general/math/formulaandscript/formulaeditor/examplestopwatch. There are also other functions that might help you. Their description and examples can be found here, under Measure: https://manual.dewesoft.com/x/setupmodule/modules/general/math/formulaandscript/formulaeditor/operatorsandfunctions.
Best regards,
Aljaž
Thanks Aljaž, just looking at the stopwatch function, is there a way to reference another channel rather than an absolute value? e.g. start when channel A < Channel B?
Hi Aljaž, I have got it now, I had a syntax error! That is the more difficult of the calculations cracked! Now I need to figure out the simple one!
Project Manager
Dear John,
You can use any condition for triggering the start or end. At the moment, the defined condition will switch from false to true, the trigger will be activated.
Best regards,
Aljaž