Useful Plasma Thread

More
04 Aug 2018 21:12 #115618 by tommylight
Replied by tommylight on topic Useful Plasma Thread
That button is to cool, until someone punches it thinking it is a real button !! :)

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

More
04 Aug 2018 22:57 - 04 Aug 2018 22:58 #115623 by Grotius
Replied by Grotius on topic Useful Plasma Thread
This week i want to check the Inkscape drag knife python code. It's a usefull code to make a cnc plasma bevel head moving around.
I tested my prototype bevel head last year with succes. I made a bevel head with 4'th axis drag knife input.

My goal now is to make new written real time components ready for the linux plasma gui.

I must make a clean process structure for the plasma tool library to integrate in the plasma gui. I have to load external text file's
into the linuxcnc gui to load the available current tool list's of different plasma manufacturers.

@Tommy,

If you have touch screen, then it's good !! There is a very nice cheap one the marked i tested. It's beginning with Hans....Touch
Last edit: 04 Aug 2018 22:58 by Grotius.
The following user(s) said Thank You: tommylight

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

More
06 Aug 2018 21:24 - 06 Aug 2018 21:30 #115692 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Remembering the first post of this topic :

Rod :

So I thought I'd create a link to it in the plasma section here because it covers how to fix gremlin displays and also how to sense if you lose the arc while cutting and pause the running program.


Rod, we are now at the moment for writing the new thc plasma component compabtible with the external offset branche, adaptive feed branche.

I started compiling this first letter to the external offset thc branche and it works... Am i on master? :blink:
component THC2 "Torch Height Control for stepper and servo machines, compatible with external offset branche";

description 
"""

Todo

""";
 
author "Newbie Anonimous";

license "GPLv2 or greater";

option singleton yes;

// Input Pins
pin in float Gcode_current_line    "read in current g-code line";
pin in float Gcode_go_back_value   "the value in g-code lines to restart back";
pin out float Gcode_restart_line   "the G-code line to restart";

pin in bit THC_enable_in           "enable the thc component fuction";
pin in bit Torch_on_M3             "connect to motion.spindle-on";
pin in bit Arc_ok                  "connect to THC arc oke signal";

pin in float Ingition_time_out     "time for torch to fire up, input time in millisecond, float in"; 
pin in float Pierce_delay          "the pierce delay value in seconds, float in";
pin in float Pierce_height         "the pierce height value in mm, float in";

pin in bit Enable_autostart_retry  "automatic restart procedure, pin in";  
pin in float Autostart_retry       "the number of retry, float in";

pin in bit Enable_probe            "enable probing before torch start, bit in";
pin in bit Probe                   "connect to motion.probe-input, probe trigger";
pin in float Probe_height_offset   "the value for height sensor offset in mm, float in";

pin in bit Enable_probe_xy_offset  "do we want to probe not each time, but probe over input xy distance";  
pin in float Probe_xy_offset       "the probe distance value, float in";

// Output Pins
pin out bit THC_enable_out         "monitoring signal";
pin out bit Pause_machine          "connect to motion.feed-hold/inhibited, dont know the difference at this moment";

pin out bit Mesa_torch_up          "6";
pin out bit Mesa_torch_down        "7";

// Global Variables
variable float Time;


function _;

;;

#include "rtapi_math.h"

FUNCTION(_) {

       //main function between {}

               //sub function between {}

       
       if(THC_enable_in){              // no comments today.
            THC_enable_out  = 1;       // plc callback.
 
                  if(Torch_on_M3){ Time = Time + 1 ;}   // maybe this should take real time milliseconds in the bitcoin python coded trade war, this is c coded ....

                       if(Ingition_time_out > Time){Pause_machine = 1;}                  

                  else {Pause_machine = 1;}
        }


        if(!THC_enable_in){ 
            THC_enable_out  = 0;      // plc callback.

        }

        if(!Torch_on_M3){ Time = 0 ;}  // reset Time for ignition time out     
}

This short code is the beginning to build up the function's in the real time torch height control component.
It's coded in a sort of C language instead of Python. I like c because it's speeding up the process.
Therefor this file has to be compiled from .comp to .so
When it's a .so file, you only see machine language... This is just like uploading filmware on a FPGA chip.
Last edit: 06 Aug 2018 21:30 by Grotius.

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

