component compile problem

More
31 Dec 2018 16:51 #123223 by Skidloaders1
2 problems still remain

- how to automate G30 ( safe rotate position) and G43 with M6 command

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

More
04 Jan 2019 15:05 #123483 by andypugh
Replied by andypugh on topic component compile problem
The simple way to automate G43 is:
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
("retain g43")
But I think that a better way is to use the other info on that page to re-map M6.
That means that you can run a G-code subroutine to ensure that conditions are right for a tool change, and then you can add the G43 to the routine.

You can even re-map the "T" command to perform the full tool change, optionally with wear offsets included. see the re-map routine here:
github.com/LinuxCNC/linuxcnc/tree/master...im/axis/lathe-fanucy
(Specifically the toolchange.ngc routine, but not also the notes in the readme and the INI changes to make it happen)
The following user(s) said Thank You: Skidloaders1

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

More
29 Jan 2019 09:28 #125147 by trilobyte
Replied by trilobyte on topic component compile problem
@Wilfried: can you please share your hal?

peter

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

More
29 Jan 2019 12:06 #125158 by Skidloaders1
Got the Weiler and turret working at last.
Still getting to know the machine ( like on honeymoon :) )
Had my fun with offsets G43's G55 etc... - nothing CNC comes easy it seems.
Have not figured out remapping, still hand typing Gcode.
Attachments:
The following user(s) said Thank You: AlexMagToast

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

More
29 Jan 2019 12:13 #125161 by andypugh
Replied by andypugh on topic component compile problem
I rarely actively use G-code on my lathe (at least for one-offs)
I do most things with this:
forum.linuxcnc.org/41-guis/26550-lathe-macros?start=150#82743

The screenshot shows it embedded in Touchy, but it can be embedded in any of the other user interfaces as a custom tab.

Native-CAM is more advanced, my macros are little more than power-feed-with-return-and-repeat. But for a lot of lathe work that's all you need.

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

More
29 Jan 2019 13:16 - 29 Jan 2019 13:17 #125164 by Skidloaders1
Hi Andy

Looks very smart , but I don't have a touchscreen.
Very much like Tormach.
Made myself a few wizards , mainly for my mill .
For my lathe I wrote a thread cutting wizard. ( no taper unfortunatly ).
I would like to learn how to incorporate them in NGCGUI - one day.
G71 etc.. also on my wish list.


happy cnc-ing Wilfried
Last edit: 29 Jan 2019 13:17 by Skidloaders1. Reason: typing error

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

More
02 Oct 2021 14:02 - 02 Oct 2021 14:06 #222016 by tjtr33
Replied by tjtr33 on topic component compile problem
That error can be from the missing left justified ;;
( as gaston48 replied )
usually located between pin declarations and FUNCTION (_)
or
from bad line endings ( unix is LF hex 0a )
i've experience both reasons.
there may be more.
( heh the ';;' looks pretty useless but dont forget it! )
tomp
Last edit: 02 Oct 2021 14:06 by tjtr33. Reason: credit poster

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

More
27 Nov 2022 16:25 - 27 Nov 2022 16:27 #257743 by AlexMagToast
Hello guys,
A couple Years later i also got my hands on the same type of Weiler Primus CNC.
Thanks for @Skidloaders1  for sharing your files.

I am currently finishing rewiring everything and starting to get the machine working with LinuxCNC and this thread will certainly help me with getting the Turret going.
For those interested, i have made an animation from the machine manual, explaining how the turret works and how it is driven hardware wise.
beginning @(12:12)
Youtube

Is using the CAROUSEL component, what you still would reccomend for me?
The turret can have multiple Tools per side, so i guess i have to specify in the tooltable, on which side they are mounted and apply an offset. Lots of stuff to learn for me.

Thanks four your years of service for the community!

Cheers, Alex
Last edit: 27 Nov 2022 16:27 by AlexMagToast.

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

More
27 Nov 2022 21:58 #257771 by andypugh
Replied by andypugh on topic component compile problem
Carousel might work, though I am a little confused about the rotation sequence.
It looks like it needs to open one valve until a sensor triggers, then it needs to trigger a different valve to lock, and that advances one position.

The carousel comp expects the carousel to carry on moving through successive pocket positions all the time that the "motor-fwd" pin is held high.

In this case I think it might be simplest to do it all as a G-code subroutine or a dedicated HAL component as it is quite a simple sequence and interpreting the position sensors is fairly easy.

Is there a sensor to indicate that the piston is at the end of travel, or is it done purely on time?

To use "carousel" you would need to use something like a one-shot HAL component to pulse the solenoid valves, and at that point there is more happening outside carousel than inside.

Note that the "tooledit" programme will not allow multiple tools in the same pocket, and your changer seems to require that. You can edit the tool table with a text editor, though, and get the desired result.

Are you more comfortable with G-code or C for the control sequence?

One advantage of using a G-code remap is that you can
O<toolchange> SUB

; normally these would be done with the python prolog routines, but
; I know that the HAL pins have the right values when multiple tools
; specify the same pocket.
#1 = #<_hal[iocontrol.0.tool-prep-pocket]>
#2 = #<_hal[iocontrol.0.tool-prep-number]>

; check the motion.digital-in-NN pin corresponding to the selected pocket

M66 P[#1] L0
O100 WHILE [#5399 EQ 0]
M65 P2 ; signal tool prepare in progress
M64 P0 ; start rotation, open S1
G4 P0.5 ; wait to finish stage 1
M65 P0 ; close S1
M64 P1 ; open S2
G4 P0.5 ; wait
M65 P1 ; close S2
M66 P[#1] L0 ; re-check the sensor corresponding to the pocket
O100 ENDWHILE

; Should now be in position and locked, so signal tool-prepared;
M64 P2 

do the toolchange 
; and apply the tool ofsets here rather than in the main G-code

M6 T[#2] G43

O<toolchange> ENDSUB

M2

This requires a few HAL connections to work.

net tool-prepared motion.digital-out-02 => iocontrol.0.tool-prepared
net M6-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
net pos-1 motion.digital-in-01 <= { hardware input for positionl 1}
net pos-2 motion.digital-in-02 <= { hardware input for positionl 2}
net pos-3 motion.digital-in-03 <= { hardware input for positionl 3}
net pos-4 motion.digital-in-04 <= { hardware input for positionl 4}
net valve-S1 motion.digital-out-00 => {output pin for S1}
net valve-S2 motion.digital-out-01 => {output pin for S2}
The following user(s) said Thank You: AlexMagToast

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

More
27 Nov 2022 22:00 #257773 by andypugh
Replied by andypugh on topic component compile problem
Also, the code should check that the pocket number is in range, and it would be wise to have a counter that aborts the tool change after 4 rotations, as that means something has gone wrong if it hasn't found the pocket.
The following user(s) said Thank You: AlexMagToast

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

Time to create page: 0.186 seconds
Powered by Kunena Forum