LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Potentiometer for angle measurements

hei! 
I have a project on making a steering system on a scale model boat. So i have a potentiometer, servo, thruster and MyRio. 
The servo spin the thruster around in 360 degrees.

The potentiometer will say how many degrees the thruster is at. 

 

i have designed a program who can take the value from the potmeter (SIN and COS) and transfer dem into degrees. So if plot the truster to go to 70 degress (setpoint) it will do that. For this i use a PID regulator.
But i have a problem when the thruster is at 359 degress, it will go a little too far and go to 1 degree. the system then reeds 1 degree and spins the truster a whole round to 359 agian, then the same thing happens and that just goes on util i change the setpoint. 
So i need something so that the program understand that when it goes to 1 degree it will not that the whole round but just go back to 359 degress. 
Does anyone have some idea on how to solve this problem? 

 

attached a screenshot of the program

Download All
0 Kudos
Message 1 of 3
(1,266 Views)

Hi,

 

you need to program a little more logic into your VI!

 

For the start it may help to prevent "wrap ups" by counting upwards with 361° instead of jumping back to 1°…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 3
(1,251 Views)

thanks, will try to look into that:)

0 Kudos
Message 3 of 3
(1,218 Views)