Another plasma component...

More
7 years 6 months ago #130054 by Mike_Eitel
I was wondering what is if you pas an already done cut. There I would gues a difference between voltage and emitted light. Just m5c.
P. S.
Tried to find a better distance measuring for my 3D printer in Marlin for bed leveling and gave up after some crazy ideas that did not work.
For plasma distance I'd try some triangulating lasers on first thought but expect uv light problems after ignition.

Please Log in to join the conversation.

More
7 years 6 months ago #130058 by PCW
Replied by PCW on topic Another plasma component...
I think one reason plasma voltage is the most common torch height sensing method
is that the environment near the torch is so nasty in terms of electrical noise and particulate matter that optical systems would tend to have a short lifetime.

That might be soluble with clean air purging of the optical path however

I do wonder if initial height sensing could be done with a sensitive back pressure sensor (inches of water) with a low (sensing) air flow rate

Please Log in to join the conversation.

More
7 years 6 months ago #130068 by phillc54
It appears that hal pins cannot be read or set from python while a program is running and this causes problems with the way I have done gcode overrides.
I am going to have to completely rethink how to achieve this so I will need to strip all this related code out of the repo.
I will post again when I have finished this.

Cheers, Phill.

Please Log in to join the conversation.

More
7 years 6 months ago #130082 by rodw
Replied by rodw on topic Another plasma component...
Phill, I vote and I am sure that John will second the motion that motion.annalog-00 is reserved for plasma operations.

This component to enable and disable THC operation is part of it
forum.linuxcnc.org/plasma-laser/32700-co...hc-from-within-gcode

This gmoccappy python file has a decode from file option that John came up with at around line 366
It is possible to fold a number of functions into this sinfgle analog pin if the most significant digit (or a numeric range) is used to denote the function and the rest of the number the relevant setting value.

Attachment not found


Code:
#ISLANDER - this function is used to decode command from gcode file # if real time control of height hold is desired then 1X and 2X need to be # decoded in a realtime component def on_new_command_from_file(self, hal_pin, data = None): if hal_pin.get() != 0: command = hal_pin.get() #THC run from file if 20 <= command < 30: self.halcomp["lock-height-from-file"] = False #no need to decode I% here no Hypertherm RS-485 # height hold from file elif 10 <= command < 20: self.halcomp["lock-height-from-file"] = True #no need to decode I% here no Hypertherm RS-485 #global THC on elif 900 == command: self.hal_btn_THC.set_active(True) # global THC off elif 999 == command: self.hal_btn_THC.set_active(False) #get arc voltage elif 360 <= command < 400 or 3060 <= command < 3201: if command >= 3060: command = command - 3000 else: command = command - 300 self.halcomp["target-voltage"] = command self.lbl_prog_volt.set_label("%d" % command) #get preset Amps not actually used elif 410 <= command < 500 or 4000 <= command < 4201: if command >= 4000: command = command - 4000 else: command = command - 400 #nothing else to do here for now #get arc servo delay time elif 50 <= command < 60 or 500 <= command < 600: if command >= 500: command = (command - 500) else: command = command - 50 self.adj_THC_delay.set_value(command) #get THC tune elif 710 <= command < 720: command = command - 710 #nothing to set yet elif 80 <= command < 90 or 800 <= command < 900: if command >= 800: command = (command - 800) else: command = command - 80 self.adj_pierce_delay.set_value(command)

Remember that the python code is in user space hence the component to enable and disable the THC is in real time.

Please Log in to join the conversation.

More
7 years 6 months ago #130084 by phillc54
OK, everything is back how it was...

rodw wrote:
This component to enable and disable THC operation is part of it/quote]
Thanks Rod, I will have a good look at this tomorrow.

Cheers, Phill.

Please Log in to join the conversation.

More
7 years 6 months ago #130093 by andypugh

phillc54 wrote: It appears that hal pins cannot be read or set from python while a program is running and this causes problems with the way I have done gcode overrides.


How are you reading HAL pins?
If your python code creates its own HAL pins, and those are linked in HAL, then they will update in hard real time.
(Though the Python code itself will not be running in real-time)

Please Log in to join the conversation.

