Quote:
Originally Posted by Greg McKaskle
I think that if you look at the Rectangle processing, it has already defined the X and Y position to be in the range of -1 to 1 to be more like a joystick. Unless that code has been removed, subtracting 320/2 doesn't make sense.
Greg McKaskle
|
Then what about comensating for the pixel offset as mentioned?
Quote:
|
Originally Posted by plnyyanks
In LV, there's a PID palate, and you place PID.vi onto your block diagram. You will want to wire the offset between the center (x) of the target and the center of the image (
Code:
Code:
offset = xCenter - (xResolution/2)
) as the process variable to the PID controller, and put the setpoint at 0 (you want the center of target to be exactly in the center of your image).
|
This post clearly states there must be an offset created and it makes sence. If there is no offset then how would the PID controller know the error and hence how to correct for it?