More
09 Aug 2018 18:16 - 09 Aug 2018 19:40 #115848 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Guy's,

I have worked for 2 day's now on a new plasma hal component compatible with the external offset branche.
It's working on inkscape. Inkscape has only to put out a M3 and M5.

This plasma component is working just like the orginal Toma thc hal code. The difference is, this component is not build in Hal, but
in C program language. My C was not so good when i started building this component, but i am getting better each day, Rod is advising me by e-mail.

So the component does at this moment :

Travelheight
Pierceheight
Piercespeed
Piercedelay
Arc_ok

Coming day's i expand this component with more signals, like torch up and down, restart function, etc.



For the fun i will make a hal schematic from my hal system at this moment. You will see the difference with the Toma hal file.
Hmm, i have problems with making hal schematic with run in place linuxcnc version. Error is :
grotius@grotius:~/Desktop$ python dot.py | dot -Tpng > mymachine.png
rtapi_shmem_new failed due to shmget(key=0x48414c32): Invalid argument
HAL: ERROR: could not open shared memory
halcmd: hal_init() failed: -22
NOTE: 'rtapi' kernel module must be loaded
Error: <stdin>: syntax error in line 5 near '}'
grotius@grotius:~/Desktop$ ^C
grotius@grotius:~/Desktop$ 

Maybe i miss some sudo argument. Starting run in place as sudo, has no influence also. It refuse to boot up as root in run in place.

A nice solution is : making your own iso 64 bit stretch version of linuxcnc. Then i got no problem's but for now i can't make a virtual hal diagram.
Attachments:
Last edit: 09 Aug 2018 19:40 by Grotius.

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

More
10 Aug 2018 19:01 - 10 Aug 2018 19:22 #115866 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Guy's,

This is going good....
This post is about a new c component i am writing to do a THC function for inkscape with only M3 and M5 as input. Just like Professor Toma did a few years ago in the hal.

The normal thc function without probe function works well. I added a button to my user screen to enable the probe function.
Now i am writing at the probe function. The function is now working. It saves the probe height, and make switch offset and it go's
to pierce height. Tomorrow i will do the rest.

But i test this with a break out board each time, and i am very impressed about the C language. It is much easer then writing a thc module in the hal section, just like Toma did in the past. You see, in a few lines of C you can do great things, My C level is 1%, but it works. I can ask Rod if he can make modification's after the full code is perfect to use.

For now i am very pleased with this succes.
component THC2 "Torch Height Control for stepper and servo machines, compatible with external offset branche";

description 
"""

Todo

""";
 
author "Grotius CNC Machines";

license "GPLv2 or greater";

option singleton yes;

// Input Pins
pin in bit Enable                  "Enable THC function";
pin in float Travelheight          "Z axis travelheigt in";
pin in float Cutheight             "Z axis cut height in";
pin out float Speed                "Z axis speed out";
pin in float Piercespeed           "Z axis pierce speed in";
pin in float Piercedelay           "Z axis pierce delay time in seconds";
pin in float Maxspeed              "Max Z axis speed value in";
pin in float Zpos_in               "Connected to external offsets z input";
pin out float Zpos_out             "Connected to external offsets z output";
pin in float Zpos_cmd_in           "Connectod to external offsets z real time current z axis position input";

pin in float Pierceheight          "the pierce height value in mm";
pin out float Offset               "Z axis Offset command to external offsets, the z axis is moving to this offset when set, even in pause";

pin in bit Torch_on_in             "Connected to spindle-cw";
pin out bit Torch_on_out           "Torch start signal, connect to parport output";

pin in bit Probe_enable            "Connected to user interface button";
pin in bit Probe_in                "Connected to Probe input sensor";
pin out bit Probe_high              "If probe is triggered this pin becomes high";
pin in float Probe_z_limit         "Connected to user interface input, z axis probe end limit. For example Z -10 = probing to max Z-10.";
pin in float Probe_switch_offset  "Probe sensor switch correction value, positive z-value";

pin in bit Arc_ok_in               "Connected to THC arc oke signal";

pin out float Timeloop             "Timeloop for pierce function";
pin out bit Piercetime_reached     "Piercetime reached";


// Output Pins
pin out bit Pause_machine          "Connect to motion.feed-hold-inhibited";

// Global Variables
variable float x;
variable float y;
variable float z;
variable float a;
variable float b;
variable float c;
variable double time;


