Asynchron motion of 4 axis with 2 Interpreter

More
28 Aug 2010 19:30 #3907 by cncready
I have an Index GS30 lathe with 2 turrets (4 axis).

One turret has a counter spindle and with the 3 fixed tools it can be used for back side machining.

It would be possible to use both turrets simultaneous, but EMC2 just allows to run the GCode sequentially.

My question now: Is it possible to load two RS274 Interpreter which have both access to all axis?


And is it also possible to change the axis identifier from U to X1 and V to Z1?

One more problem I have is, that the tool change is done with a move of the Z (turret 1) and the X axis (turret 2). I will write a subprogram for that, but I would appreciate to do that with a M6.

The rack tool change is similiar to that what I need, but in another sequence and with some sensors.
I tried to understand the code, but it's very hard to get an overview without a documentation.

Thanks,
Daniel
Attachments:

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

More
30 Aug 2010 18:08 #3918 by andypugh

I have an Index GS30 lathe with 2 turrets (4 axis).

I assume this is a "Swiss" lathe, and that the workpiece emerges from the hole in the back-right corner between the toolholders?

My question now: Is it possible to load two RS274 Interpreter which have both access to all axis?

I am not sure about running two interpreters and trajectory planners simutaneously. I don't think it is possible, but might be wrong. I think they would both want to create "pins" with the same names in the HAL shared memory and that would lead to conflict.
I think the possibility has been discussed before on the mailing list, it might be worth asking there too. lists.sourceforge.net/lists/listinfo/emc-users

In any case, you can not allow both interpreters to have access to all axes, as it then becomes impossible to decide who "wins" if they both try to move the same axes.
The simplest solution, considering how cheap PC hardware is compared to the the rest of the system, might be to have two PCs running EMC2, each controlling one head. They can communicate with M66 which will pause a G-code program until a pin changes state: wiki.linuxcnc.org/emcinfo.pl?Mword

And is it also possible to change the axis identifier from U to X1 and V to Z1?

No, because G-code ignores spaces, and so it is impossible to differentiate between G0 X 10 and G0 X1 0.

You have presumably already noted that you can write G-code in XZ and UW (though I don't think you can make arcs in the UW plane, which is a limitation). That would allow you to use both heads simultaneously, except that all the moves have to start and stop at the same time too.

One more problem I have is, that the tool change is done with a move of the Z (turret 1) and the X axis (turret 2). I will write a subprogram for that, but I would appreciate to do that with a M6.


You can define a toolchange position in the INI file (in machine absolute coordinates, I believe) that might do what you want.

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

More
30 Aug 2010 20:27 #3921 by cncready

I assume this is a "Swiss" lathe

No, it isn't a Swiss type. It's a normal lathe with 2 turrets. The workpiece is hold with a collet and the Z move is done with the turret.

The toolchange is done with setting a hydraulic valve and moving the Z axis (turret 1) or the X axis (turret 2). The linear movement of the axis leads to a rotation of the turret. (ca. 1 tool per mm)
So I can't use the rack tool change, because it's a completely other sequence. I have already checked the source code, maybe I try to hack the source when I have time...

The simplest solution, considering how cheap PC hardware is compared to the the rest of the system, might be to have two PCs running EMC2, each controlling one head.

That's simple, but an unattractive solution, because I have to control two PCs, load 2 programs and start emc2 on both PCs.

No, because G-code ignores spaces, and so it is impossible to differentiate between G0 X 10 and G0 X1 0.

XX and ZZ could be used instead of X1 and Z1. When the interpreter would check if already one instance is loaded, it could change the identifier to XX, so there won't be a problem in the HAL.

That emc2 can't make arcs with UVW is a little disadvantage, but I could live with that - I would appreciate that before I build in two PCs.

Where is the interpreter loaded? I browsed already through a few files, but I haven't found the corresponding line yet...
Does anybody know where I can find it?

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

More
31 Aug 2010 00:07 #3922 by BigJohnT
For something as unusual as this to get the best exposure to EMC2 enthusiasts you might also post your questions on the mailing list.

John

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

More
31 Aug 2010 12:36 #3924 by andypugh

The toolchange is done with setting a hydraulic valve and moving the Z axis (turret 1) or the X axis (turret 2). The linear movement of the axis leads to a rotation of the turret. (ca. 1 tool per mm)


If you look at the way that hal_manualtoolchange is integrated into the sample configs, it would seem reasonably simple to write a new hal component using "comp" to do what you need.
linuxcnc.org/docs/html/hal_comp.html
I envisage a hal component that takes an axis position, tool cange request and a tool number, and passes through the position unchanged to the PID or stepgen controlling the axis under normal circumstances, but passes out a ramped delta to the position and a valve control signal when a toolchange is requested.

I was thinking that you could use MDI_COMMAND ( linuxcnc.org/docs/2.3/html/gui_halui.html#sub:MDI ) but those are not active with the program in Auto. (It is possible, though, that the system drops out of auto during a toolchange...)

That's simple, but an unattractive solution, because I have to control two PCs, load 2 programs and start emc2 on both PCs.

It would be reasonably simple to slave the two "run" and "stop" buttons together in HAL (via physical interwiring of the two machines) and you would need two programs anyway. I don't know of any system that runs a single G-code program asynchronously.

XX and ZZ could be used instead of X1 and Z1. When the interpreter would check if already one instance is loaded, it could change the identifier to XX, so there won't be a problem in the HAL.

Possible, perhaps. It breaks the G-code standard of all commands being single letters ("X" is a command, not a variable.)

Where is the interpreter loaded? I browsed already through a few files, but I haven't found the corresponding line yet...
Does anybody know where I can find it?


Possibly
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...4d1a97ae496f;hb=HEAD

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

Time to create page: 0.076 seconds
Powered by Kunena Forum