Master and Slave axes in EMC2+Montec

More
01 Jul 2010 12:43 - 01 Jul 2010 12:45 #3262 by Andrey_L
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:

File Attachment:

File Name: motenc.zip
File Size:15 KB
Attachments:
Last edit: 01 Jul 2010 12:45 by Andrey_L.

Please Log in or Create an account to join the conversation.

More
25 Sep 2010 22:16 #4340 by radekB
Andrey_L wrote:

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:

File Attachment:

File Name: motenc.zip
File Size:15 KB


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 !!!!!
Attachments:

Please Log in or Create an account to join the conversation.

More
26 Sep 2010 18:30 #4354 by Andrey_L
Many thanks Radek.I will try to make it. And please inform on results of your work at source level in C + +

Please Log in or Create an account to join the conversation.

More
27 Sep 2010 14:58 #4369 by andypugh
radekB wrote:

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.

More
01 Nov 2010 11:35 #5004 by Schnitti
Hi there,

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

File Attachment:

File Name: tron.zip
File Size:2 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
01 Nov 2010 12:08 - 01 Nov 2010 12:09 #5005 by BigJohnT
The EMC2.5 (dev version) has an XYYZ sim config that might help you.

John

File Attachment:

File Name: sim_xyyz.hal
File Size:2 KB
Attachments:
Last edit: 01 Nov 2010 12:09 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
01 Nov 2010 12:15 #5006 by Andrey_L
If you use steper motors and drivers with management step and dir use an operating signal of axis X on both of the driver, it is necessary to make a reverser one of motors. If you wish to use gantrykins you need 4 stepgen and four independent axes. How this to operate is written above .

Regard,Andrey

Please Log in or Create an account to join the conversation.

More
01 Nov 2010 13:02 - 01 Nov 2010 13:13 #5007 by andypugh
Schnitti wrote:

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.

Gantrykins has the second motor reversed probably just to show that it can be done..
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)

So I took xyza sample config and changed it, but i am not totally sure. Do we need 3 or 4 stepgen?

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)
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.

My way, which results in hang up the computer, so it must be wrong.

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)
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.
Last edit: 01 Nov 2010 13:13 by andypugh.

Please Log in or Create an account to join the conversation.

More
01 Nov 2010 16:04 #5008 by Rick G

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

As Andy pointed out..

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.

More
07 Nov 2010 17:17 - 07 Nov 2010 17:29 #5138 by Schnitti
Hi Rick, Andy,

thanks for the tipps. I will test it out.

Both tipps will help me. I have first to home the 2 X-axis, to get Y in 90° position. (2 X leadscrews in parallel) It is a must for me to use gantrykin, but without inverting 1 of them.


Regards

Wolfgang
Attachments:
Last edit: 07 Nov 2010 17:29 by Schnitti. Reason: no text visible with picture.

Please Log in or Create an account to join the conversation.

Time to create page: 0.179 seconds
Powered by Kunena Forum