Another "what do I need" thread. Vmc retrofit
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
22 Apr 2015 21:22 #58009
by andypugh
I have had a look and that seems like a promising starting point. Could I ask you to winnow out a lot of the surplus files, though? This would make it clearer how the system fits together.
(I don't even know what a .halshow file does
Replied by andypugh on topic Another "what do I need" thread. Vmc retrofit
Hi,
if you like to go the component router i made a solution which uses Gcode rewrite and for time critical stuff an component maybe it fits you needs
wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...er_and_configuration
I have had a look and that seems like a promising starting point. Could I ask you to winnow out a lot of the surplus files, though? This would make it clearer how the system fits together.
(I don't even know what a .halshow file does
Please Log in or Create an account to join the conversation.
- dgarrett
- Offline
- Platinum Member
Less
More
- Posts: 567
- Thank you received: 323
22 Apr 2015 22:10 - 22 Apr 2015 22:12 #58013
by dgarrett
Example:
Ref: www.linuxcnc.org/docs/2.7/html/hal/tools...w_a_id_sec_halshow_a
Replied by dgarrett on topic Another "what do I need" thread. Vmc retrofit
$ halshow --help
Usage:
halshow [Options] [watchfile]
Options:
--help (this help)
Notes:
Create watchfile in halshow using: 'File/Save Watch List'
linuxcnc must be running for standalone usage
$ halshow aaspindleorient2.halshow
Ref: www.linuxcnc.org/docs/2.7/html/hal/tools...w_a_id_sec_halshow_a
Last edit: 22 Apr 2015 22:12 by dgarrett. Reason: fix link
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
22 Apr 2015 22:31 #58014
by andypugh
I have been cursing that there was no way to do that for years.
Now I am going to start cursing myself for not reading the docs and finding it
Replied by andypugh on topic Another "what do I need" thread. Vmc retrofit
Create watchfile in halshow using: 'File/Save Watch List'
I have been cursing that there was no way to do that for years.
Now I am going to start cursing myself for not reading the docs and finding it
Please Log in or Create an account to join the conversation.
- dgarrett
- Offline
- Platinum Member
Less
More
- Posts: 567
- Thank you received: 323
22 Apr 2015 22:35 #58015
by dgarrett
Replied by dgarrett on topic Another "what do I need" thread. Vmc retrofit
Halshow, halscope, sim_pin and other applications useful for testing can be started in
an ini file too
Ref: www.linuxcnc.org/docs/2.7/html/config/in...APPLICATIONS-section
an ini file too
Ref: www.linuxcnc.org/docs/2.7/html/config/in...APPLICATIONS-section
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
22 Apr 2015 22:43 #58016
by andypugh
I didn't realise that either
But I do frequently have HAL files that open halmeters for specific items:
loadusr halmeter -s pin motion.spindle-speed-in
for example.
Replied by andypugh on topic Another "what do I need" thread. Vmc retrofit
Ref: www.linuxcnc.org/docs/2.7/html/config/in...APPLICATIONS-section
I didn't realise that either
But I do frequently have HAL files that open halmeters for specific items:
loadusr halmeter -s pin motion.spindle-speed-in
for example.
Please Log in or Create an account to join the conversation.
- thewho
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 2
23 Apr 2015 01:24 - 23 Apr 2015 01:25 #58020
by thewho
I was reverse engineering the spindle encoder today. I found A and B but I don't know witch is witch but I know witch is the index.
So I now have a 1024 line encoder on the spindle. Should be 4096/rev.
That solves the spindle orienting right? At least mechanically. The spindle drive is +/-10V so that should not be a problem to hook up.
I translated some of the original documentation I got with the machine.
Replied by thewho on topic Another "what do I need" thread. Vmc retrofit
If you take the time to write the code then I'll absolutely test it!As I think that the custom HAL component will be generically useful I am happy to write that, if you are happy to test it
I was reverse engineering the spindle encoder today. I found A and B but I don't know witch is witch but I know witch is the index.
So I now have a 1024 line encoder on the spindle. Should be 4096/rev.
That solves the spindle orienting right? At least mechanically. The spindle drive is +/-10V so that should not be a problem to hook up.
I translated some of the original documentation I got with the machine.
Last edit: 23 Apr 2015 01:25 by thewho.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
23 Apr 2015 01:38 - 23 Apr 2015 01:38 #58021
by andypugh
It doesn't matter. You can either swap them if the encoder counts the wrong way, or make the encoder counter scale negative to achieve the same effect.
That flow chart is rather helpful. The only thing that isn't a simple "wait for switch" is the carousel positioning, and that is what I am proposing a generic HAL component for.
Replied by andypugh on topic Another "what do I need" thread. Vmc retrofit
I was reverse engineering the spindle encoder today. I found A and B but I don't know witch is witch but I know witch is the index.
It doesn't matter. You can either swap them if the encoder counts the wrong way, or make the encoder counter scale negative to achieve the same effect.
That flow chart is rather helpful. The only thing that isn't a simple "wait for switch" is the carousel positioning, and that is what I am proposing a generic HAL component for.
Last edit: 23 Apr 2015 01:38 by andypugh.
Please Log in or Create an account to join the conversation.
- thewho
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 2
23 Apr 2015 03:11 #58022
by thewho
Replied by thewho on topic Another "what do I need" thread. Vmc retrofit
Is it a bad idea to use a Arduino in you guys opinion?
If I went that route Linuxcnc would only need to position the spindle then tell the Arduino what tool is selected and move the Z axis when needed. I could also add a display for debugging and maybe show load on X/Y/Z/spindle as a fancy bar graph
I really appreciate the help I'm getting here!
If I went that route Linuxcnc would only need to position the spindle then tell the Arduino what tool is selected and move the Z axis when needed. I could also add a display for debugging and maybe show load on X/Y/Z/spindle as a fancy bar graph
I really appreciate the help I'm getting here!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
23 Apr 2015 04:05 #58023
by andypugh
Not a _bad_ idea as such, just a bit pointless.
If you can write Arduino C to do the job you can write LinuxCNC .comp C to do the job.
And without the added complications of communicating between two processors. Debugging is easier in HAL too, you can watch what the inputs and outputs are doing, scope them in Halscope etc etc.
I am an Arduino fan, I am doing quite a lot of work with them at work and I wrote a Resolver converter for LinuxCNC and the Arduino, including fast serial comms to the Mesa UART.
And I wouldn't consider using one in this role.
Replied by andypugh on topic Another "what do I need" thread. Vmc retrofit
Is it a bad idea to use a Arduino in you guys opinion?
Not a _bad_ idea as such, just a bit pointless.
If you can write Arduino C to do the job you can write LinuxCNC .comp C to do the job.
And without the added complications of communicating between two processors. Debugging is easier in HAL too, you can watch what the inputs and outputs are doing, scope them in Halscope etc etc.
I am an Arduino fan, I am doing quite a lot of work with them at work and I wrote a Resolver converter for LinuxCNC and the Arduino, including fast serial comms to the Mesa UART.
And I wouldn't consider using one in this role.
Please Log in or Create an account to join the conversation.
- tkamsker
- Offline
- Premium Member
Less
More
- Posts: 129
- Thank you received: 5
23 Apr 2015 16:25 #58033
by tkamsker
Replied by tkamsker on topic Another "what do I need" thread. Vmc retrofit
Hi mr who
I think you chart is wrong if i follow that right the arm would crash into the spindle ,..
I made for better read an script which is called for tool change i just posted it in here
first i check if tool pocket actual is ok you might be able to rotate the carousel !!
i put all in sub ngc files for better maintenance because from comp to drive Z axis was not possible for me ,..
Spindle stop
get Z axis out of their way therefore i have a subprogram called get_put move
Then orient Spindle wait and Check M19 Stuff this is what you need to get with your encoder done !!!!
Move Z axis in right position for change (if there is an tool in )
then arm_danger means arm goes forward where it can collide with spindle
release the tool
move z axis up
then i set switches to call my component which does the real time for rotating the carousel in right direction (shorts way) error handling to ensure right position for pocket
of course all with error handling
then i open collet go down
set blow relays for cleaning the taper
then close collet
put arm in save position
proceed with cutting
thomas
; copy von haberler examples
;2014.01.05 V1.00 TK First version to get Z Axis and Arm in
;2014.02.15 V1.00B TK Eigentlicher umbau für Componente
;2014.03.23 V2.00 TK Umbau für Komponente nccarousel.comp 1.05b 27.3
;2014.04.20 V2.01 TK Anpassung Errohandling und Move für BP412!
;2014.08.09 V2.02 TK Anpassung Armmove und Zeit
;2014.11.16 V2.03 TK Anpassung G43 Hx weil Anpassung nicht übernommen wird
;2014.11.21 V2.04 TK I6 Anpassung debian pc
o<rack_change> sub
o100 if [#<_current_tool> EQ #<_selected_tool>]
(print, current_tool = selected no action )
; succeed by returning a positive value
o<rack_change> endsub [1]
o100 endif
;
Normalfall change weitermachen
M73 (auto-restore modal settings on return)
;
(print, rack_change: loaded tool=#<_current_tool> current pocket: #<_current_pocket>)
(print, rack_change: selected tool=#<_selected_tool> selected pocket: #<_selected_pocket>)
; get z Axis in Safe Haven
M5; spindle stop
;nicht hier o<move_z_safe> call
o<tool_getput_move> call
;here Spindel Orientation !!!! for now we dont care
(print, Do M19 spindle orient here )
M19 R0
G4 P #<_ini[dwell]orient>
; unload previous tool
; check if initialized
; unload previous tool
;
carousel init zum testen----
;o200 if [#<_current_pocket> EQ 0]
;(print, current_pocket = 0 bedeutet init Carousel! )
;M68 E3 Q1 ;Qx = Pocket
;M64 P3 ; Jetzt drehen
;(print, o200 drehen)
;M66 P1 L3 Q10 ; Warte auf Digital in1 10Sek
;o200 endif
;
Normalfall bei 2en Tool
o300 if [#<_current_pocket> GT 0]
; We adjust Carousel to actual pocket => has to be empty
(print, Unload old ->Carousel has to be at current Pocket)
; no we drive armm in has to be empty
o<tool_getput_move> call [#<_current_pocket>]
o<arm_danger_position> call
M62 P #<_ini[pins]lock> ; set lock pin
G4 P #<_ini[dwell]lock_time>
;Now Z axis high
o<move_z_safe> call
G4 P #<_ini[dwell]POST_UNLOCK>
;orig nix gut o<tool_holder_clear_move> call
; o<arm_safe_position> call
;orig G4 P #<_ini[dwell]mystery> ; unsure what this is for
;? G4 P #<_ini[dwell]mystery> ; unsure what this is for
(print, Unload old Sucess)
o300 endif
;
;hier
o<move_z_safe> call
;Now make Turn Carousel
turn it
(print,Turn carousel for new tool )
M68 E3 Q#<_selected_pocket> ;Qx = Pocket
M64 P3 ; Jetzt drehen
M66 P1 L3 Q16 ; Warte auf Digital in1 18Sek
M65 P3 ; Jetzt nicht mehr drehen
; check motion.digital-in-01 = p1 !
o400 if [#<_hal[motion.digital-in-01]> GT 0]
(print, NEU motion.digital-in-01 GT 0-> 5600 =0 )
#5600 = 0
; go to new tool only if not danger
o<arm_danger_position> call
o400 else
(print, NEU motion.digital-in-01 LE 0 -> 5600 =-1 )
#5600 = -1
o<arm_safe_position> call
; Brutales Ende
o<rack_change> endsub [-1]
o400endif
M64 P #<_ini[pins]lock> ; set lock pin
M64 P #<_ini[pins]flush> ; set flush pin
G4 P #<_ini[dwell]new_tool>
;falsch M65 P #<_ini[pins]flush> ; drop flush pin
o<tool_getput_move> call [#<_selected_pocket>]
;test G4 P 10
M65 P #<_ini[pins]flush> ; drop flush pin
G4 P #<_ini[dwell]post_unlock>
M65 P #<_ini[pins]lock> ; set lock pin
; now remove magazin of spindle
o<arm_safe_position> call
G4 P #<_ini[dwell]armtime>
; now Z axis away
;wozu o<move_z_safe> call
(print,
Finnish
)
(print,#<_selected_tool>)
G43 H#<_selected_pocket>
; succeed by returning a positive value
o<rack_change> endsub [1]
m2
I think you chart is wrong if i follow that right the arm would crash into the spindle ,..
I made for better read an script which is called for tool change i just posted it in here
first i check if tool pocket actual is ok you might be able to rotate the carousel !!
i put all in sub ngc files for better maintenance because from comp to drive Z axis was not possible for me ,..
Spindle stop
get Z axis out of their way therefore i have a subprogram called get_put move
Then orient Spindle wait and Check M19 Stuff this is what you need to get with your encoder done !!!!
Move Z axis in right position for change (if there is an tool in )
then arm_danger means arm goes forward where it can collide with spindle
release the tool
move z axis up
then i set switches to call my component which does the real time for rotating the carousel in right direction (shorts way) error handling to ensure right position for pocket
of course all with error handling
then i open collet go down
set blow relays for cleaning the taper
then close collet
put arm in save position
proceed with cutting
thomas
; copy von haberler examples
;2014.01.05 V1.00 TK First version to get Z Axis and Arm in
;2014.02.15 V1.00B TK Eigentlicher umbau für Componente
;2014.03.23 V2.00 TK Umbau für Komponente nccarousel.comp 1.05b 27.3
;2014.04.20 V2.01 TK Anpassung Errohandling und Move für BP412!
;2014.08.09 V2.02 TK Anpassung Armmove und Zeit
;2014.11.16 V2.03 TK Anpassung G43 Hx weil Anpassung nicht übernommen wird
;2014.11.21 V2.04 TK I6 Anpassung debian pc
o<rack_change> sub
o100 if [#<_current_tool> EQ #<_selected_tool>]
(print, current_tool = selected no action )
; succeed by returning a positive value
o<rack_change> endsub [1]
o100 endif
;
Normalfall change weitermachen
M73 (auto-restore modal settings on return)
;
(print, rack_change: loaded tool=#<_current_tool> current pocket: #<_current_pocket>)
(print, rack_change: selected tool=#<_selected_tool> selected pocket: #<_selected_pocket>)
; get z Axis in Safe Haven
M5; spindle stop
;nicht hier o<move_z_safe> call
o<tool_getput_move> call
;here Spindel Orientation !!!! for now we dont care
(print, Do M19 spindle orient here )
M19 R0
G4 P #<_ini[dwell]orient>
; unload previous tool
; check if initialized
; unload previous tool
;
carousel init zum testen----
;o200 if [#<_current_pocket> EQ 0]
;(print, current_pocket = 0 bedeutet init Carousel! )
;M68 E3 Q1 ;Qx = Pocket
;M64 P3 ; Jetzt drehen
;(print, o200 drehen)
;M66 P1 L3 Q10 ; Warte auf Digital in1 10Sek
;o200 endif
;
Normalfall bei 2en Tool
o300 if [#<_current_pocket> GT 0]
; We adjust Carousel to actual pocket => has to be empty
(print, Unload old ->Carousel has to be at current Pocket)
; no we drive armm in has to be empty
o<tool_getput_move> call [#<_current_pocket>]
o<arm_danger_position> call
M62 P #<_ini[pins]lock> ; set lock pin
G4 P #<_ini[dwell]lock_time>
;Now Z axis high
o<move_z_safe> call
G4 P #<_ini[dwell]POST_UNLOCK>
;orig nix gut o<tool_holder_clear_move> call
; o<arm_safe_position> call
;orig G4 P #<_ini[dwell]mystery> ; unsure what this is for
;? G4 P #<_ini[dwell]mystery> ; unsure what this is for
(print, Unload old Sucess)
o300 endif
;
;hier
o<move_z_safe> call
;Now make Turn Carousel
turn it
(print,Turn carousel for new tool )
M68 E3 Q#<_selected_pocket> ;Qx = Pocket
M64 P3 ; Jetzt drehen
M66 P1 L3 Q16 ; Warte auf Digital in1 18Sek
M65 P3 ; Jetzt nicht mehr drehen
; check motion.digital-in-01 = p1 !
o400 if [#<_hal[motion.digital-in-01]> GT 0]
(print, NEU motion.digital-in-01 GT 0-> 5600 =0 )
#5600 = 0
; go to new tool only if not danger
o<arm_danger_position> call
o400 else
(print, NEU motion.digital-in-01 LE 0 -> 5600 =-1 )
#5600 = -1
o<arm_safe_position> call
; Brutales Ende
o<rack_change> endsub [-1]
o400endif
M64 P #<_ini[pins]lock> ; set lock pin
M64 P #<_ini[pins]flush> ; set flush pin
G4 P #<_ini[dwell]new_tool>
;falsch M65 P #<_ini[pins]flush> ; drop flush pin
o<tool_getput_move> call [#<_selected_pocket>]
;test G4 P 10
M65 P #<_ini[pins]flush> ; drop flush pin
G4 P #<_ini[dwell]post_unlock>
M65 P #<_ini[pins]lock> ; set lock pin
; now remove magazin of spindle
o<arm_safe_position> call
G4 P #<_ini[dwell]armtime>
; now Z axis away
;wozu o<move_z_safe> call
(print,
Finnish
)
(print,#<_selected_tool>)
G43 H#<_selected_pocket>
; succeed by returning a positive value
o<rack_change> endsub [1]
m2
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.191 seconds