Hello, gentlemen!

I need a little help understanding, what is wrong with the HAL config.
Some background info:
Machine with 2 spindles (one moved by XY, the other - by UV) and
stepper motors, running EMC2.4.6

Machine has to be able to move each spindle independently, but vast
majority of parts involve the same exact movements of both spindles.
Since UV plane does not support G2/G3 movements and splitting arcs in
small linear segments slows the actual feedrate below acceptable
values (the tool burns the wooden material), I came up with a plan to
assign stepgens of both joints of the second spindle from UV to XY in
HAL. That looks like this:

In main HAL file:

# mux2 components for synchronizing both spindles
loadrt mux2 count=4

addf mux2.0                                     servo-thread
addf mux2.1                                     servo-thread
addf mux2.2                                     servo-thread
addf mux2.3                                     servo-thread

# X position command and feedback
net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
net emcmot.00.pos-cmd =>
hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd mux2.0.in1

# Y position command and feedback
net emcmot.01.pos-cmd <= axis.1.motor-pos-cmd
net emcmot.01.pos-cmd =>
hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd mux2.1.in1

# U position command and feedback
# mux2.0 routes commanded position for joint 6
# mux2.2 routes position feedback for joint 6
net emcmot.02.pos-cmd <= axis.6.motor-pos-cmd
net emcmot.02.pos-cmd => mux2.0.in0 mux2.2.in1

net sync-x-out mux2.0.out => hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd

net motor.06.pos-fb-in mux2.2.in0 <=
hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb
net motor.06.pos-fb-out mux2.2.out => axis.6.motor-pos-fb

# V position command and feedback
# mux2.1 routes commanded position for joint 7
# mux2.3 routes position feedback for joint 7
net emcmot.03.pos-cmd <= axis.7.motor-pos-cmd
net emcmot.03.pos-cmd => mux2.1.in0 mux2.3.in1

net y-sync-out mux2.1.out => hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-cmd

net motor.07.pos-fb-in mux2.3.in0 <=
hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb
net motor.07.pos-fb-out mux2.3.out => axis.7.motor-pos-fb


In Postgui_halfile:
net sync-sel pyvcp.sync => mux2.0.sel mux2.1.sel mux2.2.sel mux2.3.sel


There is a checkbox widget in pyvcp panel, which enables assigning
joint 6 and 7 stepgens to X and Y.

The problem:
1) When EMC is started up and all joints are homed, all the
coordinates are at 0.000 point.
2) When pyvcp button is enabled, all coordinates stay at 0.000 point,
but joint6 moves ~0.3mm and joint 7 also moves, but less than 0.1 mm.
3) When pyvcp button is disabled, U and V coordinates change to
values, which approximately matches the amount joints 6 and 7moved in
previous step, which tells me that the problem is in EMC config.

Can anyone suggest me, where should I look for those 2 small jumps?

Ideal solution, which I am planning for in the future, is to do this
in kinematics module, but I will not be able to get to that client for
at least few days and I have to remotely get the machine working
normally.

Viesturs

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to