Hello Guest it is March 29, 2024, 11:01:47 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Davek0974

2191
General Mach Discussion / Re: Custom plasma probing code?
« on: December 27, 2015, 09:39:01 AM »
One thing i have just noticed is that as the code is loaded, it triggers the probe output as it is scanned  clearly a bad thing,

I think i need to add an additional condition to the brain but what is best to monitor???

2192
General Mach Discussion / Re: Custom plasma probing code?
« on: December 27, 2015, 08:23:32 AM »
Ok, getting there now,

I have this as a Subroutine "HeightSense.tap"

#15239=1
G04 P0.5
G28.1 Z3.000   
G92 Z0.000  
#15239=0                  
G00 Z#15045
G92 Z0.000
M99
%

And the G-Code looks like,

N0190 M09 (Turn off extract fan)
N0200 M00 (Paused: Check the DTHC Settings - Hit RUN to continue)
N0210 G00 X36.000 Y17.475 Z15.000
N0220 M900 (Check for Z active) **this line will be removed soon - does nothing
N0230 M08 (Turn on extract fan)
N0240 M98 (HeightSense.tap)
N0250 G00 Z3.8000
N0260 M03

I tried to use a screen OEM LED numbered 1239 so i had a bit of bling but it would not work so i gave up on that and altered the brain to switch the output directly from the #15239 value and it works, the output has a button and LED on my screen anyway so i do get a little feedback as to where its at. I think this was the right way to go anyway as it's simpler.

One query - I pulled the var 1239/15239 from thin air - is there a way to see if vars are already used??????

As the G-code loads you can see it run the macro at each call so I guess thats good?

The brain was the easy part, almost ladder-logic and i'm used to that from PLC programming.

Hardware changes next, this will have to wait until I return to work as all my pneumatic stuff is there :( unless i get desperate and drive in to pick it up ;)

From measurements, a 40mm stroke cylinder at 45deg will give plenty of safety clearance when retracted, 10mm bore is plenty as no power is required, it can easily be bolted to a bracket using bolts already in place on the floating head - this makes it an easy task to fit and remove if it fails.

As it stands right now I still have made massive improvements I think as the probing and IHS is now relative to the machine and NOT the g-code so any mechanical changes will mean not having to recreate my stock code files over - nice :)

Thanks for the guidance, especially at this time of year, been a fun project so far.

2193
General Mach Discussion / Re: Limit switch issues
« on: December 27, 2015, 06:08:39 AM »
One thing is for certain, once you have gained the know-how of the guts of your table, you will enjoy using it 100% more :)

Any pictures of it? It sounds like you were unfortunate to buy a machine more suited to an experienced builder than a user, but  overall it's a simple system and if you are woodworking/routing? at least you don't have to sort out RF shielding and grounding too :(

2194
General Mach Discussion / Re: Limit switch issues
« on: December 27, 2015, 04:22:26 AM »
WOW!, what a thread :)

OP - you say you have CNC experience but do you have CNC machine building experience?? There is a world of difference here and from reading this thread it seems you do indeed know your CNC but not how to build one, just my presumption from the difficulties you are having with how the switches work. In a pre-built machine all this config work is done for you and the $$$$ go up, in DIY you do it yourself and the $$$$ stay down but you have to learn the intricacies of the system in use, think yourself lucky that the machine does use Mach3 and not one of the exotic flavours out there - Mach3 is probably the most flexible and easy to configure system going.

2 years ago I knew 100% of nothing about CNC, Mach3, G-Code or building a plasma cutter, 2 years later I have built two CNC tables and successfully made money out of both (for my own use). Yes I did struggle a lot at the start but the guys on here got me through.

Picking up the wiring from a machine you did not build is going to be tough, but it sounds like you are on the way now, my table only has limit switches, one at each end of travel for all axes, they are wired in series apart from one odd one as I have dual slaved motors on the gantry (Y axis) so i have it set to auto-square the gantry each time it homes.

To stop you overriding the limits and bashing the stops, I think you need two switches - a limit and a home, here the limits would be wired as e-stops only.

Are there no LEDS on your breakout board? these can be invaluable for sorting out wiring - if the switches are wired series only one LED would change for all of the switches, if parallel then a separate LED would change for each switch.

I cant see why the home would be at the top, common practice is bottom-left corner I believe and it does seem odd they said don't go there when you asked about moving it????

I am certain you will get this sorted

2195
General Mach Discussion / Re: Custom plasma probing code?
« on: December 27, 2015, 03:57:25 AM »

Thanks for that, i will now need to read up on brains and #vars ;)

this is a post modded by CandCNC for their MP3000-DTHC2 system, the odd thing is M900 does not exist in my running Mach setup so I can only guess it does absolutely bugger all??

I did a search through my backup archive and i did find a M900.m1s - it has this in it

'code to stop a touch off if the Ohmic is stuck on
if IsActive(_8_) then
Response =  MsgBox ("Touch - Off sensor jammed.  Clear and hit RUN to continue ", 4 , "Clear Z Jam")
code "M00"
end if

but i don't use the post it was related too, might be some post code overhang from another version?

I guess it checks input 8 to see if it is on at the time it wants to start IHS and stops if so???
I had to modify the input number as bracket-eight-bracket seems to convert to a smiley :)

Might be easier to pull the code from the post to tidy up a bit?

So my HeightSense.tap now looks like...

#? = 1
G28.1 Z3.000   
G92 Z0.000  
#? = 0                
G00 Z#15045
G92 Z0.000
M99
%

Need to find an unused DRO number for the brain to monitor

2196
General Mach Discussion / Re: Custom plasma probing code?
« on: December 27, 2015, 03:46:52 AM »
Thanks for that, i will now need to read up on brains and #vars ;)

