10-06-2015 05:30 AM
Hello again, i have some doubts that i hope you can help dissipate.
I need to develop an algorithm capable of centering a reference pattern under a camera (by the way, i have the Vision Library). To centering the pattern i can control two motor that move two axis (x and y); the message that i can send to the motor permit me to control the distance that a single motor can travel in a single shot (distance and velocity, it's simplified G Code).
The better solution is to calibrate the system and transform pixel's coordinates in mm's coordinates and then program the motors to travel the right distances. But what if i can't go this way? I've been thinking on PID controller but i'm not sure if i can make it works in this case.
Any help would be appreciated, thank you very much.
Francesco.
11-16-2015
08:42 AM
- last edited on
06-04-2025
01:29 PM
by
Content Cleaner
Hi Francesco,
I don't know if you still are in trouble.
I think the better solution is to calibrate the image with a grid and later you will acquire the x and y axis position in millimeter. Later you pass the information to the driver which controls both motors and you can elaborate a PID or whatever the driver allows you.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LXhSAM&l=en-US
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8pXSAS&l=en-US
https://www.youtube.com/watch?v=rv_3bUnS1pE
https://www.youtube.com/watch?v=eWqq65ZZ0NQ
Good luck and enjoy!
11-17-2015 01:16 AM
Thank you Daragor. I've managed to do it in another way but i think that the links that you give me are still useful so: thank you again!!