Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on April 10, 2014, 10:38:43 AM

Title: THC setting up assistance...
Post by: Davek0974 on April 10, 2014, 10:38:43 AM
Would I be right in my belief that unless I am using the ARC-Ok input from a THC, I will not be able to turn THC on or off within Mach3???

That seems to be the way it behaves, just confirming.
Title: Re: THC setting up assistance...
Post by: stirling on April 10, 2014, 11:50:11 AM
What do your THC manufacturers say?  ;D

It depends on exactly what you mean. More detail needed on what you're trying to do and how your trying to do it.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 10, 2014, 02:17:31 PM
The manufacturers say very little (but I'm sure you knew that :) ) This is simply a voltage comparator THC, it outputs three signals - up, down and arc ok, there are no inputs apart from torch voltage.

By the way Mach is working with it, I am guessing that the up and down signals will affect the z-axis regardless of THC on or off settings. I am not using arc-ok as I have no more inputs on my board.

I can see the z motor turning slightly as it cuts when the THC button in mach is off, if I turn this on, the torch will pierce but then do nothing presumably as it is waiting for arc-ok?

The only way I can see to use the arc ok signal is to move the e-stop button to the limit inputs, I think that will do a similar job, then I can use the unused e-stop input for arc-ok.
Title: Re: THC setting up assistance...
Post by: stirling on April 11, 2014, 03:35:23 AM
By the way Mach is working with it, I am guessing that the up and down signals will affect the z-axis regardless of THC on or off settings.

Then something's wrong. Whilst the fire's lit, your THC will always be sending UP/DOWN signals - BUT - with Mach's THC set to OFF it should ignore those UP/DOWN signals. With THC OFF there should be NO, ZERO, ZILCH, NADDA movement of Z.

I am not using arc-ok as I have no more inputs on my board.

I'm guessing you have 1) E-Stop, 2) limits/home, 3) probe (G31), 4) UP, 5) DOWN.

IMHO you'd be better ditching 2) limits/home and using it for ArcOK.

OR

Ditch 3) and use G28.1

I can see the z motor turning slightly as it cuts when the THC button in mach is off

Then as I said above you have a problem. This shouldn't be happening

if I turn this (THC) on, the torch will pierce but then do nothing presumably as it is waiting for arc-ok?

Indeed - with THC ON Mach will not command any movement UNTIL it gets ArcOK. ArcOK is important - you "can" frig the system to work without it but I wouldn't recommend it. ArcOK or limits? - to me it's no contest (especially on a small table).

The only way I can see to use the arc ok signal is to move the e-stop button to the limit inputs, I think that will do a similar job, then I can use the unused e-stop input for arc-ok.
You can't not use E-stop - you could move the limits to the same pin as the E-stop and free up the limits pin - if that's what you meant - but I'd suggest you consider my suggestions above.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 11, 2014, 03:45:53 AM
Yes that's exactly how my inputs are wired.

How does G28.1 work if it does not use the probe input??

If i move the limits to the e-stop input, does the home-all feature still recognise them ok?

Thanks
Title: Re: THC setting up assistance...
Post by: stirling on April 11, 2014, 04:12:03 AM
Yes that's exactly how my inputs are wired.

How does G28.1 work if it does not use the probe input??

Time to RTFM Dave (Hint: look at the posts in Sheetcam)

If i move the limits to the e-stop input, does the home-all feature still recognise them ok?

Nope

Just one reason why E-stop should be E-stop and nothing else.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 11, 2014, 04:14:42 AM
I'll dig into the sheetcam post, the one paragraph in the manual is practically useless BTW
Title: Re: THC setting up assistance...
Post by: stirling on April 11, 2014, 04:31:19 AM
I'll dig into the sheetcam post, the one paragraph in the manual is practically useless BTW
Which is probably why Terry and I (more Terry than me BTW) have spent a LOT of time and a LOT of hard work figuring all this out.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 11, 2014, 05:02:18 AM
Ok, am i on the right track...

Move my probe switch to the limit switch circuit.
Remove the probe input entry in ports & pins and use it for the arc-ok input.
Reverse my Z homing direction.
Remove the Z axis from the home-all button.
Switch sheetcam post to use G28.1

This will free up an input for Arc-OK but means my Z axis will now home downwards??
Title: Re: THC setting up assistance...
Post by: stirling on April 11, 2014, 05:29:36 AM
There you go - got it in one.

(or upgrade to a PM45 and use a THC ::) that can be configured to send ArcOK by magic instead of using a pin)
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 11, 2014, 05:37:04 AM
There you go - got it in one.

Ok thats good, thanks.

(or upgrade to a PM45 and use a THC ::) that can be configured to send ArcOK by magic instead of using a pin)

Can we just not order some of these magic pins?  :)
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 11, 2014, 09:52:27 AM
Ok, with the massive help of this forum, progress is being made, I have now switched to G28.1 Z setting and rewired my THC for Arc-Ok using the now free probe input pin on my BOB.

