I would like to ask you about how to write functions in function blocks. The manual explains that it follows the C syntax. But it is not clear how.

I want to use a function block to calculate the angle between variables dq. I tried to write the function this way but it is not adequate. It divides by zero, and that is what I try to avoid by using relational and logical operators, but I do not know how to write it.

**(abs(u[2]) > 0.01) * ((asin(u[1]/u[2])) * (180/pi))**

Help please.

Thanks

Juan

Thanks again,

Regards

Juan