- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Test LinuxCNC without motors and encoders connected
Test LinuxCNC without motors and encoders connected
- Peterdeleu
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 0
13 Jun 2019 13:52 #136831
by Peterdeleu
Replied by Peterdeleu on topic Test LinuxCNC without motors and encoders connected
It all becomes clear to me ![:) :)](/media/kunena/emoticons/smile.png)
But still some questions..
I'll use Fusion as CAD/CAM.
After generating the G-code with the LinuxCNC postprocessor, I'm able to load the code into LinuxCNC.
Even tool changes are working.
These are the first lines of an example of the code generated by Fusion:
%
(1001)
(T11 D=10. CR=0. - ZMIN=-46. - FLAT END MILL)
(T12 D=2. CR=0. TAPER=118DEG - ZMIN=-6. - DRILL)
(T15 D=4. CR=0. TAPER=118DEG - ZMIN=-46. - DRILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0.
(2D POCKET10)
N25 M9
N30 T11 M6
N35 T12
N40 S9700 M3
N45 G54
N50 M8
N55 G0 X-2.216 Y175.52
At line N30 LinuxCNC stops and ask me to change the tool to 11.
But I have a Biesse with multiple heads. I know how to add tools and tool offsets in LinuxCNC, but how an I automize this ?
Each tool is fixed on the head. A specific pneumatic cilinder must be activated to push the tool down if in the G-code a tool change is asked. Because each tool is fixed on a different location, I will need to enter an offset. That that's more or less clear.
My question is, how can I activate the correct pneumatic cilinder without making changes in the G-code.
Greetz,
Peter
![:) :)](/media/kunena/emoticons/smile.png)
But still some questions..
I'll use Fusion as CAD/CAM.
After generating the G-code with the LinuxCNC postprocessor, I'm able to load the code into LinuxCNC.
Even tool changes are working.
These are the first lines of an example of the code generated by Fusion:
%
(1001)
(T11 D=10. CR=0. - ZMIN=-46. - FLAT END MILL)
(T12 D=2. CR=0. TAPER=118DEG - ZMIN=-6. - DRILL)
(T15 D=4. CR=0. TAPER=118DEG - ZMIN=-46. - DRILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0.
(2D POCKET10)
N25 M9
N30 T11 M6
N35 T12
N40 S9700 M3
N45 G54
N50 M8
N55 G0 X-2.216 Y175.52
At line N30 LinuxCNC stops and ask me to change the tool to 11.
But I have a Biesse with multiple heads. I know how to add tools and tool offsets in LinuxCNC, but how an I automize this ?
Each tool is fixed on the head. A specific pneumatic cilinder must be activated to push the tool down if in the G-code a tool change is asked. Because each tool is fixed on a different location, I will need to enter an offset. That that's more or less clear.
My question is, how can I activate the correct pneumatic cilinder without making changes in the G-code.
Greetz,
Peter
Please Log in or Create an account to join the conversation.
18 Jun 2019 16:38 #137205
by andypugh
Replied by andypugh on topic Test LinuxCNC without motors and encoders connected
You need to configure some form of tool changer code.
At the moment your machine is configured to use the manual tool change dialog box.
If you look in the HAL file there are connections (iocontrol.0.tool-change . iocontrol.0.tool-changed ) that are connected to hal_manualtoolchange.
(documented here, but not relevant really: linuxcnc.org/docs/2.7/html/man/man1/hal_manualtoolchange.1.html )
You probably need to
a) configure tool change retract: linuxcnc.org/docs/2.7/html/config/ini-co....html#_emcio_section
b) Connect the iocontrol.0.tool-change directly to iocontrol.tool-changed and also to something that will operate the cylinders.
demux would work: linuxcnc.org/docs/2.8/html/man/man9/demux.9.html
Though you would need to convert tool number (s32) to u32: linuxcnc.org/docs/2.8/html/man/man9/conv_s32_u32.9.html
demux is not present in 2.7, but can be easily added.
Writing a custom component is another option, it could be really very simple.
Do you anticipate ever wanting to enable more than one tool at a time?
This has been discussed before:
forum.linuxcnc.org/38-general-linuxcnc-q...ls-on-the-cnc#130317
At the moment your machine is configured to use the manual tool change dialog box.
If you look in the HAL file there are connections (iocontrol.0.tool-change . iocontrol.0.tool-changed ) that are connected to hal_manualtoolchange.
(documented here, but not relevant really: linuxcnc.org/docs/2.7/html/man/man1/hal_manualtoolchange.1.html )
You probably need to
a) configure tool change retract: linuxcnc.org/docs/2.7/html/config/ini-co....html#_emcio_section
b) Connect the iocontrol.0.tool-change directly to iocontrol.tool-changed and also to something that will operate the cylinders.
demux would work: linuxcnc.org/docs/2.8/html/man/man9/demux.9.html
Though you would need to convert tool number (s32) to u32: linuxcnc.org/docs/2.8/html/man/man9/conv_s32_u32.9.html
demux is not present in 2.7, but can be easily added.
Writing a custom component is another option, it could be really very simple.
Do you anticipate ever wanting to enable more than one tool at a time?
This has been discussed before:
forum.linuxcnc.org/38-general-linuxcnc-q...ls-on-the-cnc#130317
Please Log in or Create an account to join the conversation.
- Peterdeleu
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 0
18 Jun 2019 17:06 #137208
by Peterdeleu
Replied by Peterdeleu on topic Test LinuxCNC without motors and encoders connected
Hmm okay ![:) :)](/media/kunena/emoticons/smile.png)
I've read the links and tips, but I'm afraid that it will not be easy for me to make something that will work.
But now I have at least a few starting points![:) :)](/media/kunena/emoticons/smile.png)
If writing a custom component would be very simple, maybe this is the way to go?
Regards
![:) :)](/media/kunena/emoticons/smile.png)
I've read the links and tips, but I'm afraid that it will not be easy for me to make something that will work.
But now I have at least a few starting points
![:) :)](/media/kunena/emoticons/smile.png)
If writing a custom component would be very simple, maybe this is the way to go?
Regards
Please Log in or Create an account to join the conversation.
18 Jun 2019 17:07 #137209
by bevins
Which Biesse do you have? Do you also use a spindle along with the gang drills?
If you use a spindle with a bit in it and also the drill bank, your Biesse already has a spindle select relay. You can use that or use multiple spindle in 2.8 and spindle.0 would be your regular s[spindle and spindle.1 would be your drill motor. Energize a relay to deselect spindle.0 and enable spindle.1 when drills needed. This can be done in remap or modify post depending on selected_tool.
One drill motor for all drills, just need to select drill depending on selected_tool and energize the relevant relay.
This is dependent on whether your Biesse has a tool changer or not.
You can use M64,M65 for energizing relays.
I have done a few Biesse machines. they are kinda fun to figure out.
Replied by bevins on topic Test LinuxCNC without motors and encoders connected
It all becomes clear to me
But still some questions..
I'll use Fusion as CAD/CAM.
After generating the G-code with the LinuxCNC postprocessor, I'm able to load the code into LinuxCNC.
Even tool changes are working.
These are the first lines of an example of the code generated by Fusion:
%
(1001)
(T11 D=10. CR=0. - ZMIN=-46. - FLAT END MILL)
(T12 D=2. CR=0. TAPER=118DEG - ZMIN=-6. - DRILL)
(T15 D=4. CR=0. TAPER=118DEG - ZMIN=-46. - DRILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0.
(2D POCKET10)
N25 M9
N30 T11 M6
N35 T12
N40 S9700 M3
N45 G54
N50 M8
N55 G0 X-2.216 Y175.52
At line N30 LinuxCNC stops and ask me to change the tool to 11.
But I have a Biesse with multiple heads. I know how to add tools and tool offsets in LinuxCNC, but how an I automize this ?
Each tool is fixed on the head. A specific pneumatic cilinder must be activated to push the tool down if in the G-code a tool change is asked. Because each tool is fixed on a different location, I will need to enter an offset. That that's more or less clear.
My question is, how can I activate the correct pneumatic cilinder without making changes in the G-code.
Greetz,
Peter
Which Biesse do you have? Do you also use a spindle along with the gang drills?
If you use a spindle with a bit in it and also the drill bank, your Biesse already has a spindle select relay. You can use that or use multiple spindle in 2.8 and spindle.0 would be your regular s[spindle and spindle.1 would be your drill motor. Energize a relay to deselect spindle.0 and enable spindle.1 when drills needed. This can be done in remap or modify post depending on selected_tool.
One drill motor for all drills, just need to select drill depending on selected_tool and energize the relevant relay.
This is dependent on whether your Biesse has a tool changer or not.
You can use M64,M65 for energizing relays.
I have done a few Biesse machines. they are kinda fun to figure out.
Please Log in or Create an account to join the conversation.
- Peterdeleu
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 0
18 Jun 2019 17:21 #137212
by Peterdeleu
Replied by Peterdeleu on topic Test LinuxCNC without motors and encoders connected
Hi Bevins,
It is a Rover 18. This one has a spindel and a drill bank.
Both have a separate motor.
But yes, my problem is how to energize the correct motor relay and the correct relay of the pneumatic cilinder depending on de tool that is request (T).
I use Fusion 360, and I was hoping that I didn't have to change the G-code generated by the postprocessor.
So, if T10 is asked in the G-code, something (but what??) must activate the motor relay and the correspondending relay to lower the drill bit.
It is a Rover 18. This one has a spindel and a drill bank.
Both have a separate motor.
But yes, my problem is how to energize the correct motor relay and the correct relay of the pneumatic cilinder depending on de tool that is request (T).
I use Fusion 360, and I was hoping that I didn't have to change the G-code generated by the postprocessor.
So, if T10 is asked in the G-code, something (but what??) must activate the motor relay and the correspondending relay to lower the drill bit.
Please Log in or Create an account to join the conversation.
18 Jun 2019 17:24 - 18 Jun 2019 17:25 #137215
by bevins
Replied by bevins on topic Test LinuxCNC without motors and encoders connected
I reread the thread. ROver 18.one spindle, no toolchanger and gang drills. This should be no problem.
You have regular spindle and one drill motor.
What I did was modify post processor to when you get end of program I remapped an mcode and that raised all drills and spindles. Also first thing to do in remap is make sure spindle is stopped and raise all drills and spindles. Then during remap drop the spindle or the selected_tool drill.
I would use NGC remap.
Logic should go something like:
M6
raise all drills and spindle,
Make sure spindle is stopped,( I did this because of tool changer, you may not need it)
check selected_tool
If selected_tool is tool in spindle tool #1, then drop tool
else if selected_tool is tool 2-10 deselect spindle 1, select and energize drill motor
if selected_tool is #2 drop tool
continue for each drill
exit remap
G43
M400 (raise all spindles and drills, turn off drill motor)
M2
That should just about do it.
You have regular spindle and one drill motor.
What I did was modify post processor to when you get end of program I remapped an mcode and that raised all drills and spindles. Also first thing to do in remap is make sure spindle is stopped and raise all drills and spindles. Then during remap drop the spindle or the selected_tool drill.
I would use NGC remap.
Logic should go something like:
M6
raise all drills and spindle,
Make sure spindle is stopped,( I did this because of tool changer, you may not need it)
check selected_tool
If selected_tool is tool in spindle tool #1, then drop tool
else if selected_tool is tool 2-10 deselect spindle 1, select and energize drill motor
if selected_tool is #2 drop tool
continue for each drill
exit remap
G43
M400 (raise all spindles and drills, turn off drill motor)
M2
That should just about do it.
Last edit: 18 Jun 2019 17:25 by bevins.
Please Log in or Create an account to join the conversation.
18 Jun 2019 23:04 - 19 Jun 2019 21:41 #137246
by HueyHQ
Replied by HueyHQ on topic Test LinuxCNC without motors and encoders connected
Hi Peter,
I have recently done similar to a Busellato (which seems to be similar to the Biesse), that has 3 spindles and ganged drills.
All credit goes to Bob (Mr bevins) who shared his config, which I managed to copy and modify to suit my machine - if he hadn't done that, I might still be trying to figure it out! So I'd like to repay the favour, and try provide the bits that make it work.
First, modify your machine.ini file RS274NGC parameter:I have my /nc_subroutines folder in the same directory as the .ini file, and in that folder are the tool_change.ngc and m200.ngc files.
From memory, the prolog and epilog are derived from the Python std-glue routines, and are referenced as:(toplevel.py is in the config /python folder but only contains the line "import remap" in my case - remap.py is in the same folder.)
Next, the HAL connections are made between the physical output pins and the motion.digital output pins, which are the pins accessed by the M64 and M65 G-codes in the subroutines. In my case, I added this to custom.hal, along with other stuff:
I have attached my tool_change.ngc (derived from included examples manual_toolchange.ngc) and m200.ngc (copied directly from Bob!) files for reference. Also in the /nc_subroutines folder are restore.ngc and on_abort.ngc, copied from the manual_toolchange examples, and on_abort is modifed to include M200 (raise all tools).
As Bob has said, the only modification to the post-processor is to add M200 before the M2 - not even strictly necessary as it will be done on the next run, but does tidy up the machine state.
I hope this helps, and that I haven't missed anything.
I have recently done similar to a Busellato (which seems to be similar to the Biesse), that has 3 spindles and ganged drills.
All credit goes to Bob (Mr bevins) who shared his config, which I managed to copy and modify to suit my machine - if he hadn't done that, I might still be trying to figure it out! So I'd like to repay the favour, and try provide the bits that make it work.
First, modify your machine.ini file RS274NGC parameter:
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
USER_M_PATH = nc_subroutines
SUBROUTINE_PATH = nc_subroutines:../../nc_files/remap_lib/common_nc_subs
ON_ABORT_COMMAND = O <on_abort> call
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=tool_change epilog=change_epilog
REMAP= M200 modalgroup=10 ngc=m200 #raise all tools
From memory, the prolog and epilog are derived from the Python std-glue routines, and are referenced as:
[PYTHON]
PATH_PREPEND= ./python
PATH_APPEND= ../../nc_files/remap_lib/python-stdglue
TOPLEVEL= python/toplevel.py
Next, the HAL connections are made between the physical output pins and the motion.digital output pins, which are the pins accessed by the M64 and M65 G-codes in the subroutines. In my case, I added this to custom.hal, along with other stuff:
### Drill Tools ###
net drillmotor_on hm2_5i25.0.7i77.0.0.output-03 motion.digital-out-00
net drill01drop hm2_5i25.0.7i71.0.2.output-00 motion.digital-out-01
net drill02drop hm2_5i25.0.7i71.0.2.output-01 motion.digital-out-02
net drill03drop hm2_5i25.0.7i71.0.2.output-02 motion.digital-out-03
net drill04drop hm2_5i25.0.7i71.0.2.output-03 motion.digital-out-04
net drill05drop hm2_5i25.0.7i71.0.2.output-04 motion.digital-out-05
net drill06drop hm2_5i25.0.7i71.0.2.output-05 motion.digital-out-06
net drill07drop hm2_5i25.0.7i71.0.2.output-06 motion.digital-out-07
net drill08drop hm2_5i25.0.7i71.0.2.output-07 motion.digital-out-08
net drill09drop hm2_5i25.0.7i71.0.2.output-08 motion.digital-out-09
net drill10drop hm2_5i25.0.7i71.0.2.output-09 motion.digital-out-10
net drill11drop hm2_5i25.0.7i71.0.2.output-10 motion.digital-out-11
net drill12drop hm2_5i25.0.7i71.0.2.output-11 motion.digital-out-12
net drill13drop hm2_5i25.0.7i71.0.2.output-12 motion.digital-out-13
net drill14drop hm2_5i25.0.7i71.0.2.output-13 motion.digital-out-14
net drill15drop hm2_5i25.0.7i71.0.2.output-14 motion.digital-out-15
net drill16drop hm2_5i25.0.7i71.0.2.output-15 motion.digital-out-16
### Spindle Tools ###
# --- SPINDLE-AT-SPEED ---
net spindle-at-speed motion.digital-in-22 <= hm2_5i25.0.7i77.0.0.input-22
net spindle-at-zero motion.digital-in-21 <= hm2_5i25.0.7i77.0.0.input-21
net spindle20relay hm2_5i25.0.7i77.0.0.output-00 motion.digital-out-17
net spindle21relay hm2_5i25.0.7i77.0.0.output-01 motion.digital-out-18
net spindle22relay hm2_5i25.0.7i77.0.0.output-02 motion.digital-out-19
net spindle20drop hm2_5i25.0.7i77.0.0.output-05 motion.digital-out-20
net spindle21drop hm2_5i25.0.7i77.0.0.output-06 motion.digital-out-21
net spindle22drop hm2_5i25.0.7i77.0.0.output-07 motion.digital-out-22
I have attached my tool_change.ngc (derived from included examples manual_toolchange.ngc) and m200.ngc (copied directly from Bob!) files for reference. Also in the /nc_subroutines folder are restore.ngc and on_abort.ngc, copied from the manual_toolchange examples, and on_abort is modifed to include M200 (raise all tools).
As Bob has said, the only modification to the post-processor is to add M200 before the M2 - not even strictly necessary as it will be done on the next run, but does tidy up the machine state.
I hope this helps, and that I haven't missed anything.
Last edit: 19 Jun 2019 21:41 by HueyHQ. Reason: Added remap.py
Please Log in or Create an account to join the conversation.
- Peterdeleu
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 0
19 Jun 2019 10:48 #137277
by Peterdeleu
Replied by Peterdeleu on topic Test LinuxCNC without motors and encoders connected
Whooww.. this is a lot of information ![:) :)](/media/kunena/emoticons/smile.png)
I'll try to understand everything in the coming days.
This is all new to me, so it will take some time.
Tx all !!
![:) :)](/media/kunena/emoticons/smile.png)
I'll try to understand everything in the coming days.
This is all new to me, so it will take some time.
Tx all !!
Please Log in or Create an account to join the conversation.
- Peterdeleu
- Offline
- Premium Member
-
Less
More
- Posts: 99
- Thank you received: 0
19 Jun 2019 12:02 #137283
by Peterdeleu
Replied by Peterdeleu on topic Test LinuxCNC without motors and encoders connected
I have a error message during startup.
Error message in toplevel.py > import remap
Importerror : No module named remap
Error message in toplevel.py > import remap
Importerror : No module named remap
Please Log in or Create an account to join the conversation.
19 Jun 2019 13:02 #137286
by bevins
Have a long read here . This is something you need to understand to make work. There is alot of little parts that have to be in place. We can help but, it wont do any good unless you can at least see the structure.
Study the example remaps also in linuxcnc.
Replied by bevins on topic Test LinuxCNC without motors and encoders connected
I have a error message during startup.
Error message in toplevel.py > import remap
Importerror : No module named remap
Have a long read here . This is something you need to understand to make work. There is alot of little parts that have to be in place. We can help but, it wont do any good unless you can at least see the structure.
Study the example remaps also in linuxcnc.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Test LinuxCNC without motors and encoders connected
Time to create page: 0.368 seconds