However, this is the code I am testing...

G28.1 Z3.00 F250 (probe surface)
G92 Z0 (reset DRO)
G00 Z4.00 (move up by limit switch offset)
G92 Z0 (set zero)
G00 Z5.00 (move to some arbitrary point to measure the torch gap with a 5mm spacer)

Seems nice and simple, if i type it in by hand in the manual screen on Mach, it all works perfectly. leaves the Z DRO at 5.0000mm

But if i run it from a .tap file containing just that code (plus M30 at the end) it works but leaves the Z DRO reading a meaningless 11.4799mm every time???

Can this be fixed???

I have tried putting a delay after the DRO reset lines but no change.


I also have one missing link somewhere - If i untick "allow THC even when not in thc mode" which i guess should be unticked now, I get no action on Z axis even though the diagnostics is showing my THC commands coming in nicely?????

Pressing the screen THC button does nothing.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 11, 2014, 01:53:25 PM
Any ideas?


:)
Title: Re: THC setting up assistance...
Post by: BR549 on April 11, 2014, 09:54:44 PM
Post an example of your tap file.

If you find it raising in z as the program runs through the cut file it may indicate your Z THC speed is set TOO fast and you are losing steps.The longer it runs the more steps are lost and the HIGHER the Z dro will climb.  If at teh end of the file you try to return to say Z5.000 it will crash the torch into the table.

Remember the THC z control is a slap and go situation. There is ZERO ACCEL/Deaccel parameters it just switches the motor on wide open and shuts off clean.  Normally you will run a THC speed of about 20% of rapid speed as a start.

IF you retick that control will it work properly again ??? (;-)  If so just retick it.