this is a post modded by CandCNC for their MP3000-DTHC2 system, the odd thing is M900 does not exist in my running Mach setup so I can only guess it does absolutely bugger all??

I did a search through my backup archive and i did find a M900.m1s - it has this in it

'code to stop a touch off if the Ohmic is stuck on
if IsActive(_8_) then
Response =  MsgBox ("Touch - Off sensor jammed.  Clear and hit RUN to continue ", 4 , "Clear Z Jam")
code "M00"
end if

but i don't use the post it was related too, might be some post code overhang from another version?

I guess it checks input 8 to see if it is on at the time it wants to start IHS and stops if so???
I had to modify the input number as bracket-eight-bracket seems to convert to a smiley :)

Might be easier to pull the code from the post to tidy up a bit?

So my HeightSense.tap now looks like...

#???? = 1
G28.1 Z3.000   
G92 Z0.000 
#???? = 0                 
G00 Z#15045
G92 Z0.000
M99
%

Need to find an unused DRO number for the brain to monitor

2197
General Mach Discussion / Re: Custom plasma probing code?
« on: December 26, 2015, 12:59:26 PM »
Hmm, mostly guesswork here...

I have a subroutine file called HeightSense.tap in the subs folder of Mach
I have a custom macro M1101 which has one line - ActivateSignal(OutPut2)
I have a custom macro M1102 which has one line - DeActivateSignal(OutPut2)

The HeightSense.tap file contains this....

M1101
G28.1 Z3.000   
G92 Z 0.000 
M1102                 
G00 Z my switch offset goes here
G92 Z 0.000

Am i getting there?

I gather you cannot access the switch offset DRO from g-code?

The main part g-code would then be like

N0200 M00 (Paused:  Check the DTHC Settings  Hit RUN to continue)
N0210 G00 X11.000 Y7.475 Z15.000
N0220 M900  (Check for Z active)
N0230 M08 (Turn on extract fan)
N0240 M98 (HeightSense.tap)
N0250 G00 Z3.8000 (set pierce height)
N0260 M03

2198
General Mach Discussion / Re: Custom plasma probing code?
« on: December 26, 2015, 12:17:56 PM »
One way around teh switch being effected by motion is to just use the solenoid to swing a transfer bar into play between the material and the switch. That way the switch never moves only the transfer bar does.

Also a way to keep more direct Gcode into play would be to use a SUB routine to hold the motion code for teh TOM routine and call it as a SUB (M98) . Subs are very stable in Mach3. You would store teh SUB in teh SUB directory and call it as needed .

(;-) TP

Thanks again, post overlap there;)

How do subs work in practice?
I see I have a subroutines folder in Mach, it has one testfile in it but how does the M98 call it??

any examples of the flow from sheet cam to mach??

2199
General Mach Discussion / Re: Custom plasma probing code?
« on: December 26, 2015, 12:12:46 PM »
Thanks for that, some great tips there,

There is a logic to my reason for experimenting here -

1 - I was going to buy an Ohmic kit for my table until i realised they will not work on the 30A consumables on my PM45 as the nozzle is not shielded so no ohmic contact to connect with the plate surface.
2 - It was suggested to fudge a contact for the 30A setup by adding a contact or stud, but as the cut height is a mere 0.5mm here this sounds a recipe for pulling the torch off mid-cut.
3 - Then i found a capacitive height sensor - this looked good but only went to 1mm min and would likely not be too happy about sensing near the edge with half the sense ring having no metal below, plus the accuracy was listed at +/-0.5mm so not that good.
4 - I like experimenting ;)

The solenoid was just a suggestion, my favoured device would be a small air cylinder - these can be controlled, damped, etc so no need to ram it in and out, you can also have a nice controlled in-stroke and rapid return easily. Air is on hand nearby so seems an ideal choice, a 50mm stroke ram at 45deg should give clearance to the torch when cutting i think.

My M1100.m1s looks like this now

Dim Switchoffset  
Switchoffset = GetOemDRO(1045)    

If Switchoffset > 0 Then
   ActivateSignal(Output2)
   Code "G28.1 Z3.000"     
   Code "G92 Z 0.000"  
   DeActivateSignal(Output2)                  
   Code "G00 Z " & Switchoffset  
   Code "G92 Z 0.000"
   While IsMoving()                      
   Wend                                                
Else                                                                    
   MsgBox("Your Z Switch Offset value in MACH needs to be set")
   Code “M30”                                      
End If  

I think that gets the important bits in the right places and does away with the M-code for relay control.
Is there a code to replace the M30 with?? Or just ignore that one??
Might need a short delay here and there, who knows?

I'm not too worried about sharing code, my post processor is already heavily tailored to my system anyway, if i needed to share i could just send the dxf file.

2200
General Mach Discussion / Re: Custom plasma probing code?
« on: December 26, 2015, 09:32:31 AM »
Am i on the right tracks here or not...

Custom ref macro M1100.m1s copied from another macro mostly.

Dim Switchoffset  
Switchoffset = GetOemDRO(1045)    

If Switchoffset > 0 Then
   Code “M07”
   Code "G28.1 Z3.000"     
   Code "G92 Z 0.000"  
   Code “M09”                  
   Code "G00 Z " & Switchoffset  
   Code "G92 Z 0.000"
   While IsMoving()                      
   Wend                                                
Else                                                                    
   MsgBox("Your Switch Offset value in MACH needs to be set")
   Code “M30”                                      
End If  



Can i use the M07/9 macro within another macro or do i need to use something like ActivateSignal(????) instead to put the mist coolant o/p on & off?????

When called from the g-code file, will the g-code wait until this macro is complete??