More
7 years 6 months ago #130105 by Zultan
Replied by Zultan on topic Another plasma component...
Hi Phil, thanks for your amazing work on this component. I have been running it on a my plasma for about a week and everything seems to be working well functionality wise. I had a few problems converting it over to a real machine which I think may be bugs. (For reference I am running Axis gladevcp with a hypertherm powermax 45 and Proma THC. )
  1. Axis starts up in mode=0 even though I set MODE=2 in the plasmac.ini. I got around this my manually setting the pin in the plasmac.hal with:
    Code:
    setp plasmac.mode 2
  2. I have problems saving values entered into the configuration tab (probe speed, pierce height, etc). If i manually edit the .cfg file and restart linuxcnc I can see that the values update however the save button doesn't seem to work. (This may be me not understanding how to configure everything)
  3. If the table is setup to have homing switches and software limits on the z axis. If you use a work offset (g54 in his case) and touchoff a little way above the material the torch will not be able to probe down and will instead give an error because of:
    Code:
    net p_comp:axis-min-limit ini.z.min_limit => plasmac.axis-z-min-limit
    I'm not sure of the expected behavior here so i simply:
    Code:
    sets p_comp:axis-min-limit -50
    and assume that the software limits will stop the torch from traveling past the table's z.min_limit.

    Thank you for all your hard work, the code you created is very well organised and well written. I found working with it very easy and intuitive.

Please Log in to join the conversation.

More
7 years 6 months ago #130106 by islander261
Guys

I have changed the way the way I decode the M67, M68 commands from Gcode. I now use a hal component to get the changes and use the python handler to update the screen state. I will post the code when I get out to the shop. The usual warnings, it works well enough for me but may contain logic errors that cause bad things with corner cases.

John

Please Log in to join the conversation.

More
7 years 6 months ago #130114 by islander261
Guys

Here is what I do right now. The only parameters I actually change from Gcode are the global THC enable and the THC servo enable. The global THC enable isn't needed unless you want to switch on an external THC controller. So the connection from Gcode is:
Code:
# hook up command from Gcode net gcode-command <= motion.analog-out-00 net gcode-command => plasma_tab.Command-From-File

And the connections to the real time decode bit:
Code:
#get gcode file commands connected net gcode-command => decode-gcode-file-cmds.command-value net gcode-servo-enable <= decode-gcode-file-cmds.gcode-servo-enable net gcode-global-THCon <= decode-gcode-file-cmds.gcode-global-THCon #get gui command source switch #net use-control-params <= plasma_tab.use_control_params #OR THC on sources net gcode-THCon => or2.global-THCon.in0 net THC_enable_link_main => or2.global-THCon.in1 net mixed-THCon <= or2.global-THCon.out #AND gcode THCon net gcode-servo-enable => and2.THCon.in0 net gcode-global-THCon => and2.THCon.in1 net gcode-THCon <= and2.THCon.out #select THC enable source net mixed-THCon => mux-gen.00.in-bit-00 net THC_enable_link_main => mux-gen.00.in-bit-01 net use-control-params => mux-gen.00.sel-bit-00 net selected-THCon <= mux-gen.00.out-bit #interlock THC servo enable with arcok signal net arcok => and2.thc-enable.in0 #net THC_enable_link_main => and2.thc-enable.in1 net selected-THCon => and2.thc-enable.in1 net switched-arcok <= and2.thc-enable.out

Sorry the code is such a mess, I get pretty random at times. The real time decoder is needed to make it work when a Gcode file is running for some reason the python to hal connection misses most of the changes then. At least I couldn't get to work reliably without the real time component.

John

Please Log in to join the conversation.

More
7 years 6 months ago #130120 by phillc54

andypugh wrote:
How are you reading HAL pins?

I am trying to detect a change in a HAL pin from python using hal.get_value().
I will try later today using halcmd from popen.

islander261 wrote:
The real time decoder is needed to make it work when a Gcode file is running for some reason the python to hal connection misses most of the changes then. At least I couldn't get to work reliably without the real time component.

That seems similar to what I am seeing.


Zultan,
Thanks for the feedback. I will have a look at these issues after I sort out this issue I am working on.

Cheers, Phill.

Please Log in to join the conversation.

Time to create page: 0.346 seconds
Powered by Kunena Forum