Trigger a symmetrical Time signal for Angle Sensor Math

  • Software
  • Trigger a symmetrical Time signal for Angle Sensor Math
Daniel Steinshorn

Posted on 26.05.2025 14:08

Hi together,

right now i am in a bit of a "how can i do this rather simple thing" situation.

Imagine you have a Pistion drive and you measure at the lowest position with the inductive proximitiy sensor how close it is.

--> From this information i want to create the 360° angle-information (amplitude is not really of interest) for an evaluation.--> it should be pretty precise to find the correct low point. --> Therefore the exact Phase Information.

--> The Angle Sensor Math obviously works really great here.


But there is a problem:

--> In my case i only have a rising flank trigger which i have to set very close to the high point.

--> When using different speeds the mechanic changes its proximity, and the amplitude therefore our Raw signal.

--> I try to trigger to the very tip of the signal --> But i will always have a very slight offset in time and therefore in Phase. (See Black Trigger to Purple raw signal)

--> If i increase the Speed, the ampltiude of the raw signal rises (because of mechanical stiffness)

The higher the speed the more wrong the Phase gets.

So there is a constant insecurity and adjustment needed..


So here i want to find the time at the max value, and than create a 0 - 360° Signal out of it. And i have not found a great way, apart from adjusting the Trigger level as close as possible.


So does anybody have an idea how to maybe set the rising and the falling flank symultainioulsy (--> and then get the middle of it (so the real high point) as the trigger start point.

? i thought how hard can it be.


I thought about using a derivative of the time signal, but that does not work great to trigger on .... (especially since my signal has a negative overload, when out of proximity --> derivative is 0 aswell, which i would be triggering on....)


Has anybody any idea? See attached File as a testbench.


Best regards

Daniel






Staš Jevševar

Posted on 28.05.2025 12:04

Dear Mr. Steinshorn,


thanks for a thorough explanation of your issue. 


I've created a Math channel called "Peak" which outputs 1 at exact time of peak value, which we can then use in Angle sensor calculation.


It's an "if" statement that will output 1 if all conditions are satisfied, otherwise 0. 

Condition parameter uses logic like "and", "or" which return TRUE (1) or FALSE (0) depending on values. 


Below is exact math channel with "if" statement I made. 

1. 1 Condition in red square: It will return TRUE if measured value 'iNDUKTIV'.data(0) is above a specific value. (here 1, feel free to change). 

This is for removal of false triggers where values are almost 0.

2. 2 Conditions in green square: If current value 'iNDUKTIV'.data(0) is bigger than previous value 'iNDUKTIV'.data(-1) and is also bigger than the next one 'iNDUKTIV'.data(1) it will return TRUE.


When all conditions are met "if" function will return 1, otherwise 0.


Now we input this into angle sensor calculator for angle calculation. Use 0,999 as trigger to pick up the 1 that "if" statement from "Peak" math channel returns .



I think this setup will work like you want. I've also attached the modified .dxd file. 


I hope this is satisfactory for you and do not hesitate to ask any further questions.


Best regards,

Staš Jevševar

Customer Support Engineer

Login to reply to this topic. If you don't have account yet, you can signup for free account .