|
Re: Help with sevo programming
So if I understand you correctly you want the camera pan -10 degrees when button 3 is pressed, pan +10 when button 4 is pressed, and return to zero degrees when the driver lets go of either button? If this is indeed what your after then all you need to do with the code from your last screen shot is this. For each axis you have 2 case structures, drag a new case structure around both of them so that they are nested inside the true case, then wire a branch from each button to a boolean OR to the trigger of that case structure. what that does is once either button is pressed it allows the value of whichever button was pressed to be passed to your current code. then in the false case of the new case structure use a servo set angle to 0. so that when the button goes false (released) the servo returns to zero. the reason you cant just add it to the false cases you already have is that when you press button 4, button 3 is still false and commanding 0, while button 4 is commanding 10, you can see the conflict right? I don't have labview here so I can't take a screen shot. hope this helps.
|