Now，I recevied the data which is changed from 0 to 2pi.
But I want the value from -pi to pi.
So I set the program " if data > pi, data = data-2*pi"
When the data <pi , the data is correct in the freemaster.
But if the data >pi , the data is big negative numbers.
Can you tell me why? how to change the data to [-pi pi]?
Any help will be appreciated.
I have found the reason.
Beacuse in the sincon block , the input theta is set to [-pi,pi].
But in my simulink, the input is 0 to 2pi.
Therefore, when the data is greater than pi, an abnormal data is displayed.