Just a thought, (;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 12, 2014, 03:14:16 AM
No, you are misunderstanding me.

The action on the stepper motor is fine.

What is going on is that If I untick the allow-THC box as it should be when using arc signals etc, the system will not respond even though the diagnostics screen is showing my signals coming in nicely.

With the box ticked, It works but can not be stopped so if I want to run small holes, I have to disconnect the THC physically!
Title: Re: THC setting up assistance...
Post by: BR549 on April 12, 2014, 11:28:12 AM
That box should be unticked when under plasma control and you have a THC. The setting is for when you are not running a thc and want to adjust it manually using an up/down switch.  DO you have a set of keyboard buttons that you are emulating the signals Thc up/down ??? or a set of physical buttons ???

(;-) TP
Title: Re: THC setting up assistance...
Post by: BR549 on April 12, 2014, 11:31:23 AM
OK you asked 2 different questions, which one do you want to work on first ??



That box should be unticked when under plasma control and you have a THC. The setting is for when you are not running a thc and want to adjust it manually using an up/down hand switch. By chance DO you have a set of keyboard buttons that you are emulating the signals Thc up/down ??? or a set of physical buttons ???  They may very well OVERIDE your THC in Mach3.
 
(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 12, 2014, 12:18:43 PM
Let's fix this one first, it's the most important... :)



No there are no buttons, that I know of, the screen is the standard plasma set plus one button that Hood or Stirling added for me some time ago that allows my cheapo pendant to set the work origin point.

The diagnostics screen shows all ok - all three inputs show up as required but there is no connection to z axis regardless of the setting of the THC on/off toggle.
Title: Re: THC setting up assistance...
Post by: BR549 on April 12, 2014, 12:27:41 PM
OK so you are saying the when you run a cut file the ArkOK led is active , and the Thcup, Thcdown leds are active as needed BUT the Z does not move?

IS the THC turned on in mach3 ?

When not cutting are the 3 leds mentioned above turned off ?

(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 12, 2014, 12:32:09 PM
Hang on a minute, you may have something...

Does mach only allow the signals through when the button is on AND code is running I.e.making a cut??

I had put the THC into test mode which sends out a continuous arc ok signal plus alternating up / down signals.

I presumed this would then activate the z axis when the THC on button is pressed regardless of a cut being made.

If so then this sort of stuff really should be in the manual.
Title: Re: THC setting up assistance...
Post by: BR549 on April 12, 2014, 03:35:31 PM
WHAT manual ??? 

(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 12, 2014, 04:50:14 PM
Well, there seem to be several manuals :(

So.....


Hang on a minute, you may have something...

Does mach only allow the signals through when the button is on AND code is running I.e.making a cut??

I had put the THC into test mode which sends out a continuous arc ok signal plus alternating up / down signals.

I presumed this would then activate the z axis when the THC on button is pressed regardless of a cut being made.

If so then this sort of stuff really should be in the manual.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 03:21:49 AM
What about the DRO not setting correctly after G28.1?
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 09:35:43 AM
What about the DRO not setting correctly after G28.1?

Anyone :)
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 02:02:24 PM
It has been mentioned to add

While ismoving()
Wend

After each call to set DRO to zero, but how can that be added if the calls come for the sheetcam post, adding a g4 delay does not work, same result.
Title: Re: THC setting up assistance...
Post by: BR549 on April 13, 2014, 03:03:58 PM
Post the file that you are running where it does not set the dro  correctly.

I have NEVER seen that here. In a running cut file  yes , due to lost steps. But a single G28.1 routine? I have never seen it do that. 

The while ismoving() has nothing to do with the Gcode side of Mach3. It is a CB function.

(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 03:06:29 PM
I was using this to test the g28.1 method of probing...

G28.1 Z3.00 F250 (probe surface)
G92 Z0 (reset DRO)
G00 Z4.00 (move up by limit switch offset)
G92 Z0 (set zero)
G00 Z5.00 (move to some arbitrary point to measure the torch gap with a 5mm spacer)

Seems nice and simple, if i type it in by hand in the manual screen on Mach, it all works perfectly. leaves the Z DRO at 5.0000mm

But if i run it from a .tap file containing just that code (plus M30 at the end) it works but leaves the Z DRO reading a meaningless 11.4799mm every time???

Can this be fixed???

I have tried putting a delay after the DRO reset lines but no change.

Title: Re: THC setting up assistance...
Post by: BR549 on April 13, 2014, 03:09:46 PM
Do you have a Safe Z setting in play ? If so that last move it may make is to go to the Safe Z position.

I will test your code but do NOT see a problem with it.

Be right back, (;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 03:12:57 PM
Not that I know of, at least I have not set any afik.
Title: Re: THC setting up assistance...
Post by: BR549 on April 13, 2014, 03:23:35 PM
I do not see any problem with your G28.1 code here It moves to Z5.00 just as the Gcode commands.

(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 03:25:17 PM
Does the DRO track the correct position too??

Mine did not.
Title: Re: THC setting up assistance...
Post by: BR549 on April 13, 2014, 03:31:40 PM
Assuming the you are set at X0Y0Z0 when you start the Gcode it should raise UP to Z3.00 then DOWN until it hits the switch then reset Z to zero then raise UP to Z4.000 and reset Z to zero then raise UP to Z5.00.

Try running it in single step mode so you can verify the Z positions.

(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 03:34:21 PM
Single steps or entering it one line at a time in MDI works perfectly, I typed it into a .tap file and although it worked, it left the DRO at an odd value
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 13, 2014, 03:38:44 PM
When it's run, z is at no known state as I have removed it from home all, it will only be homed once metal is on the table ready to cut. It homes downwards now.

In config, I have also ticked " g28 no intiial move" to stop the upwards motion first.
Title: Re: THC setting up assistance...
Post by: BR549 on April 13, 2014, 04:16:49 PM
The Z is at a known state Mach3 will set it when you loaded Mach3. NOW where that may be MAY be part of your problem.  HERE I always run the TOM (g28.1) Routine to set the Z axis home position (top of the material) Right after Mach3 loads up and before I start cutting. This is really the only important position on a plasma table as the Z home is backwards to all other machines. It homes DOWN to find the top of the material.

OK I read it as if you are giving an example from a PAST test of the Routine. Try running it again on the machine. There is ZERO difference in single step and normal running the Gcode.  Run the Machine in single step mode, Then rewind or reload the code and run it in auto Gcode mode(normal). You should see the same results with Z.

(;-) You will probably LIKE having the initial  G28.1 Z movement as you can start well above the material as a Safe Rapid height and it will rapid down to the Preset position then start the Homing Z down at homing speed. But that is your call.

(;-) TP
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 14, 2014, 02:19:02 AM
You were right, sort of :)

As this was a repeat test block, I put an M30 rewind at the end so it just probes then rewinds.

The G28.1 block works perfectly, however when it hits the M30 it jumps back to the start and then copies the machine co-ord back into the Z DRO this is where it was getting its random number.

Is there a reason it would act like this, I thought M30 just looped back to the start of the G-code?????
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 14, 2014, 03:00:13 AM
Ok, tested it and yes it all works ok on a cut, the only odd bit is at the end when it puts the machine coordinate reading into the work DRO??

However, since changing to G28.1 when the post code reaches a goto-rapid-clearance height, the Z motor emits a loud screech and does not move, I cant see a reason in the code attached, can anyone have a look, I'll also bounce this one over to the sheetcam forum.
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 14, 2014, 06:15:24 AM
If you take the M30 line off the file it all runs perfectly, leaving the Z DRO at 5mm

Then Type in M30 in the MDI box and it puts the machine co-ord for Z into the work DRO ???


Why??
Title: Re: THC setting up assistance...
Post by: Davek0974 on April 14, 2014, 07:54:00 AM
ALL ISSUES FIXED!


For some reason there is a tick box in general config "Perform G92.1" for end of job options, this was ticked, unticking it solved the issue

Should be good to go now

Thanks all.
Title: Re: THC setting up assistance...
Post by: BR549 on April 14, 2014, 09:57:25 AM
Good to go, (;-) TP