current manual workflow to setup a new part type:
1. add a AdvancedLoosePartFeeder
2. jog to start desired XY position of the part supply tray
3. configure the AdvancedLoosePartFeeder locations and vision feed pipeline after training pipeline.
4. go into the machine.xml and copy the feeder block of code for the AdvancedLoosePartFeeder I just made.
5. on a separate file I paste the feeder code 192 times and change the XY values to cover the entire supply tray that's 120 x 320 mm.
My field of view is only 20 mm x 10 mm, and I am picking tiny loose SMD components. Yes I know I can change my field of view by repositioning my camera but that's a lot of re-configuring of everything the camera position affects.
Started reading into scripting then used chatgpt to help me try to automate this. Was able to add a new AdvancedLoosePartFeeder. Then error after error with code chatgpt tried making. poor chat good try. Conclusion was scripting can't set the feeder x y settings or the vision pipeline settings? Can it? if so how?!?!?
I was able to make a script to enable all the 192 feeders to start a new board, that was a win!!! Scripting is great!
Any help is appreciated and suggestions are welcome.
I attached the machine.xml for reference.
script code chatgpt made:
var AdvancedLoosePartFeeder = Java.type("org.openpnp.machine.reference.feeder.AdvancedLoosePartFeeder");
// Step 1: create feeder
var f = new AdvancedLoosePartFeeder();
// Step 2: give it a name
f.setName("Feeder_Test");
// Step 3: add to machine
machine.addFeeder(f);
Thanks,
Fernando