Useful Plasma Thread

More
8 years 3 months ago #114426 by tommylight
Replied by tommylight on topic Useful Plasma Thread

Grotius wrote: @Tommy,

Very good !
How did you write the Toma code? Making this code is almost impossible to do without being a expert. So that's why
i have repect for you. Even proma has used your code.


I did not write all of it, some other Linuxcnc user wrote most of it, it has parts of 2 configs put together and added what was needed to work properly with the UP/DOWN/ARCOK THC types. Also removed the need for a second parallel port as that made further complications for most users. Also some motherboards tend to change the PCI card addresses at random when set to automatically configure PCI bus so it would end up needing an address change quite often.
The code itself is made out of many components and logic and can be understood if followed carefully, but it is complicated and hard to process without some visual help. I did search today for a PDF that i had found at the time i did that config and that helped immensely to grasp what was going on, but i could not find it.
I have to e-mail Proma the new config after some cleaning and more user friendly explanations i made on Sunday.
Regards and thank you for all your work to improve Linuxcnc.

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

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

Yesterday i had an issue about the limited M code list. We can go up to M999. We just have to change some things.

These codes are currently undefined in the current implementation of LinuxCNC
and may be used to define new M-codes:

M10
M11 M12 M13 M14 M15 M16 M17 M18 M19 M20
M21 M22 M23 M24 M25 M26 M27 M28 M29 M31 M32 M33 M34 M35 M36 M37 M38 M39 M40
M41 M42 M43 M44 M45 M46 M47 M54 M55 M56 M57 M58 M59 M74 M75 M76 M77 M78 M79 M80
M81 M82 M83 M84 M85 M86 M87 M88 M89 M90
M91 M92 M93 M94 M95 M96 M97 M98 M99

All codes between `M199` and `M999`.


So we can go up to M999. That is nice !! But i think we can go up to M10000 if we want, lets try it.
It is easer to understand M3 is related to M300 and so on.

For today my investegation ended here at line 148 : github.com/LinuxCNC/linuxcnc/blob/master...4ngc/interp_array.cc
At this moment i want a good time with my wife.

For tommorrow i have a new github linuxcnc version to try the exended Macro M999 and also try M10000.
You can see if it is working if it has a star. B)
github.com/michelwijnja/External_offsets...tive_feed_macro_plus
Last edit: 8 years 3 months ago by Grotius.

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

More
8 years 3 months ago #114536 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Update :

Expanding the M codes was succesfull in one file after compiling. I expanded the M-code array.
But it still is complaning after compiling and testing in terminal about : Uber 200 is not allowed.
So there is another file that is related to this maximum number.
github file
But now i have to find the other related files. The terminal give's to less information to solve this quickly. Is there a log file
that can trigger every single program step?
So i must look file by file tomorrow. :woohoo:

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

More
8 years 3 months ago #114539 by rodw
Replied by rodw on topic Useful Plasma Thread
Rather than trying to use M300, why not pick a range say M300-M399?

Then you could use M303 to pair with M3 in a logical manner. I don't think its a good idea to hack into the Linuxcnc core model.

I've added one more box to my diagram "touchoff exclusion". Say you don't want to touchoff until you are > 50mm form the last one, this will set a pin to be true if a touchoff is required (eg >50mm from last touchoff).

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

More
8 years 3 months ago - 8 years 3 months ago #114584 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Rodw,

A Touchoff on/off button is very nice. I assume this will be added as Macro in g-code wich triggers the hal pin ?

I am curious how you program the 50mm variable distance in linuxcnc. I know sheetcam has a postprocessor who does this.
If you can do this in linuxcnc, this would be great !!

Problem with user defined macro's is the low range at this moment. It has enough macro's, but i like them to use in logic way that you can see that some macro's are related to each other. But i can better not waste precious time for this little thing. :laugh:

Mesa THCAD at $69 becomes a very cheap THC).

Yes, it's very cheap for the product.
Last edit: 8 years 3 months ago by Grotius.

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

More
8 years 3 months ago #114613 by rodw
Replied by rodw on topic Useful Plasma Thread
Its pretty easy, if the ArcOK changes state and it turned on, save the x and y coordinates (eg axis.x.pos-cmd and axis.y.pos-cmd). Then do some maths to calculate the distance from there to the the current coordinates and turn on a pin if its > say 50mm. It might be better to link the input to the probe signal rather than ArcOK but it would be the same method.

You could attach this signal to a motion.digital-in-nn pin where you could retrieve the state in gcode with a M66 if touching off in gcode. The maths is based on Pythagoras theorem. You should not need to do anything in gcode to tell it when you are touching off as the system already knows.

I've also written a simpler version that tracks the y position and enables a pin when it is greater than a set distance (half the table length). Why? well the pin can trigger an air ram to open a shutter to zone the table. This need to be fleshed out to a multizone system, but 2 zones is already supported.


Code:
component downdraft "LinuxCNC HAL component that triggers plasma zone"; description """ Component to trigger zones on a down draft system """; author "Rod Webster"; pin in float position "Motion signal for Axis position"; pin out bit trigger "True if downdraft segment should be triggered"; param rw float cutover "Absolute axis coordinate above which triggers zone change"; function _; license "GPL"; ;; #include <rtapi_math.h> FUNCTION(_) { if(position > cutover) trigger = 1; else trigger = 0; }

Added this to the list :)
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.267 seconds
Powered by Kunena Forum