A personal repository of random information in compensation for a fatigued biological computer
Breaded Electronics / Embedded » Home made pick place SMT machine OLD pages » Pick n Place with G Code
20100815 pm
Mach3 doesnt do userdefined variable names, need to use #1 #2 etc nor can we name subs so we will go with plan B which is to generate GCode from Excel tables..
20100815
Goal / approach: Have a framework as close as possible to:
Manually before hand:
Load PCB holder calibration point (if not permanent)
All feeders first component aligned to position 1
Var PCBcount = 1
Var LastPCB = 5
While PCBCount <= LastPCB
Load 0805-10r on head 1
Load 0805-3k3r on head 2
..
Place head1 at x,y where x,y is offset from PCB origin
Place head2 at x,y where x,y is offset from PCB origin
..
Load 0805-10r on head 1
Load 0805-3k3r on head 2
..
Place head1 at x,y where x,y is offset from PCB origin
Place head2 at x,y where x,y is offset from PCB origin
..
PCBCount += 1
Next while
Heads vs camera
Work areas:
Head Selection
-------------
So to pickup the first f1c1 component we would create a function sub ie:
(Initialise)
(Head offset variables)
#<_h1_x> = 34.2656
#<_h1_y> = 19.3859
(f1c15 setup)
#<_x_f1c15> = 28.2094
#<_y_f1c15> = -4.5
#<_y_space_f1c15> = 4
#<_h1_pick_a_f1c51> = 33.5
#<_h1_place_a_1.6_f1c15> = 20
..
(Select Head 1)
0001 SUB
M09
#<_h_x> = #<h1_x>
#<_h_y> = #<h1_y>
0001 ENDSUB
(Pick f1c15)
0115 SUB
G55
G0 X[#<_x_f1c15> + #<_h_x> + ] Y[#<_h_y> + #<_y_f1c15>]
G0 A[#<_pick_a>]
(Increment y for next pickup of this component)
#<_y_f1c15> = #<_y_f1c15> + #<_y_space_f1c15>
0115 ENDSUB
..
To use the above:
0001 CALL (Select head)
#<_pick_a> = [#<_h1_pick_a_f1c15>]
(Pick f1c15)
0115 CALL
The above variables will allow us to say a simple move to the next component to be picked up