Emco 240 Tool Turret

More
06 Sep 2017 17:28 #98591 by timmert
Replied by timmert on topic Emco 240 Tool Turret
I understand your reply andy.
But for a complete electronic noob like me its not possible to find out all those things with the original control.

I just found the boxford component. Its also a 8 tool turret with the same design as the emco. Would it work?
When i have tool 1 loades and i switch to tool 3. linuxcnc should know how much degrees it needs to turn.

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

More
07 Sep 2017 09:01 #98614 by timmert
Replied by timmert on topic Emco 240 Tool Turret
I used HALcompile to install the toolchanger.comp

I currently struggle with the hal file.

This is the example inside the documents. But it uses an old format I think (some files are called EMC).
What are the equivalents in the current format?
The first entries are clear to me. But I'm not sure about:
net apos-cmd axis.3.motor-pos-cmd and the entries underneath.

I already added the A axis.
##########################################################
#  example Hal linkages required:-
##########################################################

setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 16000
setp stepgen.3.dirsetup 31000
        ## make sure accel and velocity are sensibly low or it will take off!
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
        ### must unlink these 2 to access stepgen.3.position-cmd
        ### and prevent continual following errors if motor-pos-fb left linked
#net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
#net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
net aenable axis.3.amp-enable-out => stepgen.3.enable


File Attachment:

File Name: lathe_2017-09-07.ini
File Size:4 KB

File Attachment:

File Name: lathe_2017-09-07.txt
File Size:12 KB
Attachments:

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

More
08 Sep 2017 09:12 #98655 by Grotius
Replied by Grotius on topic Emco 240 Tool Turret
Hi Timmert,

So finally you are using a stepper.

To program your turret with G-code switch your program style with :

G90 Absolute programming
G91 Incremental programming

If you put this in a macro then you can load (exexute) the macro if you want to change tool.

What you say before is good. You take a few degrees more to ensure it's
in the slot backward's.

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

More
08 Sep 2017 09:38 #98656 by timmert
Replied by timmert on topic Emco 240 Tool Turret
If I understand you correctly
I nee to manually execute the macro to switch to the desired tool.
That's not what I want. Because I need to calculate for each program how many positions it needs to change.


It should work like this.
Tool 1 is loaded. LinuxCNC knows this.
When I issue a M6 T3 (or T0303) it should know it needs to move 2 positions.

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

More
08 Sep 2017 12:06 #98670 by andypugh
Replied by andypugh on topic Emco 240 Tool Turret
Not related to the questions you are asking, but you don't want your A-axis in the GEOMETRY.

(I am not even sure you want it in the COORDINATES, if you are using a HAL component)

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

More
09 Sep 2017 07:57 #98722 by timmert
Replied by timmert on topic Emco 240 Tool Turret
Ok
Whould it be possible to remap the toolchange code (m6 t2 / t0202) for example to a macro?

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

More
09 Sep 2017 23:54 #98752 by andypugh
Replied by andypugh on topic Emco 240 Tool Turret
Yes, it's quite easy.

What language do you want to write the macro in?

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

More
10 Sep 2017 16:42 #98782 by timmert
Replied by timmert on topic Emco 240 Tool Turret
I received this code on a local forum.
It's being used for a 6 position emco toolchanger. But can be changed to 8 position I think.
sub change_tool
    ;Switch off guard for tool change area collision
    TCAGuard off

    ;Use #5015 to indicate succesfull toolchange
    #5015 = 0 ; Tool change not performed

    ; check tool in spindle and exit sub
   msg"Current 5008 "#5008
   msg"new 5011 "#5011
   IF [ [#5011] <> [#5008] ]
       IF [[#5011] > 6 ]
          ERRMSG "PLEASE SELECT A TOOL FROM 1 TO 6."
       ENDIF
   ENDIF
    IF [#5011]>[#5008]
      #4600=[#5011-#5008]
    ENDIF
   IF [#5011<#5008]
      #4600=[[#5011-#5008]+6]
   ENDIF

   #4601=[[#4600*60]+3]
   msg #4601
   G00 G91 A#4601
   G00 G91 A-4
   G90
   M6T#5011
   G43

    ;Switch on guard for tool change area collision
    TCAGuard on
       
    ;;Check if ZHeight comp was on before and switch ON again if it was.
    ;if [#5019 == 1]
    ;    ZHC on
    ;endif
       
EndSub

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

More
10 Sep 2017 17:11 #98785 by andypugh
Replied by andypugh on topic Emco 240 Tool Turret
That isn't in LinuxCNC G-code. Mach3 perhaps?

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

More
10 Sep 2017 17:45 #98786 by timmert
Replied by timmert on topic Emco 240 Tool Turret
It's USBCNC I think

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

Time to create page: 0.112 seconds
Powered by Kunena Forum