|
From: Viesturs L. <vie...@gm...> - 2011-11-17 23:03:13
|
2011/11/17 Francesca Sca <fan...@ya...>: > Viesturs wrote: > > >>Then there is very nice way to solve it: >>Use mux2 and limit3 components: >>Mux2.sel pin should be the open/close command (can be driven from >>g-code, if linked to spindle or coolant on/off HAL pins), mux2.in0 and >>mux2.in1 should be stepgen positions, when gripper is closed and open. >>Link mux2.out to limit3 input, set acceleration and velocity limits in >>limit3 and link limit3 output to stepgen pos-cmd input. > > > You can explain me better this? Which are the right lines that I must add to my .hal file? You will have to do some reading to understand, what You have to do in the HAL file. My idea is to use mux2 and limit3 components to control the stepper motor of the gripper. http://gnipsel.com/emc2/html2.5/man/man9/mux2.9.html The way mux2 works: mux2.n.out = mux2.n.in0, if mux2.n.sel = false mux2.n.out = mux2.n.in1, if mux2.n.sel = true Attach the mux2.n.sel pin to open/close command and set mux2.n.in0 and mux2.n.in1 values to stepper motor positions that correspond to gripper being closed or open. Using limit3 will let You set the acceleration and velocity for the stepper motor easily. http://gnipsel.com/emc2/html2.5/man/man9/limit3.9.html Viesturs |