Turret Tracking with Labview and Limelight

We are having trouble getting our turret to track. I have my pictures of my code attached to the post. I’m trying to get it to move so I can calculate the offset.

Personally, what I have is a turret that runs on Motion Magic, and it takes the tx, checks whether its a positive or negative value, and multiplies it by 4096/360(the amount of encoder counts per degree). If the tx is negative, it subtracts the offset from the current position and if the tx is positive, it adds it. Hope this helps!

It seems like you are multiplying your limelight input by 0, is that just a place holder? The talon sensor that you’re using isn’t in the same units as the limelight. Is this 0 input the gear ratio between the encoder and turret angle?
When the target is beyond the range of the turret, it looks like you are setting the target position to the opposite side? This will cause the turret to move out of view of the limelight and stop sending position updates. What is your desired behavior when there is no target?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.