FERROR on Z with float switch

20 Apr 2011 22:34 #9207 by jcizek
and yes, I knew the original THC300 config was metric. I have went through and converted everything to inches! -James

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

21 Apr 2011 00:17 #9210 by jcizek
Hey John, I got to thinking.. after looking up some info on Mesa cards.. since you are doing pretty much all your THC inside of EMC, are you using a probing routine to automatically find the top of the material before firing the torch? Are you using your own configuration or did you modify something that was available already? I was thinking that our setups probably aren't terribly different except that you are doing the voltage comparison in software and probably sending up and down commands via HAL logic where I am using HAL logic to watch 2 hardware pins. But if you are using "touch and go" where the torch finds the material via a float switch, maybe that part of the config is similar. Can you share more about how you are setup? Maybe I can learn from something that already works! Thanks! -James

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

21 Apr 2011 11:00 - 21 Apr 2011 11:16 #9218 by BigJohnT

My THC comp drives the Z axis up and down as needed when allowed to by hijacking the Z commanded position and adding an offset to get the voltage correct.

To go to the pierce height and fire off the torch I have a small subroutine that I call that uses a probe move to move Z down then after the probe move trips the probe input (the micro switch on the floating head) it moves the Z up a distance I found by trial and error to have the torch tip just touching the material. It then sets the Z0 with G92. Then it moves up to the pierce height and fires off the torch. After the Hypertherm 1250 closes the arc ok contacts the sub moves down to cut height and ends.

I've attached the subroutine that I use.

As I recall someone else modified my thc.comp to be a up and down comp for a THC that outputs just move up and move down. Does the THC300 just send up and down?

File Attachment:

File Name: touchoff.ngc
File Size:0 KB

Holy Crap, I opened up the thc300.odc and recall it well now. He did a super job of using ready HAL components to make his THC work with EMC. I never could follow that completely after many times trying. I even printed it out on my D size plotter. That was my driving force to find an easier way. And thanks to Peter for making the THCAD card for me on a whim. As I recall that chap lives/lived in Iceland and was/did build a sailboat to escape from Iceland... I haven't seen him on the IRC in a long time.

Last edit: 21 Apr 2011 11:16 by BigJohnT.

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

21 Apr 2011 14:24 #9225 by jcizek
Hahaha, yep, that was my first reaction to the .odg of this stuff!! :-)

So, talking to Jarl, he mentioned that he thought you were working on making this simpler. I guess I see now how you did that!!

So yes, the THC I am using just simply sends 'UP' and 'DOWN' commands via 2 parallel port pins back to EMC. EMC does the rest.

I don't actually have a THC300, I have a newer product from CadnCNC called the LCTHC (low cost THC). But it appears to have been based on the original THC300 design and has the exact same inputs and outputs. It appears that Bob Campbel (designer of the Thc300) sold his THC line to SoundLogicus, which up until a few days ago had a website with all the manuals and stuff. It's not dead and I of course didn't download them while it was up since I didn't think I needed them :)

In any case, I also printed the odg in huge format to follow... not that helpful, but following all the HAL logic in the configs is rather easy. So I found where the spindle on command is captured and sent through it's series of and's and or's and xor's etc... and found where it eventually is actually connected to the motion module to move the Z axis. The only issue I have is that there seems not to be any special config for that. It seems to me that it should be reading velocity, trajectory, and acceleration limits directly from the main .ini file. It's just a simple call to the .motion and .axis pins!

One thing I haven't looked at is trying the MP1000A/B/C sample configs. They seem to have the same inputs/outputs also, and it may be easier to troubleshoot. CandCNC is still in business and easy to get a hold of, I also have found docs on the the MP1000 series to reference. I'll try using one of those as a base config this morning and see if I get anywhere... i suspect the motion parts are the same in the 2 configs and will probably have the same problem, but I'll give it a shot. I think I'll also leave it all in metric, just in case I missed SOMETHING in this config. (I suspect a metric figure in a velocity field where inches are expected would give a skyhigh velocity!!!)

Thanks for sticking through this one with me and sharing your config info. This is now a personal quest to make it work so I can post back the working configs :-)


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

21 Apr 2011 17:09 - 21 Apr 2011 17:12 #9234 by BigJohnT
You might take a look at my thc.comp, the code is only about 50 lines long. You could remove the frequency conversion and add a pin for up and down and plug them in where I calculate if up and down is needed. Then using my subroutine to light off the torch you should be good to go..


