I've solved it
1. Synchronization problem of gantry and conveyor belt, use an external encoder to record the position of the conveyor belt
I want to use vision to determine the location of the item, and I can achieve this too.
When items are placed on the conveyor belt, they will continuously place items on the conveyor belt. My camera and program will also constantly collect images to calculate the location of each item.
I can generate G code to control its running.
But I can't solve multiple G-codes at the moment (the continuous stream of items are placed on the conveyor belt) when will they start running
Ideally, the running signal of each G code is triggered by the encoder position.
But I don't have a good idea to achieve this. Does anyone have a better solution or idea?