function _;

;;

#include "rtapi_math.h"
#include "stdlib.h"
#include "stdio.h"




FUNCTION(_) {  Zpos_out = Zpos_in; 

         x = Pierceheight;
         y = Zpos_cmd_in; 
         z = Travelheight;
         a = Cutheight;  


   if(Enable && !Probe_enable){
    
         if(Torch_on_in){Offset = Pierceheight;}  

         if(!Torch_on_in){Offset = Travelheight; Pause_machine = 0;}  

         if(!Torch_on_in && (z > y) ){Pause_machine = 1; Torch_on_out = 0; Speed = Maxspeed;} 
         if(!Torch_on_in && (z < y) ){Pause_machine = 1; Torch_on_out = 0; Speed = Maxspeed;}    
         if(!Torch_on_in && (z == y)){Pause_machine = 0; Torch_on_out = 0; Speed = Maxspeed;}  
             
         if(Torch_on_in && (x > y) ){Pause_machine = 1; Speed = Maxspeed; time=0;}      
         if(Torch_on_in && (x < y) ){Pause_machine = 1; Speed = Maxspeed; time=0;}   
         if(Torch_on_in && (x == y)){Pause_machine = 0; Torch_on_out = 1; Speed = Maxspeed;} 
       
         time += fperiod; 
         if(Torch_on_in){time += fperiod; Timeloop = time;}                     
         if(Timeloop >= Piercedelay){ Piercetime_reached = 1;}
         if(!Torch_on_in){time = 0; Timeloop = time; Piercetime_reached = 0;}     
                            
         if(Torch_on_in && Torch_on_out && Piercetime_reached ){Pause_machine = 1; Offset = Cutheight;}          
         if(Torch_on_in && Torch_on_out && (a == y) && Arc_ok_in){Pause_machine = 0; Speed = Piercespeed; }      
         if(Torch_on_in && Torch_on_out && (a == y) && !Arc_ok_in){Pause_machine = 1; Speed = Piercespeed; }   
         if(Torch_on_in && Torch_on_out && (a < y) ){Pause_machine = 1; Speed = Piercespeed; }
         if(Torch_on_in && Torch_on_out && (a > y) ){Pause_machine = 1; Speed = Piercespeed; }

   }
   if(Enable && Probe_enable){

         if(!Torch_on_in){Offset = Travelheight; Pause_machine = 0;} 
         if(Torch_on_in && !Probe_in){Offset = Probe_z_limit; Pause_machine = 1;}  
         if(Torch_on_in && Probe_in){b = Zpos_cmd_in; Probe_high = 1;} //save actual position in b
         
         if(Torch_on_in && Probe_high){Offset = b + Probe_switch_offset + Pierceheight;}


   }

   if(!Enable){
         Offset = 0; Pause_machine = 0; Speed = Maxspeed;//reset 
   }
}


Today is was working at this milling monster :


I made a test for customer :

In steel top plates, no problemo, speed 4000mm/min. :
Attachments:
Last edit: 10 Aug 2018 19:22 by Grotius.
The following user(s) said Thank You: tommylight

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

More
10 Aug 2018 23:34 #115873 by rodw
Replied by rodw on topic Useful Plasma Thread
Great progress Grotius.
I can ask Rod if he can make modification's after the full code is perfect to use.
I had planned to write a touchoff component and had written some notes over the last few days. This post was the catalyst to spend some writing some code using a case statement but there were a few things I did not understand. It looks like Grotius has filled in most of the gaps in my knowledge so I am hopeful I will be able to finish this off over the next couple of days.
The following user(s) said Thank You: tommylight

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

More
11 Aug 2018 17:36 - 11 Aug 2018 17:38 #115899 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Rod,

Today i have tested the component on a real plasma machine. It work's realy amazing !
It's real time responding to the user interface ( screen ) input signals, so if you change settings like pierceheight, or travelheight,
you see the machine is direct responding on the input signals. It's always nice to see a machine executing your orders real time. B)

One little issue i had and solved, when i use a glade spinbox and add a value of 2.5mm cut height, the component code was not responding. Machine stayed in pause. When i use full value's for this item, it worked directy. So it is a float signal, but maybe i missed something here. The problem is in fact outside of the component.

I now go further with the probe function, restart function, etc.

