Master and Slave axes in EMC2+Montec
net Xpos-cmd axis.0.motor-pos-cmd => pid.0.command => pid.3.command
net Ypos-cmd axis.1.motor-pos-cmd => pid.1.command
net Zpos-cmd axis.2.motor-pos-cmd => pid.2.command
Motors start rotation, then there is an error:
joint 3 following error . I shall be grateful to all answered.
P.S. All HAL has attached:cheer:
Please Log in or Create an account to join the conversation.
Hi everybody. Prompt please how it is possible to solve this problem. I use Motenc-Lite PCI board. My problem: it is necessary to configure axis X and axis R (A) as master and slave for gantry milling machine. In core. HAL file I have substituted trivkins on gantrykins and have written:
net Xpos-cmd axis.0.motor-pos-cmd => pid.0.command => pid.3.command
net Ypos-cmd axis.1.motor-pos-cmd => pid.1.command
net Zpos-cmd axis.2.motor-pos-cmd => pid.2.command
Motors start rotation, then there is an error:
joint 3 following error . I shall be grateful to all answered.
P.S. All HAL has attached:cheer:
Hi,
net Xpos-cmd axis.0.motor-pos-cmd => pid.0.command #=> pid.3.command (is bad pin conect)
net Ypos-cmd axis.1.motor-pos-cmd => pid.1.command
net Zpos-cmd axis.2.motor-pos-cmd => pid.2.command
#Give this :
net Apos-cmd axis.3.motor-pos-cmd => pid.3.command
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
And now, run all homing in joint mode. Homing OK? 'Yes', press the Shift key + $. (WORLD MODE)
Joint mod is only for homing axes. In joint mode does not work gantrikins effect. For the work must be switched to Word mode !!!!!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
net Xpos-cmd axis.0.motor-pos-cmd => pid.0.command
net Ypos-cmd axis.1.motor-pos-cmd => pid.1.command
net Zpos-cmd axis.2.motor-pos-cmd => pid.2.command
net Apos-cmd axis.3.motor-pos-cmd => pid.3.command
I would suggest changing Xpos-cmd and Apos-cmd to X1pos-cmd and X2pos-cmd, (or whatever suits the actual setup) simply to save confusion. It does not really matter as the first term in a "net" statement is freely-choosable to suit, not built in to emc2,
Please Log in or Create an account to join the conversation.
I have the same problem with my TRON+ and EMC2, See Link to Tron
There are 2 Motors on 2 leadscrews on X-axis in parallel.
I had a look at the available documention, esp. gantrykin module.
My opinion is, that the generated ticks and dirs have to go out for 2 motors, but unlike gantry they have to move in same direction.
So I took xyza sample config and changed it, but i am not totally sure. Do we need 3 or 4 stepgen?
My way, which results in hang up the computer, so it must be wrong.
But what is right?
XYZX Config
4 joints
3 stepgen for 3 axis
x-pos an x-dir going to the 1st and 4th joint
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
Regard,Andrey
Please Log in or Create an account to join the conversation.
Gantrykins has the second motor reversed probably just to show that it can be done..My opinion is, that the generated ticks and dirs have to go out for 2 motors, but unlike gantry they have to move in same direction.
It is easy to switch the direction of one motor, and it can be done in at least 3 ways (invert the parport direction pin, negate that stepgen scale, switch the polarity of one of the motor phases)
That depends on whether you want to be able to move the two sides of the gantry independently (auto-squaring to two home switches, for example)So I took xyza sample config and changed it, but i am not totally sure. Do we need 3 or 4 stepgen?
If you want them to be truly slaved together, then just use one stepgen and take the physical wires to two drives. (Alternatively, take the output from one stepgen to two sets of parport connections, or use two stepgens both with their inputs linked to the same axis.0.motor-position-command output)
To allow the motors to home separately then become slaved the gantrykins kinematics module is probably the best way.
The problem in your config is in the INI file. COORDINATES=XYZX is not a valid configuration, your machine is just XYZ. (you might have 4 actuators, but you only have three degrees of freedom)My way, which results in hang up the computer, so it must be wrong.
Also, you define [TRAJ]AXES=4 and setup the parameters in the INI file, but then don't use the extra axis in your HAL file.
Assuming you want to use gantrykins (which is how your HAL file is set up) then you need to add an extra stepgen (add an extra ",0" to the loadrt stepgen line) then add the second X into the hal as a clone of the existing one, but with its own signal names, and using stepgen.3 linked to axis.3 parameters.
Please Log in or Create an account to join the conversation.
As Andy pointed out..If you want them to be truly slaved together, then just use one stepgen ...... (Alternatively, take the output from one stepgen to two sets of parport connections
If you are running steppers with two axis that are the same and you are not going to install separate home or limit switches you can just output the step signals to two sets of parallel port pins. Just use the standard XYZ setup and something like this...
x axis
net xdir => parport.0.pin-04-out
setp parport.0.pin-05-out-invert 1
net xstep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
slave axis
setp parport.0-08-out-invert 1
net xdir => parport.0.pin-08-out
setp parport.0.pin-09-out-invert 1
net xstep => parport.0.pin-09-out
setp parport.0.pin-09-out-reset 1
That should be close but from memory. The one is reversed here because if you had two motors at opposite sides and they both pointed inward a move would be with one clockwise and the other counter clockwise, but it is easy to switch.
Rick G
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.