Useful Plasma Thread

More
8 years 2 months ago - 8 years 2 months ago #116428 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Rod,

Thanks.

I am now constructing the code in blocks (cases), i think i will improve a lot of code coming time.

Here a temponary example :
github.com/michelwijnja/external_offsets...onents/THC2_REV.comp

When to use the return; / return 0; or return -1; statement is a little difficult for me to understand.
Last edit: 8 years 2 months ago by Grotius.

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

More
8 years 2 months ago #116442 by rodw
Replied by rodw on topic Useful Plasma Thread

Grotius wrote: Hi Rod,
When to use the return; / return 0; or return -1; statement is a little difficult for me to understand.


Great to see improvement. One day you will be as good as Andy!

the return value can be what you want it to be as the programmer.
Sometimes a return value might be a calculated value. an example of this might be the C pow() function
Code:
x2 = pow(x,2) ;// return x raised to the power of 2 (eg. x^2 in an Excel spreadsheet)
Other times it might signify an error code or status. Often 1 or 0, for true and false
Code:
if(istrue()) printf("istrue returned TRUE\r\n"); else printf(istrue returned FALSE\r\n");

or a longer version of using istrue
Code:
int i; i = istrue(); if(i==1) printf("i = TRUE\r\n"); else printf("i = FALSE\r\n");

Some coders will decide that -1 always signifies an error so that you can always check that there is no error in a program.
Other coders might make a list of errors in a string array somewhere and the returned value is an index into that array
It all depsnds on what you the programmer want to do. The best way is to read other code. why not look in the src/emc folder and just try and read some code and see how other people do it
The following user(s) said Thank You: Grotius

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

More
8 years 2 months ago - 8 years 2 months ago #116475 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi,

I have cutted several steel plates with linuxcnc.

The probe function over distance works great ! And also normal cutting without probe go's good. I prefer to use the probe function
with a xy distance of 200mm.

If there is a start fault, restart at certain line is a bit of a problem. I also tried this in the Gmocappy screen, same issue.
The error is "arc radius differs from ...." So restart at certain line was not possible for me, only restart from line 1 worked.
But i have a nice solution. Doing some adaptive feed negative, we start where we want at the current cutting path and restart is done by clicking enable off and on. Later in the code i will make a restart button and do this automaticly with adaptive feed negative for about 2 second's. The the machine wil move a little back and fires the torch again. So this is nice.

After loading a new ngc file i want to make a automatic clear plot command in the python code. The old ngc remains in the screen.
After clicking clear plot it is gone.

Proma has the D-t value. this is now 1.5 seconds at my machine. With a value of 0 second's the machine is diving at start a
little bit. So for Mesa and Proma users i will make anti dive button with a timer function.

I have to check the glade auto screen resize option's for different monitor resolution's.

I tried to make a startup ngc code in the ini file, for Macro code's M52 P1, this is not working. Adapting this code as mdi code
in the c code is the solution then i think.

What i am missing also is a feed overide control on my screen, and a control to manage the z axis speed seperatly from x and y axis.

For the rest i coded the component in case's. But with to many cases i mentioned problem's. So what i am using at the moment,
a component with 3 or 4 cases, this is going perfectos.



Almost forgot. Between the M5 and M3, when traveling at travelheight i need to check the arc ok signal / torch volts in. One time the torch stayed on. So when monitoring that, there will be no second time.
Last edit: 8 years 2 months ago by Grotius.
The following user(s) said Thank You: tommylight, rodw, scubawarm

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

More
8 years 2 months ago #116483 by scubawarm
Replied by scubawarm on topic Useful Plasma Thread
Just want to say... You are the man! My complete retrofit project has been delayed several times mostly because of manpower shortages BUT I am going to be hitting it full time starting Sept. 4 with a goal of getting it at least functional in 30 days time. As I will be physically leaving the country again and will be impossible to finish without another 2 month delay.

I am so thankful I had these prior delays as now I have something to actually work from. This is a very high voltage machine and will be a testimony to LinuxCNC and your work. BTW mine will be on Mesa. Again Thank you so very much for your time and sharing.
The following user(s) said Thank You: Grotius

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

More
8 years 2 months ago #116514 by snugglylovemuffin
Sweet, any way to easily implement this yet?

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

More
8 years 2 months ago - 8 years 2 months ago #116559 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi,

Sweet, any way to easily implement this yet?

how to install

In the readme file i added 2 comment's on the end of readme file. One for turning on adaptive feed and one for fixing rounded
corners. In the next update this is implemented in the source code.

Today i have started with python code for saving the plasma screen parameters to files that can be saved and load in the program.
It works !

A sample to write a text file in simple way :
Code:
def on_save_settings_as_pressed(self, widget, data=None): value = self.widgets.Travel_height.get_value() print(value) f= open("45amp_4mm_inox.txt","w+") f.write("Travelheight\r\n") f.write("%d\r\n" % (value)) f.close()
w+ means write, a+ means append / or adding lines, but w+ is good, we write everything at once. We don't want to be too
late for starbuc's coffee.
The first line it writes the text : Travelheight.
The second line it writes the text : value, this is the actual screen value of Travelheight.

So the text file, where the plasma tool is defined, in this example 45amp_4mm_inox.txt looks like this :
Code:
Travelheight 10 Cutheight 0 and so on.

A sample of reading the value's back by selecting a file name, typed in a text entry box :
Code:
def on_load_settings_pressed(self, widget, data=None): x = self.widgets.entry.get_text() f=open(x, "r") if f.mode == 'r': content =f.readlines() print content[0] # actual line 1 in file. y = float(content[0]) self.widgets.Travel_height.set_value(y)

Now this reading and writing is working i will make the python code complete for all the parameters used for the component driven plasma program. The advantage is, that we now can make tool lists for different plasma machines, load them, save then and share them etc.
I will make standart tool list's, just like the Trump laser company is providing them.

After this is done, i will do the keyboard buttons to move the machine with keyboard. This example is giving a time ago by
Mr Morley, thanks to this example.

I have added a machine on button with 3 colors next to the emergency brake. Then it is better to see in what senario the machine is.
I have used it, and when it's orange i know it's only the internal emergency stop. So this is nice.

Color external emergency brake : red
Color internal emergency brake : orange
Color machine on : green

Maybe i add a blue color too, incicator for running program in auto mode.

I will work to simplyfy the plasma screen again. Now almost every plasma parameter is implemented in the component.
Using tool list's, it will not longer be a must too see every parameter on the main screen.
So the screen will be simplyfied. This is the current layout.


@Perry,

Thank you for your post.
and will be a testimony to LinuxCNC and your work.
That would be nice !
BTW mine will be on Mesa.
If you have your machine working with a standard and clean config, we can modify the hal and ini section.
But maybe we have already a mesa config for you at that time from someone else.
If you want to try the grotius config, still in development, you can install it. Rodw can do it for you with teamviewer.
Maybe Rodw can sent pre installed static (new type) hard drives around the world. That would be nice.
Last edit: 8 years 2 months ago by Grotius.

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

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