For my user interface, i want to make a xml file load in coupled to the component input value's, at this way we can load tool list's.
Last edit: 11 Aug 2018 17:38 by Grotius.
The following user(s) said Thank You: tommylight

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

More
11 Aug 2018 20:35 #115915 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi i am thinking about the Mesa equipment that measures the actual THC arc voltage input and how to implement this voltage input value to the new component.

I added a short list that is connected to the new component at this moment. It's a list that works, names can be changed.


If we add in the component a input from the Mesa ad board:
float in mesa input_arc_voltage
We can add an optional calibration value for Mesa hardware, that we can calibrate with a volt meter, but for now not important.
in the component :
float in Mesa_arc_voltage_calibration_value
In the postgui.hal :
For example : setp THC2.Mesa_arc_voltage_calibration_value 0.981

So if we have the voltage input, let's say 267 volt dc on our linux plasma screen. What does this say to us?

1. We have to make a voltage input reaction channel. Let's say 5 volt's.
2. The THC delay function at start. Not the Pierce delay, but THC delay at start in seconds. This is the time THC is not responding,
cause of fluctuating voltage during plasma start. Stable arc voltage is usually up 1.5 to 2 seconds and monitoring only at cut height.
3. If we cross a kerf or stay for long time in a corner, we need some of " corner lock? " or " pierce gap? "
For both item's we can make a formula. But i think a good formula has to have a Arc voltage time logger for a periode of 3-5 seconds, with log's for 0.1 seconds, and must be able to interpolate the logged data, when " corner lock ' or " pierce gap " is set true.
It's not as easy as making a minmax component. This is about logging the gap and the corner. The corner has also a speed issue we can use as input value. But the cleanest way is to use a voltage logger.

Who has input?
Attachments:

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

More
11 Aug 2018 21:20 - 11 Aug 2018 21:22 #115919 by Grotius
Replied by Grotius on topic Useful Plasma Thread
For the logger, maybe i have a idea :

If we log the plasma arc voltage continue for 5 second's, we can make the minmax. We can calculate the perfect value.
But we can also set the perfect value by hitting a screen button when the plasma arc is visual perfect.

If during cutting there is a big hole, or gap, or kerf cross, we have the :

1. voltage thc reaction input ( 0 to 20 volts dc, standard set on 5 volts )
2. thc correction speed ( z-axis thc correction speed integrated in the function, just as pierce speed, etc )
3. The interpolated perfect destination height during the past 5 seconds of logging
4. The time value within we react to voltage differences. ( 0.1 to 5 seconds )
5. The minimal torch height control possible value in mm
6. The maximum torch height control possible value in mm
7. Hysteris

Attachments:
Last edit: 11 Aug 2018 21:22 by Grotius.

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

More
11 Aug 2018 22:59 #115925 by tommylight
Replied by tommylight on topic Useful Plasma Thread
In my opinion 5 seconds is to much for anything that has to do with plasma, but i do see the reasoning for having say 1 second of min/max values to get a median value and use that as a reference point for the cutting ahead.
Just as some additional info that is not verified in any way shape or form, the PROMA uses small relays for the output so i doubt it can do more than 10 to 20 pulses per second and that 1/10 or 1/20 of a second is enough for the torch to fire and settle voltage enough to continue cutting without issues.
It is also enough to cut at 7000mm/minute on a fairly flat sheet of metal. It is not enough to cut corrugated metal plates that are 0.6mm thick.
On the other side, the THCAD with any Mesa board can measure the torch voltage 1000 times per second, and that is to much for what it needs to do, but it is perfect for that corrugated 0.6mm plate given the Z axis is capable of moving fast enough.
Then again, i wonder, if a servo motor with encoder can count RPM and adjust the speed 1000 times per second, and keep a constant speed easily, why no one got to implement that same servo loop for controlling THC voltage ??? It already has everything implemented except the spindle output would be coupled to Z axis position. Also no servo control should be active before getting the ARC OK signal and subsequently it would have to cut that servo control at an M5 instantly to avoid having the torch move up or down. That would also require having voltage limits that would govern at what voltage should the servo start and stop, say start at 90 and stop servoing at 130.
To tired, need badly some sleep.
The following user(s) said Thank You: Grotius

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

Moderators: snowgoer540
Time to create page: 0.196 seconds
Powered by Kunena Forum