Just change the name to thcud.comp for torch height control up down and save it to a directory and use comp to compile and install it and you can use that with an installed version of EMC.

When you get it perfected I can add it to the master.

Also, all my plasma files are on my website if you need or loose something. gnipsel dot com in the CNC Machine Shop section.

Last edit: 21 Apr 2011 17:12 by BigJohnT.

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

21 Apr 2011 18:32 #9237 by jcizek
Great, Thanks John!! I went through everything this morning with a fine tooth comb. I found more problems, found one more place that was set to metric that needed to be changed to inches, and found that the PyVCP xml file was using metric values still (it's agnostic and uses machine units, but the ranges and defaults for each parameter were still using metric numbers). I changed all that and got some better results.
I think I will continue to finish this config out for my own piece of mind that it can work, but I think i'll give changing your code a whirl too!! Then I can decide which one to use afterwards! I'll let you know how it goes using your code, thanks for sharing!!
In the meantime, here's some video that shows my progress and problem!

Since a picture is worth a 1000 words, here are 3 videos.
Video 1:

This video shows the machine homing each axis. Notice the speed at which the Z axis speed homes. It's dead on what it should be, which is currently set to 1.0 inch/sec in the .ini. This step is successful

OK, on to Video 2:

In this video, the machine is starting from "home" position. I simply click the "spindle on" button in EMC. You'll notice that Z is coming down VERY fast, much faster than the 1.0inch/sec that the ini file is set to. It's coming down so fast, you can hear on the audio that after the head crashes, EMC is still sending pulses while the the acceleration drops to zero. The motor is "clicking" as it's physically stalled with the head crash.

Now, Video3:

In this video, I have "fooled" EMC by physically moving the head much lower than EMC thinks it is, when I push the "spindle on" button, it does what it's supposed to, but since I have lowered it, the axis doesn't travel as far before the float switch is tripped and the machine is able to keep up with what EMC is asking it to do. I have set the "pierce height" to 1/2" here. As you can see, it repeatedly hits the mark right on each time!

So the process is working exactly as it should, it's just that EMC is driving the Z axis during probe much faster than my machine can handle. If we can isolate why it's ignoring the .ini file here, I think i'll have a perfectly working machine!

So after I got to this point, i tested the rest of the THC functions manually, EMC waits properly for an ARC OK signal, then starts moving. When I manually pulse the "up" and "down" leads at the circuit board in the plasma (while the plasma is off and unplugged of course!) the head follows up and down like it's supposed to. So everything is working perfect except that crazy velocity. Getting close!!

I'll post back with progress on modifying your comp file. Thanks again John! -James

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

21 Apr 2011 19:00 #9239 by BigJohnT
It has to be something in the THC part of the hal file that is still metric... It's the only thing that makes any sense...


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

21 Apr 2011 19:02 #9241 by BigJohnT
While eating lunch I modified my thc comp and my config files for up down for testing. All I have to do is get all the crap off of my plasma table to try it out...


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

21 Apr 2011 20:07 #9242 by jcizek
haha, you use all your tools as a workbench also huh? Sounds too familiar!!

I agree, there is something in the HAL section that is messed up. I don't think it's a metric/SAE problem though, I have been through the files super carefully. The one thing that I still am suspicious of though is there are some sections of the HAL referring to max velocity and scale for the probing. I can't exactly figure out what is going on there yet, but I am working on it.

This is one section:
# Set Hysterisis for float comp
setp comp.1.hyst 0.001

# Set percentage multiplier for scale
setp scale.0.gain 0.01

I have to keep going back to the integrators manual to figure these things out. I don;t think the above lines are the problem, but I still need to figure out what they are doing to rule that out!

this is another one:
net MaximumVelocity minmax.0.max => mult2.1.in0

I need to trace out and see what the mult2 is doing.

Let me know if you are able to test your changes on the comp file, I haven't dug into that yet. I am currently home recovering from foot surgery, I can only sit out in the shop so long without coming in to lay down!

Thanks! -James

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

21 Apr 2011 20:12 #9243 by BigJohnT
The html are actually better for looking at real time comps... or the man pages.


Just scroll down a bit to the real time comps.

Yea, a flat spot is valuable space for sure at the moment while all my machines are in the garage and the shop is not finished.


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

Time to create page: 0.158 seconds
Powered by Kunena Forum