Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: halkintool on January 23, 2009, 11:27:29 AM
-
Right now, my setup uses a pneumatic cylinder to control torch height up and down, and a handle to adjust to different plate thicknesses.
With the handle on my manual height adjustment, it would be quite easily to add a Z-axis. Im just wondering what would be required to interface the automatic torch height control with the mach. Do i need a THC board, or can I run a torch height control through software and my dspMC motion controller I/O?
Heres a little snippet from the plasma units manual,
MACHINE INTERFACE
The Pro-Cut 80 comes standard with a machine interface.
Interface signals provided include: arc start, arc
initiated, and arc voltage. These signals are accessible
through the 14 pin MS connector on the case
front.
ARC START:
The Arc Start circuit allows for triggering of the power
source to commence cutting. This circuit can be
accessed through pins K and M of the 14 pin MS connector.
The circuit has a 17 VDC nominal open circuit
voltage and requires a dry contact closure to activate.
ARC INITIATED:
The Arc Initiated circuit provides information as to
when a cutting arc has transferred to the work piece.
This circuit can be accessed through pins I and J of
the 14 pin MS connector. The circuit provides a dry
contact closure when the arc has transferred. Input to
this circuit should be limited to 0.3 A for either
120VAC or 30VDC.
ARC VOLTAGE:
The Arc Voltage circuit can be used for activating a
torch height control. This circuit can be accessed
through pins D and G of the 14 pin MS connector.
The circuit provides full electrode to work arc voltage
(no voltage divider, 335VDC maximum).
Users wishing to utilize the Machine Interface can
order a K867 Universal Adapter (please adhere to the
pin locations stated above) or manufacture a 14 pin
MS connector cable assembly.
Im not quite sure I understand what the ARC voltage pin outputs are going to look like. "The circuit provides full electrode to work arc voltage" I was hoping the machine would just give off an analog output to indicate arc voltage, what do you think?
-
you need the adapter, call them and see if the adapter will give you a 0-10 signal for control
-
From the description in the manual, it seems like they're just selling the cable. What would I expect the nature of the output to be?
0-335VDC?
-
Would this work?
-
Based on an analog 0-10V signal, does mach3 have the capability to control a Z axis?
-
I think there would be a couple of possibilities...
The only way mach can adjust the height of the torch while cutting is with the THC UP and THC DOWN inputs, which are digital TTL.
This said, the two options are:
1. Make a hardware interphase (beyond my capabilities) that interprets your 0-10v signal and translates it into either a torch up or torch down digital signal. you could even add PID cappabilities otherwise your control would be pretty minimal.
2. Make a brain read the 0-10v trough an analog interphase (PLC with analog inputs trough modbus) and interpret the voltage to make the torch up and down inputs work.
I could make a suggestion, but dont know it it would work or if you want to do it that way, the other options i gave you when it is all said and done will maybe cost more than a ready made THC unit from bob campbell, or sound logic, and the other provider which name escapes me right now. i think you will be amazed at the prices and features they have... besides its proven to work.
Have a chat with them and you make the decision.
Best regards
Fernando
-
So there wouldnt be anyway of just writing a brain or modifying my M3 macro, to take an analog input and apply it to a Z axis?
Can Mach for example translate an analog signal as an encoder? I know some linear wire encoders use pots to determine position. If I could simulate an axis position with the voltage feedback from the plasma i could slave Z axis to it? It just seems to me that more hardware should not be required, given an analog signal you'd think you could write software to slave an axis to it.
Im building an oven right now, and i have a couple PID's kicking around I could probably use. All i would have to do is wire the PID and impliment a 1 or 2VDC power to the analog input on my servo amp, so when the voltage feedback comes out of range the PID puts the axis back to position. I dunno, just throwing out ideas.
Edit*
I just realized there is a download on the plugins page for a THC using an analog input.
I installed the plugin on my desktop here to take a look at it, it looks pretty good. I just wonder if its ever worked for anyone.
-
From what I know, there is no way to directly move the z axis with an input of button while it is running g-code.
I believe encoders send out pulses not proportional analog signals like 0 to 10v.
The linear wire encoders i believe they do not use encoders, just pots that divide a voltage, yes you could use something like that as an analog input and manipulate that value trough a brain or something like that. But a linear pot would have to be used with a "feeler" or foot that is always touching the surface of your material, If you can already tap the voltage of your plasma and translate that into a 0 to 10v signal, then the lienar pot would be redundant. You would really want to use that arc voltage as a reference since it is what really matters in the plasma process.
I have not tried the THC plugin that Brian wrote to accept an analog signal, you would have to ask him, but since in the description it says experimental-unsopported, i would believe it is not finished and would lack some features needed like arc dive and stuff like that. and since it is unsupported, i guess no changes will be made to it if requested.
Again, im no expert on this since i have never used plasma, torch height control or any type of analog signal control, im just calling it on the information I have read on this forum..
Best regards
Fernando
-
Hmm. Perhaps your Z axis would be better off controlled by the torch voltage system and X and Y controlled by Mach. Does mach accept jog inputs while running Gcode? I'm thinking you could emulate the pulses of a MPG easily in response to the torch signalling too high or too low.
Or just run the Z independently of the computer and just let it follow the work, using a "coolant" M-code to bring it to the workpiece and back, overriding the height control. Knowing more about your height control system would be a plus.
-
Hmm. Perhaps your Z axis would be better off controlled by the torch voltage system and X and Y controlled by Mach. Does mach accept jog inputs while running Gcode? I'm thinking you could emulate the pulses of a MPG easily in response to the torch signalling too high or too low.
Or just run the Z independently of the computer and just let it follow the work, using a "coolant" M-code to bring it to the workpiece and back, overriding the height control. Knowing more about your height control system would be a plus.
It was suggested to run an independant height control system to control small adjustments to height, i could just use a PLC but id prefer to have everything integrated through 1 piece of software to avoid later complications etc. Seems more simple.
-
Hi,
i found this thread whilst looking for stuff on overburn but it hought you might appreciate my input.
Ive just this morning finished my home made dthc running entirly in mach, all i have done is made a simple voltage divider circuit with the plasma + connected to one end and 3.3v at the other since the plasma + is actually negative, this gives a 3.3v signal at 0 torch volts and 0 volts at 300 torch volts this connected to the 0-3.3vdc analogue inputs on my pokeys device, read them over the modbus into a brain which averages about 30 samples, this is then converted back to tip voltgae using a formula, compared to a value in a user dro on a custom screen i have made and triggers the relavant thc up or down command, then the usual thc perameters control the rate and the max/min moves and anti dive stuff.
It seems to work pretty well, the worst part is the pokeys samples so fast and the inherent error involved in reducing the voltage and then mathematically increasing it again mean the value for tip volts on the screen varies 3-4 volts when nothing is happening so it isnt as good as a "proper" one but it tracks the plate quite nicely if it has a bow in it which is all i am looking for and it has cost me nothing other than time, i had the pokeys device anyway and just knocked up the voltage divider using a couple of 0.25w resistors on some breadboard.
thought that may be of interest to you, i think personally all thc systems with mach will work like this in the future, i see poppabear is looking for a beta tester for such a system for an oem, i guess they think the same as me, why do i need to have a separate box with its own processing power do perform a relatively simple function when my pc is the mother of all plcs?
sorry for boring you
matt
-
It has become apparent to me that the motion controller i have only has analog inputs for the servo drives, so unfortunately i have no ability to use analog inputs at this time. I was in contact with Jim and soundlogicus about his THC and will likely order that when the time comes, it operates of a few simple I/O's and integrates well with Mach. Im still trying to decide if I want to remove the table on my plasma and replace it with a water table etc, if i did that, i think i could get it flat enough to eleviate the need for a plasma, as the water table should reduce plate deformation etc, im gonna see how it plays out.
-
Keep us updated with that application it is good news
klmark
-
Matt Would really like to know more about your DTHC.....
Thanks Dave
-
dave,
what do you want to know?
matt
-
Matt I've been using Mach for sometime and never have gotten into the Brain and modbus, pokeys thing,
But now I can see some use for it.
I have a router table that I can convert in a small amount of time to a Plasma table(wife likes me to cut wooden things, I like to cut steel) any way I have come to the conclusion that I need THC for this Beast and I am always looking for a different approach to things, not just buying whatever is out there to buy,
so with that said if you had to build from scratch would it be cheaper to go with a modbus or buy whats out there,
and if you were to build were would you get most of you componets.
Well I guess if it was easy, and cheaper, then everyone would be doing it, I guess !!
Thanks For letting me Babble as I see this could be the next great thing...I just need to understand more about pokeys, modbus and brains.
Thanks Dave
-
ok,
so several questions,
is it cheaper than the systems out there?
Well i dont know much about others but candcnc is over $1000, ive spent under $100.
where did i get the components?
Pokeys comes from a chap called boris in chzech rep or somewhere, other components are just resistors and electronics components and some head scratching
how does it work?
So i connected a wire to the plasma torch and to the earth clamp of the plasma, when cutting the difference between them is 120 volts ish.
These are connected to a suitable bridge rectifier diode since the plasma puts out a square sine wave with a varying pulse width depending on current ( ithink, dont kill me if im wrong)
I cant truthfully remember which but one of the outputs from the brd is connected to samll voltage divider i made, the other is not connected since it is the negative and is just a 0v ish line.
since the plasma voltage is negative ( this had me foxed for a bit, i thought its a dc voltage, swap the wires and it will be +, no it isnt!) The voltgae divider is connected at one end to the +3.3v from the pokeys and to the plasma on the other side.
So when the plasma is doing nothing, or at 0v the voltage in the middle of the divider is nearly 3.3v, dependant on the resistor values you used, mine is about 3.0. When the plasma is fired the torch voltage goes to -120 so pulling the voltage in the middle of the divider down, i designed it so at -300 torch volts (thats the max voltage of the transformmer in the plasma) the output from the divider was 0v, so as not to kill the pokeys by applying a negative voltage.
as the voltage varies on the torch the divider voltage goes up and down.
So what is the pokeys?
the pokeys is a keyboard emulator, but for what im interested in its a usb device you install a plugin for in mach and provides 50 something inputs and outputs and three or four analog inputs which can easily be read into mach using the modbus feature, i know nothing about modbus but all you have to do is install the plugin and enable it, then in the brain editor select a new input from the modbus address of the pin and it will bring in value of 0 -1035, 0v =0 3.3v = 1035, ( ithink thats 10 bit?)
How does mach use the value?
I have a simple spice circuit simulator in which i modelled my voltage divider, its literally 2 0.25w resistors, i think one is approx 1.7k and the other 178k but dont quote that.
By testing different values in the simulator i was able to work out a simple equation which connects the modbus value (the o-1035 one) to the voltage of the torch (it needs a x - in it to take out the negative voltage thing)
using a node in the brain with this formula in it will produce you a torch voltage in mach on the screen in whicheve dro you want!
From here i did some investigation, there are already dros in mach alloted for torch voltage, desired torch volatge etc etc, to find what these were i opened the candcnc screenset in screen editor and found all the dro numbers, button scripts etc and made my own screen with all of these in it.
Mach already has all of the logic for dthc built in so there is no need to use anything else, my brain simply compares my value read in (in the process described above) with the value i have typed into dro 1036 i think, but its whatever is in the candcnc screenset for preset volts and moves up if the voltage is too low or down if its too high, the thc controls are there in the brain editor under thc up and thc dwn, and mach does the rest, if all criteria are met, arc ok signal is on and thc is turned on it will adjust the torch position.
Bingo youve got dthc
ive added a few other things, candcnc make big play about tip saver and other things which basically amonut to anti dive, so i have put in an upper and lower threshold on the torch voltage outside of which the thc is disabled, so if you croos a kerf or something it doesnt go mad, or atleast leesens the amount it can go mad by.
I have also been looking at how to do this with no pokeys, i think if i was to put a simple analogue to digital converter on my analogue voltage and reading in the pulses across the parrallel port using the spindle speed input or something which will measure frequency, this may also give the advantage of a wider working band, the limitation with my device is that i am taking a perhaps 10v variation and reducing it to perhaps 0.5v variation and then mathematically multiplying it back up, so there is error but in fairness to it i can make a 200mm long cut with one end of the material raised by 50mm and the cut height is pretty constant and when im hundreds in pocket i cant complain.
I genuinely think your right, there is a merket for this, all you need to do is to make a little pcb with the voltage divider and adc on it and a mach plugin to install all the brain etc and you have yourself a dthc unit that will connect to any plasma (mine isnt hf start) and to any parallel port to make fully funtional dthc that shows you tip volts on screen, preset volts etc, etc, for cheap, its the future but im not the right person to do it so i guess ill let someone else make a fortune from it!!
if ive confused you dont wory ive confused myself, if you have any questions shout!
matt
-
Thanks Matt that was great, and no I'm not the one to make a fortune from something like this either, I just want a usable DTHC and I Think you have a great solution, that I would like to try. I'm sure I will be asking more Q's in the future as I pick up a few parts and understand more about the brain and pokeys.hope you don't mind.
Dave
-
Dave
Not at all ask anything you want, the only way i learnt cnc was by reading what others had done so i feel that i should hand on anything i have managed to find, im like you, im not really interested in being able to control my torch to the nearest 1/4 volt but did find it frustrating when making long cuts and a slight warp in the plate made a mess of a part and am happy my system works well enough for me, others may rip it to pieces but it works and its cheap and the time i spent on doing it is what makes cnc a hobby!!
matt
-
Just ordered a pokeys, and yes just like you I have read allot about what other people have done and that is the best way to learn, or try new things.
I'm going back to your post and to watch the brain videos again,to learn and understand this as much as I can before it shows up( plus my TD 39 plasma cutter quit, it's in for repair) so can't do much cutting until it comes back anyways
Dave
-
Dave,
just shout if you need any help
matt
-
Okay Matt I'm Shouting....
I got bad news for the people I ordered the pokeys from, they are out of stock, should have sometime in the next two weeks, ugh!!!
Any way I'm getting a grasp on what you have done IE: voltage devider and all some of that... its the brain(which every time I type that word I get a chuckle..wish I had a _____).. anyway if you could send me a copy of (LOL) your brain and the screens, or post them up here so other people can grasp also.
If not I understand And I'll keep working on it.
The brain thing still makes me laugh.
Dave
-
dave,
due to miss spelling i tend to refewr to them as brians, ill fetch them off the shop machine and post them up for you to have a look at..
matt
-
here are the three brains i ue, i ll let you look at them to try to work it out before i tell you how it works!
matt
-
Thanks Matt, I'll take a look when I get home, as I'm at work right now,
One other question, after I understand more about how this is done I had a thought...
could you use a current transducer, say one that puts out the o-5v,or one that is 4-20ma, to the pokeys to do something similar.
Maybe you have tried this
Thanks again
Dave
-
dave,
if ive got you right you mean a transducer which will put out a 0-5v signal dependant on the current in the plasma line?
if thats what you mean it wont do what you want,
since the plasma power supply delivers a fixed current (set to whatever the knob on the front is) as the rsistance the arc feels varies the voltage must also
since V=IR
I=V/R
I is constant so an increase in resistance decreases the voltage
since the plasma is cutting the same pice of plate all thetime the defining factor for resistance is the distance the arc has to "jump" across to get to the plate, or torch to works distance so giving the arc voltage direct proportionality to the torch to work distance.
Sorry if i told you something you already know
btw you must be 0-3.3v for the pokeys
matt
-
Thanks matt I never looked at it that way.
-
Awesome Work Matt!!! Keep at it, following this one with interest!!
scott
-
Okay Matt I had a look at the brains and I do kind of understand the First one (dthc1.) but the other two I can't make out the #'s or what any of the words say... I don't know what I'm doing wrong, If I have the screen scroll unchecked then I can't see any of the oem dro#'s or mod#'s ...I know its some thing I'm doing wrong but I can't figure it out ( have been through all the videos couple of times)
And what I can read of those two screens ....I really don't understand!!!!
Then one last thing since the pokeys has so many inputs that aren't used can a brain be used to go ahead and probe the plate first, reset the Z dro and the go from there..Just thinking out loud.
-
second question first,
yes it can, what cam program do you use? i have sheetcam, it has the probing for the material built into the post processor i use so at the start of each cut the z xis moves down until it trips a switch on the floating part of the z axis (the torch holder is in a slot so it can slide upward when it touches the metal and is pushed back down by a spring) then it moves back up a distance you specify in the post before it pierces then down to cut height after the peirce delay. It works absolutely perfect and i really wouldnt be without it, i make no changes to the setup for material thickness, if i have a slightly warped plate and nedd to pierce on top of a hump it doesnt matter. All you have to do for hardware is construct the floating torch holder with a switch on it and connect it to the z home input to mach and dial in your required offset in mach.
first question second,
ive just looked at the brains here and i get the same trouble, it reduces them so small you cant see what they are doing, i dont think its you i had someone else pm about it and they said they couldnt read them either so ill explain the functionality.
the first brain (dthc1 i think) reads the values from pins 44,45,46 (The analogue inputs which work) and has a no operation block to connect them to an oem dro which doesnt have a designation, so this reads a raw value from each pin and puts it into a dro number where the next brain can read it from. Easy, the reson the brain is so big is because it does it 8 times for each input, so 24 times in total, this is slow and boring to make, is there a copy and paste function? The idea of this is that you can average all of these values to get a better reading.
the next brain (dthc2 i think) has inputs which are all the oem dros written to in the previous brain, now we are gonna do something with the data. Each of these dros inputs is connected to a block which adds them together, beware you can only have 8 inputs to a operation block so you have to add the first eight together, then the secons, then the third and then add all three of them together to get a total, once you have a total put it through another operation block where it divided by 24 ( to average it) and then terminate with writing it to another unused oem dro.
the third brain (dthc i think) Has an input of the oem dro you wrote the average value to in the last brain which is then put through a formula block to turn it into arc voltage (did i explain how i did that?) and written to oem dro 1036 (i think but check in the screenset) which should write it to the screen in the tip volts dro.
the next line has an oem dro 1036 input and an oem dro 1035 (i think but the one for target volts) input and then a compare operation, if 1036 is higher than 1035, voltage is too high so its then terminated with a thc down block
the next line is identical but the inverse, comopare oem dro 1036 to 1035, if 1036 is lower, volatge is too low so terminate with thc up block.
i have added a couple of extras in to mine so that there is no move if the torch voltage is less than 0.8 or mare than 1.2 times the target volatge but i think it is important for you to get this far before making it more complicated, you could also put in a deadband so that if the readings were close there was no move, mine doesnt have that, i havent tried it since unfortunately time for tinkering with the plasma cutter has dried up recently adn the odd post here is all im managing at the moment.
dont hesitate to shout back if i ve confused you with my spelling!
matt
-
I use VCP with a self modified P.P. it's work in progress but it does work.
I have a tool setting macro I got from the good people on the forum and it works really well for setting endmills on the router side, all it does is when it touches down it closes , like a set of contacts, just thought it could read through the torch and earth ground so when the two touch it pick up that closed curcit and run the macro then run on into the program.( just a thought.)
And yes very hard to read the brains ... I must ask what three signals are we picking up..IE: pins 44,45,46 I thought it was only the 0v-3.3v on one of them. ( I must go back and read your other post as I thought I was close to using this)
Thanks again
Dave
-
dave,
with respect to the signals, i have connected the analogue signal from the voltage divider to pins 44,45,46, so that i can get more readings to average the reading from, these are read into the brain using modbus addresses 124,125 and 126 i think, these will give values between 0 and 1035 depending on the voltage of the signal from the voltage divider, 3.3v being 1035 and 0v being 0.
as far as the height sensing goes yes you could use that system, i think some comercial systems use it and its known as ohmic initial height sensing, do a search for it, i know some people slag it off and say it doesnt work if you plate is even a little dirty, i have no experience so i cant comment, also consider if having a wire connected to the plate to sense with is a good idea when you let it have tens of amps and hundreds of volts when you are cutting, sure there is a way round that with a bit of thought.
matt
-
Matt, Yesterday I did get parts of it working...I put a pot on the pokeys and I could see my brains (yours with some mods) working, and I could make a thc dro give me range, but every time I would load Gcode (to play with and make z move) I could not make my dro move any more...Is it needing to be happy with torch okay signal first???
it could be my screen set to, its a mess.
Dave
-
Hi Dave,
Sorry its been so long, since we last spoke ive moved to California for work, i think the reason you are getting that will be to do with having thc mode turned on and off, since you must have this on to allow the axis to be jogged up and down whilst g code is running, the ability to do that is unique to thc mode since it could potentially be very dangerous if you could just jog an axis whilst the code is running, i hadthe same when i was testimng at one time and i cant truthfull remember what i did to get it to work but its in that area, unfortunately i cant take a look either since im over 5000 miles from my machine which makes me sad!!
i should be able to get online more again now so let me know how far youve got
matt
-
hi all
i have just build a 10 foot x 5 foot plasma cutting table but i have a problem .
i am using an air cylinder for my plasma torch up and down i want to control this in mach 3 .i am using an air solenoid valve to operate my air cylinder.
what i want is = the torch will nominally be in the up position = this is proved by a limit switch =
travel to start off cut = torch down = this is proved by a limit switch =plasma on =time delay for piercing =
cut job = plasma off =torch up =proved by limit switch . move to next job . would be very grateful if anyone can tell me how to do this regards
-
Matt
Glad to her from u again....5000 miles way from home is a Long ways, I hope Its not for to long.
I had to put the THC to the side to to get other projects done...Check back often as I need to get back to this soon.
donnellytony
Never herd of anyone using a air cylinder to control THC...do u think this will be very accurate ???.
Dave
-
Dave,
im gettin tot he internet somewhere between once a week and once every 2 so thats why ive been quiet, im working with a custom harvester in CA so we are busy at the moment and will be for the next few weeks then ill get to it more often, we will hvae to pick it up again then since ive forgotten most of what we talked about, i wont be back to my machine until christmas!!!
matt
-
Matt U have Mail in your hotmail box
Dave
-
Ok I have this poject working but I have one problem...going through the brains on the torch up and down comand the Z axis is very jumpy...have not tried it with g code just on test bed...Maybe Scott AKA PAPABEAR can help with this?
If I use the shuttle All axis are smoth and liner....it is only when the brain turns on the torch up or down...
-
I have to tell all that this works very well.
Matt has found a very inexspensive way to have DTHC
keep a watch out for further updates.
-
I am also trying to add a thc in my new plasma machine, and for now I have made the voltage divider and putted it inside of the plasma unit machine.
Before connecting the output of the voltage divider to the pokeys, I have tested the voltage divider output during cutting to make sure that the output would not damage the pokeys. I have measure the output with a simple, low cost multimeter, where in DC mode I register during normal cutting from 0.80V to 2.10V, that seams ok. The problem is during the piercing and if, for example the plate "ends" during cutting (both are limit situations), where the multimeter does not show a consistent value, and goes up to 20V for a brief instance.
I think that it is not possible to reach such a value, because the voltage divider is about 40x; and the 20V output from it was meaning that I would have 800V at the output of the plasma. I really think that is the multimeter that gets confused from the high frequency variations of the DC voltage during the limit situations (piercing and end plate).
The voltage divider also have a high speed voltage suppressor, that should take care of peak voltages if present.
Neverless I would like to receive a comment, before I have connected it to the computer and so on, of anyone that made such a voltage divider.
Thanks, Filipe
-
fourxfour2:
the problem is this: THC control is usually driven via the PP (very fast control 25K or higher). The Brians are at machs update loop time of 10hrtz (slow for your axis control), thus jerky.....
scott
-
Mach already has all of the logic for dthc built in so there is no need to use anything else, my brain simply compares my value read in (in the process described above) with the value i have typed into dro 1036 i think, but its whatever is in the candcnc screenset for preset volts and moves up if the voltage is too low or down if its too high, the thc controls are there in the brain editor under thc up and thc dwn, and mach does the rest, if all criteria are met, arc ok signal is on and thc is turned on it will adjust the torch position.
Bingo youve got dthc
I have also been looking at how to do this with no pokeys, i think if i was to put a simple analogue to digital converter on my analogue voltage and reading in the pulses across the parrallel port using the spindle speed input or something which will measure frequency, this may also give the advantage of a wider working band, the limitation with my device is that i am taking a perhaps 10v variation and reducing it to perhaps 0.5v variation and then mathematically multiplying it back up, so there is error but in fairness to it i can make a 200mm long cut with one end of the material raised by 50mm and the cut height is pretty constant and when im hundreds in pocket i cant complain.
matt
Fisrt of thank you Matt for this great idea.
I think that I will try to do the suggestion with using the spindle speed input. The pulse signal should be easily generated by a tension to frequency converter such as the so cheap LM331.
Something like this (but only from the left to the optocoupler)
(http://img190.imageshack.us/img190/5523/lm331.jpg)
My only doubt compared to your pokeys solution is that with the LM331 I will only have one input which will prevent me to do the averaging that you perform in the brain while using several imputs on your pokeys...
Well I will see and keep you informed
JP
-
Thankyou for your kind words
I think the way you are talking about will work just fine, im not really sure if having more than one input is useful or not, i will be very interested to hear how you get on with that
matt
-
For sure I will keep you informed. As we say in France : "c'est la moindre des choses" !
BTW I am not yet sure how I can handle the negative voltage of the arc with the LM331... I will see !
I have just received the optocoupler today
still waiting for the LM331
And I have found into my plasma two devoted pins where to pick up the arc voltage :o
I have tried to emulate the Torch Up and torch down with keyboards in Mach3... but I don't see any effect in the Z DRO when running...
Any idea ?
cheers
JP
-
As someone mentioned, it is a good idea to have a transient suppressor in the voltage divider circuit to kill spikes caused by the collapse of the output transformer/choke of the plasma power supply. God forbid you should run unfiltered high frequency arc-start through a pokeys! Most modern small plasmas don't use HF. As far as averaging or smoothing the input (0-3.3 v) to torch-motion, a few trials with an RC network across the output of the voltage divider can give you control of the sensitivity or fussiness of the whole THC system. Make sure you use dividing resistors bigger than 1/4 watt if you are going to do this, however! Hypertherm uses ohmic-contact probing as a secondary system for plate detection. Their main sensing is motor current at the torch lifter. This is adjustable but I will be danged if I can figure out how they do it with a PWM motor drive. This is a good project for anyone with the need for THC and I enjoy everyone's input very much!
-
Jp,
i think if you cant see the dro changing its probably to do wit no having the thc enabled properly, personally i ecomend downloading the candcnc plugin, ensuring you have the thc on and a brain to make the keys emulate the signals.
I too enjoy peoples input on this, mkes for intesting reading
matt
-
Hi Matt,
In fact the plugin is not needed. My problem was only due to a missing THC On signal !!!
Now everything is in order and when emulating these signals (THCon, TCH up, THC down) Mach3 takes into account the height correction properly.
I have also progressed a bit.
Here is the schema of the electronics : (http://www.usinages.com/download.php?id=23841)
The voltage divider has been supressed as my Cut 50L provides a signal from 3V to 7V (when cutting) up to 90V when starting the arc.
The two diods on LM331 inputs are there to limit the voltage between -0.6V to 12.6V that is to the usefullrange of the torch signal.
I have not yet tested this schema excepted the inputs to the LM331.
For the moment I am finishing my CNC !
More details here (in french) : http://www.usinages.com/ma-fraiseuse-v2-a-vos-critiques-svp-t8144-90.html
JP
-
I have tried to emulate the Torch Up and torch down with keyboards in Mach3... but I don't see any effect in the Z DRO when running...
Any idea ?
cheers
JP
Hi Matt,
In fact the plugin is not needed. My problem was only due to a missing THC On signal !!!
Now everything is in order and when emulating these signals (THCon, TCH up, THC down) Mach3 takes into account the height correction properly.
Hi JP. I too have been trying to simulate control of Torch Up/Down via keyboard emulation in ports n pins. I get the Torch Up/Down LEDs lighting on the Diagnostics page but no Z movement in the DRO. I've made a call to StartTHC (THCOn() throws a script syntax error) but this makes no difference. What am I missing?
Cheers
Ian
-
Hi JP. I too have been trying to simulate control of Torch Up/Down via keyboard emulation in ports n pins. I get the Torch Up/Down LEDs lighting on the Diagnostics page but no Z movement in the DRO. I've made a call to StartTHC (THCOn() throws a script syntax error) but this makes no difference. What am I missing?
Ian
Hi Ian,
I have also emulated the torch on signal with a keyboard key. Then I have loaded a Gcode file at constant height.
When pressing the "torch on" key the cutting starts
when releasing the torch on key the cutting stops
when pressing the torch on + torch Up then the cutting height increases
with the torch down it decreases.
Well quite simple in fact
motion = torch on pressed
motion + torch up or down --> the height climbs or decreases
JP
-
Thanks JP - now working. FWIW I first tried this on my simulation Mach PC - i.e. no PP driver and although the Torch On/Off worked the TorchUP/Down didn't - the LEDs lit but no Z activity. Then I remembered a similar keyboard emulation issue I had a while back with the probe signal. It only actually works with the PP driver loaded. Sure enough the same seems to apply in this case.
thanks again
Ian
-
Thanks JP - now working. FWIW I first tried this on my simulation Mach PC - i.e. no PP driver and although the Torch On/Off worked the TorchUP/Down didn't - the LEDs lit but no Z activity. Then I remembered a similar keyboard emulation issue I had a while back with the probe signal. It only actually works with the PP driver loaded. Sure enough the same seems to apply in this case.
thanks again
Ian
Ok that's cool !
BTW, what do you mean with "pp driver" ?
JP
-
BTW, what do you mean with "pp driver" ?
JP
Parallel Port Driver. I have a Mach on my office PC with no machine attached for just testing stuff and therefore I didn't install the PP driver and a Mach in my workshop driving a machine and therefore I did install the PP driver.
Cheers
Ian
-
OK it's clear now ;)
JP
-
Hey guys
Did you get your DTHC working
-
Hey guys
Did you get your DTHC working
Hi,
Well not yet... Still finishing my CNC. See it's first cut here : http://www.youtube.com/watch?v=ILIp6wt-FJ4
JP
-
Hi all,
Height control with Mach3
Please look: http://www.youtube.com/watch?v=2rslIWcyfOo
Also please visit our web page www.agelkom.com.tr
-
Greetings for all:
I am little lost about how to set up THC feature of Mach3. Do I need some external divice to control the torch? or is just an option? if not, how do I configure the thc in Mach3 to work?
Is there any schematics? I have looked all over for info. like this. The Mach3 docs are very poor and dont tell how to use THC in it.
Any help appreciated.
Richy
-
Hi Richy,
It is possible to use Capacitive Sensor as a THC for Oxy Fuel and Plasma cutting.
It has some advantage than voltage controlled THC. No need floating switch or other things for "where the plate is" just adjust the height. And other advantage is PWM output not ON/OFF control that for causing oscillation the torch. It allows smooth Z movement during cutting.
Sensor connection via port and required 2 inputs.
Config>Ports&Pins>Input Signal>enable Torch On\ Up\ Down
Also you need simple macro:
For M3 command
code "g31 z0"
sleep(100) //for slowing down the routine
While IsMoving() // This will allow to continuously follow the curve on cutting material
sleep(100) //for slowing down the routine
Wend
DoSpinCW()
Sleep (5000) //wait for the z axis close to cutting plate and stop
(Also it is possible to use G28.1)
After that you can add to macro for zeroing the Z axes: G92Z0
Regards
-
Gents,
I am now back with my machine which makes me very happy! Im interested in how you are all getting on with your projects versions etc, does anyone else have a working version of the dthc in mach? What about the version using the spindle speed input? I would als be interested in hearing more from the guys who were talking about signal filtering as i plan to try to make my version of the dthc work better.
Thanks
Matt
-
I have been experimenting with the LM331 and trying to get it to register in Mach.
I followed freedom2000's wiring schematic originally but think I missed something as I failed to get a frequency out.
I then built a v-to-f circuit ala National Semiconductors web page using 3.3v.
The output was in the neighborhood of 4khz if I remember.
Twisting the circuit pot would very the freq +/- 1khz. I did not very the input voltage as I just didn't go there yet.
I used the index input in ports and pins and was able to get a reading on the spindle speed calibration graph.
At this point I was fiddling with my breadboard wires and back fed voltage into a pin on the LM331 that I shouldn't have and poof! Trabajo no mas. I'm waiting no some replacements.
As an aside, I got an Arduino for Christmas and am trying to get it to work as a DTHC independent of Brains similar to the stand alone units.
Progress is slow as I'm new to C+. I've got most of the blocks down but am working on getting them to work together.
-
Hi jlindst and welcome to the forum
As an aside, I got an Arduino for Christmas and am trying to get it to work as a DTHC independent of Brains similar to the stand alone units.
Progress is slow as I'm new to C+. I've got most of the blocks down but am working on getting them to work together.
A while back I was working on an arduino DTHC however although I'm fine with digital electronics I'm not so hot at analogue. When it came to doing the plasma interface board I was cool with most of it but I was stuck on how to absolutely make sure no spikes got through from it and killed the arduino. I've put it on the back burner for now. If it's any use I've attached the basic sketch I used just to emulate the DTHC principal on the arduino. (You'll need to change the extension back from txt to pde to load it into the IDE. the forum won't allow .pde)
Cheers
Ian
-
Hi Stirling.
Thanks for the sketch.
On the analog side I was working of a variable resistance voltage divider coupled with an R/C setup. This way depending on what a given plasma puts out in tip volts can be adjusted to fit within the 0-5v window that Arduino requires. I'm also waiting for some parts (including a new LM331) to build a voltage suppressor as to hopefully not feed the Arduino more than it can handle,
What I've got to date is a smoothing sketch to average the analog inputs.
I've got a comparator sketch similar to yours to manipulate up/down function.
What I'm working on now is getting a tip volts reading to send into the MACH DRO (1036?) for adjustment purposes.
That part I'm having trouble with is getting arduino to split it's output into 2 serial channels. (SoftSerial is what I'm working with to do the split)
One for the 0-1023 up/down comparator function and the other for tip volts.
I've been playng with the modbus slave sketch to get the serial based tip volts to the DRO.
-
Hi jlindst - you're further down the road than me so good luck. I will get back to it though when I have time.
Cheers
Ian
-
Im interested that others are looking down the route of using a plc, i looked at this, in simple terms this is what other thc systems use, an external processor to do the thinking and tell mach what to do. The reason i decided against it, and i got as far as buying the plc, is that i found mach would do all this for me if i used a brain. Critics of the system say brains are slow, thats maybe true but i still think they are fast enough for this application, more of a limitation is there is no ability to make a p i d loop, also you have to get an analogue value into mach. I was/am using a pokeys to do this, the analogue input is less than great, the value wanders quite alot when the voltage is constant. I was planning on using a g100 for this instead but after spending ages changing my machine over i had huge problems with the g100 so had to abandon it. Maybe i should revisit this, maybe through using buttons in mach i could enable/ disable the plc with connections and raise and lower the target voltage in the same way, i just dont really like the two screens and input buttons etc, its just ugly.
As far as interfacing with the plc goes using the voltage divider there should never be voltage spikes formt he plasma cutter larger than the maximum voltage of the transformer unless they are noise, so if you can fire into free air and not cause a problem with over voltage to the plc surely voltage spikes will simply give an erronious reading??
-
Eureka!
$27, about 120+- hours of staring at code and about 2 dozen cappacuinos = DIY DTHC over USB.
My widget looks like robot guts but the torch goes up and down and makes really purdy cuts.
Runs in Mach via da Brains.....BRAINS!!
Almost have it setup in EMC for the Linux set. (Why are you reading this forum?)
Thanks to Matt for the inspiration.
I'm working up a how-to and eagle schematics but this is the blueprint.
Tip volts --> BRD --> Volt. Div. --> Trans.Volt Sup. --> Hi freq gap --> RC filter/conditioning -->
PLC(10 bit ADCx3 sample) --> Modbus encapsulation -->Modbus RTU -->brains...Brains... BRAINS!!= Zup and Zdown releative to Tip volts.
ArcOK and trigger relay are piggybacked as well.
Electrons are fun. BRAINS!!
-
Hi jlindst - nice one - good work. I've been tackling this in a different way with the arduino. In my scheme the arduino takes full control of the Z during cutting and so far I'm getting good results but I'm currently simulating the arc voltage so I know I'm only ever feeding the ADC with 0 to 5V. I need (like you) to make sure I get a safe, clean, 0 to 5Vdc out of the plasma unit and that's the bit that's holding me up at the moment so can you give more details of your interface board.
Also regarding ArcOK, on my bought in THC300 unit this used to be done with a current transformer, but in my kit it has been replaced by what looks like a snap-on ferrite core but with three wires attched, that clips round the earth cable (from the table/work clamp) inside the plasma unit - any idea what this component is?
Cheers
Ian
-
Hi,
I am new to this forum and have been reading the comments made about THC in Mach3.
I am an electronic engineer and building a Plasma Table for in house operations.
Since the info about THC in the Mach3 documentation is weak at best, I thought I would state what I believe I have figured out, then let others here verify my assumptions.
Once all is understood I will design a solution that uses Mach3 the most economical way. Please make any comments to my statements here to help!
1. It would appear that Mach3 has all the controls needed for THC via: ARC OK, THC Up, THC Dn and Z axis Home (for floating head) inputs to the Par Port and Torch On output.
2. It also appears that in order to get to these signals and provide 4 axis of control for dual X, Y, and Z you will need a second Par port.
3. In addition, it supports DROs for Z Axis position and Torch Voltage if the data can get into Mach3. Any others required or desired?
4. If Mach3 is controlling the Z axis as normal via the first Par port, the additional signals THC up and THC down are injected into the current position known by Mach3.
5. To close the Z height control loop, using a Brain is slow due to its update frequency, so the control loop would be better if outside of MAch3.
6. What is the preferred way to get the DRO information into Mach3? Modbus or USB?
7. The Torch Arc OK and the Torch On Command are usually dry contact closures.
8. The Torch Voltage signal from various Plasma Units will vary across a large scale and should be isolated for safety.
This is a good start, please comment and we will go from there.....
Thanks in advance,
Steve
-
Hi all,
It's a long time since I have not posted here ;)
I have practiced a bit on µcontroler since this summer, and thus I plan to give up my original design (with LM331) for the benefit of a simpler and more powerfull Pic based circuit.
I plan to use a PIC 12F675 (2 $) to perform the following functions :
- output torh up and torch down
- output torch OK signal
- input torch intensity (with hall effect sensor) (use Pic comparator to convert it to torch Ok signal
- input torch voltage through a voltage divider into the Analog to digiital Pic IO and elaborate the UP/Down outputs
As you can see all outputs are opto protected
the torch ON signal is sent diectly via a relay to the plasma (not controled by my electronics (also I could as there is one input left opened !)
I plan also to use the original Port 1 of my PC assuming that there is no need to add an extra one...
Why ?
Just because :
- I can put the extra Zero Z torch in serie with the X, Y, Z limits switch of my CNC
- I will not input the torch voltage to Mach3
The software will do the following :
- monitor the torch intensity and wait for "torch OK"
- if torch OK :
- waits a few seconds for the voltage to stabilize after peircing
- monitors the torch voltage and use it as a reference
- loops on voltage measure + average (filtering) and outputs UP/Down signals
until torch NOK
Assuming that the Gcode is OK the height should be correct after peircing and consequently the first monitored voltage could be used as reference
There is thus no need to have the Voltage provided by Mach3
Also the upper and lower limits for generating UP/down signals could be generated by the pic
For the Torch OK signal I plan to use a cheap and very simple hall effect sensor UGN3503 (made by Allegro)
It is a "stand alone" device which only needs +5V power supply and outputs directly a voltage deviation from 2,5V reference if a magnetic field is seen by the sensor.
It can be used with a toroid to sense current in a wire
(http://www.allegromicro.com/en/Products/Design/hall-effect-sensor-ic-applications-guide/images/fig61B.gif)
The toroid is extracted from an old PC power supply and a slice of it is removed with a dremel. It acts as a magnetic field concentrator into wich is inserted the sensor.
See how small this device is compared to a USB key ;D
(http://img651.imageshack.us/img651/1899/cncjpg101ju.jpg)
And finally the virtual PCB ;)
(http://img651.imageshack.us/img651/1060/thcplasmarwsq.png)
Hope all this will work !
JP
(http://img267.imageshack.us/img267/9694/cncjpg100.jpg)
-
-
Jp - i like it, the only thing im wondering about is the polarity of your plasma voltage, my cutter is negative polarity, if yours is you need to connect your voltage divider to vdd not vss, so the arc will pull the voltage down.
Steve- I replied to your post a while back but it doesnt seem to have got there, i will write it again when i have a moment.
-
Jp - i like it, the only thing im wondering about is the polarity of your plasma voltage, my cutter is negative polarity, if yours is you need to connect your voltage divider to vdd not vss, so the arc will pull the voltage down.
Hi Matt,
As I have put a bridge rectifier, I don't think that I need to pull up the signal. I have already measured the bridge output and the voltage is positive when I plug the "black wire" to the Vss.
Furthermore I input the divider into an analog to digital converter, so I suppose that I can handle the output "logically" ...
Cheers
JP
-
Agreed re: arc V being -ve. A question though about the full wave rectification of the arc voltage - why? I've seen this done on a couple of other THC interfaces. Surely any positive componant (which ideally shouldn't really be there) should be junked and not taken into consideration by the ADC. - or am I missing something?
Cheers
Ian
EDIT: the above post beat me to it... But are you sure about your polarity? a bridge rectifier can't change polarity of the arc voltage and your ADC input must be +ve.
-
Hi,
The bridge rectifier is basically useless if you are sure of the polarity of your plasma... If not (or if you have doubt like me) then the bridge is simply protecting the output to possible reverse polarity insuring in a systematic way that the + output side will always be positive and the - always negative.
See here some more explainations : http://en.wikipedia.org/wiki/Diode_bridge (http://en.wikipedia.org/wiki/Diode_bridge)
(http://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Diode_bridge_alt_1.svg/557px-Diode_bridge_alt_1.svg.png)
(http://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Diode_bridge_alt_2.svg/557px-Diode_bridge_alt_2.svg.png)
in particular check this sentence : In each case, the upper right output remains positive and lower right output negative. Since this is true whether the input is AC or DC, this circuit not only produces a DC output from an AC input, it can also provide what is sometimes called "reverse polarity protection". That is, it permits normal functioning of DC-powered equipment when batteries have been installed backwards, or when the leads (wires) from a DC power source have been reversed, and protects the equipment from potential damage caused by reverse polarity.
So whatever the polarity of you plasma is the bridge will insure that the input to the ADC is always positive.
Agreed ? (it was not so easy for me to admit it...but it's the basic principle of a diiode bridge)
JP
-
I agree with you 100%, i thought htat would work too, but it didnt for me.
My polarity is definately negative, when measure with true ground as a reference i get approximately 0v from one lead and - 1?? from the other, the bridge makesno difference to this, tried and tried, all it does is ensure that all the positive elements of both signals go one way and all the negatives go the other, if there is no positve element to either signal, ever, you cant get a positive reading.
I dont entirely understand it and im not saying you are wrong at all but all i know is for my system it made no difference to the polarity but is a good idea to protect against the wrong polarity.
Matt
-
Matt,
I am surprised too, but I trust you !
I will ask this question to an electronics ingeneer I know (and specialized in high voltages) ... we probably could get more explainations on this topic.
However why do you measure with true ground as a reference ? (I understand the VSS signal being the ground)
On my plasma the ground (of the plasma box device) is not connected to any pin of the plasma torch.
Of course the metal piece to be be cut will be connected to the CNC ground... but from an electrical point of view the + and - signal of the torch are not if you isolate the metal part to be cut from the ground.
JP
-
LOL - not sure if we're agreeing or not ;D
I think folks get mixed up with bridge rectifiers because they think they turn -ve into +ve. They don't, they basically just make sure that the CURRENT is in the same direction at the output regardless of what's going on at the input.
See attached pic - whatever potential diff you feed in and whatever way round it is you allways get the MOST positive side to the top output and the MOST negetive side to the bottom and therefore the CURRENT is allways in the same direction. BUT positive NEVER changes to negetive or visa virsa.
-
We may not be agreeing but we are provoking interesting discussion!!
The reason i always test with respect to ground ground is because the meter measures potential difference, put it between you plasma + and - and you get 1?? volts, meausre one with respect to ground and you get approx 0v, the other gives - 1??. When you feed it into an ic unless it has a voltgae comparator and uses 2 wires for each analogue input, it will compare it to the -ve side of its supply voltage, which probably is on or near ground, so unless you want to float your whole power supply ground at the same as one side of the plasma thats what it will be compared to.
Sorry if i cant explain what i mean very effectively, i know what i mean i just cant get it out!
Matt
-
This is very interesting stuff, a low cost THC would be great!!!
If you guys want, I can put alot of this stuff into a Plugin, and make an installer that would install it, a NEW THC screen set if someone wants to make one, the xml, a Flash Help file/how to doc, any needed VB macros, through a msi installer.
I dont do any electronics nor do I fool with THC other than to tune a machine, so I dont really know that much about the inner workings of the THC process.
So, if you would tell me what you want, and what you want it to do, it can feed stuff to Screen DROS, Labels, tickers, LEDs what ever, through the Modbus, or pokeys, or what ever, it doesnt really matter.....
scott
-
Scott, Long time, no speak, too long!
Im interested in if you can come up with a way for mach to use a pid loop or some kind of proportional response to an analogue voltage input, maybe instead of just using a straight forward threshold for up or down you could adjust thc rate as well in order to make a proportional response, seems crazy that the torch is going to move up and down at the same rate if the voltage is a long way off as it would if it was nearly correct. Any thoughts??
The other thing im wondering is do you know of another way to get a straight forward analogue voltage into mach other than through the modbus?? People have criticised the system for being too slow because of the rate at which the modbus and or brains work, if maybe we could get the signal into mach using the pp or the serial port we could do better??
Just thinking as i type im wondering if we could come up with a screenset with all the required coding behind it to allow users to tailor their own solution, i made myself a normal mach screenset with an extra thc tab where i can see all thats going on, in addition perhaps we could have a thc setup tab where you specify where your input is coming from, you can adjust the proportional response to suit your system, you can set target voltage and use the look up table like others use, and then all the coding is behind it so that someone can simply download the plugin, instal it, provide an analogue or frequency input, tune the proportional response and they will have a working system, which is made for them and them only, they supply any hardware required to interface to their plasma etc maybe with some pointers as to how to do it and all thats needed is the plugin. Maybe an option for those who wish to use a plc to just use thc up and down and then use the screenset to give an on screen display of the arc voltage in mach.
What does anybody think??
Matt
-
Great idea Matt !
Regarding the PID I think it's easy to do the job into the PIC, but would need a "speed signal" to be output for Mach3 to get the result information in addition to the UP/DOWN pins
For the I/O to/from Mach3 of "bytes values" an easy way would be to use serial COM (at least with a PIC it's easy to do). Don't know yet if Mach3 supports serial COMs but I suppose that yes !
JP
-
Hi all,
Rather than trying to convince myself (or you !) on "voltage stories" I decided to try my schema ???
Here is the result on you tube http://www.youtube.com/watch?v=8w3nAoKZghw (http://www.youtube.com/watch?v=8w3nAoKZghw)
It's only a prototype just including the voltage divider that I had put after the bridge rectifier.
The Vss is connected both to the minus signal of the bridge and to the minus power supply of the PIC (exactly as on my schema)
The PIC itself is powered by a small mobile phone 220V to 5V DC power supply
The analog to digital input is used to flash two leds :
- one indicating a torch voltage between 40V and 150V
- one indicating a torch voltage greater than 150V (off if Vtorch < 150V)
The input torch voltage is absolutely not filtered so a few spikes may occur... But the basic function is demonstrated ;D
Why does it work ?
Because a "voltage" by itself is nothing... it must be "voltage difference". When wiring together the 0V of my PIC and the minus of the bridge output, I fix the "minus bridge" to 0V
When some electrons are flowing from the bridge minus to the bridge +, then the bridge v+ climbs, thus it is seen as a signal between 0 and 5V on the divider.
I have also connected an oscilloscope on the bridge and measured the signals between :
- the plasma ground and the torch tip --> it's a negative voltage (as foreseen)
- the bridge - and the bridge + --> it's a positive signal (as foreseen)
- the plasma ground and the bridge + --> it's a negative signal ... but I don't use it :-\
JP
-
JP,
I like it, i like it alot....
You tie the bridge to power supply negative to make them common, i had wondered about it but never imagined you could do it without having problems like drawing loads of current or destroying the pic when you fire the plasma, youve just solved a wholeload of problems!!!
The killer partnow really is in the filtering of the voltage from the torch to take out any spikes or component destroying hf.
I presume you are planning on using the pic for ad conversion then feeding the frequency output to mach through the pp??
Id love to see how that works
Matt
-
JP,
I like it, i like it alot....
You tie the bridge to power supply negative to make them common, i had wondered about it but never imagined you could do it without having problems like drawing loads of current or destroying the pic when you fire the plasma, youve just solved a wholeload of problems!!!
The killer partnow really is in the filtering of the voltage from the torch to take out any spikes or component destroying hf.
I presume you are planning on using the pic for ad conversion then feeding the frequency output to mach through the pp??
Id love to see how that works
Matt
Thanks Matt !!!
By the way the pic is protected for under and overvoltage with internal dodes put on all the I/O pins --> there is almost no way to destruct it (if the intensity of current is within the range...)
I need to filter the voltage only to get a proper measure to make the THC work !
I will not send the "index" signal to Mach3 but only the UP/DOWN and torch OK signals.
All the computations can be done in real time into the PIC.
The tricky issue is that I will not have the "Voltage consigne" from Mach3 either...
But I can monitor the firs ms of cutting when the torch is properly positionned in height and when there is yet no significant deformation of the metal.
So :
- mach3 height positonning
- piercing
- start of move
- PICK UP of torch voltage and use it as reference
- monitor torch voltage and deliver UP/DOWN signals
JP
-
Jp,
Personally id like to be able to set the voltage from mach for each cut, you could communicate it to the pic either using an analogue output if you have a modbus device or by using binary over 5 or 6 inputs, just a thought, be sure to let us know how you get on
Matt
-
Jp,
Personally id like to be able to set the voltage from mach for each cut, you could communicate it to the pic either using an analogue output if you have a modbus device or by using binary over 5 or 6 inputs, just a thought, be sure to let us know how you get on
Matt
Well,
My Pic is fully used (in terms of IO pins), I only have one remaining input pin left...
I could use it to communicate with Mach3 using serial protocol RS232
I know how to do it with the PIC but not from Mach3 ...
May be with a script, but how ?
Any idea Matt ?
JP
-
The short answer is no....
i think there may be a serial out command that is supported by mach in vb, its either serial out or in because i remember looking at it to see if i could get the plasma volatge in that way but i couldnt get 2 way communication.
In some ways i doo like the idea of referencing the voltage fromt he start of the cut too, saves a lot of messing, you just leave it to do its thing, set the feedrate to what gives you best results and it does the rest, i think it would be very interesting to be able to see what that was doing until you learned to trust it, for instance if i make 5 pierces and start cutting do i get pretty well the same voltage preset each time?? how close is it to what is in the book?? etc etc...
keep up the good work jp
-
i think there may be a serial out command that is supported by mach in vb, its either serial out or in because i remember looking at it to see if i could get the plasma volatge in that way but i couldnt get 2 way communication.
In some ways i doo like the idea of referencing the voltage fromt he start of the cut too, saves a lot of messing, you just leave it to do its thing, set the feedrate to what gives you best results and it does the rest, i think it would be very interesting to be able to see what that was doing until you learned to trust it, for instance if i make 5 pierces and start cutting do i get pretty well the same voltage preset each time?? how close is it to what is in the book?? etc etc...
keep up the good work jp
Hi Matt,
I have found a way to send informations from Mach3 to the serial COM you want. Just copy paste this code into any button and run it :
Sub main()
Set MSComm1=CreateObject("MSCOMMLib.MSComm")
MSComm1.Settings = "9600,n,8,1"
MSComm1.CommPort = 5
MSComm1.InBufferCount = 0
MSComm1.PortOpen = True
If Err Then
MsgBox "COM" & MSComm1.CommPort & ": not opened, Sorry!"
Exit Sub
Else
message "port opened"
Sleep(1000)
'MsgBox "COM" & MSComm1.CommPort & ": opened !"
End If
MSComm1.Output="Torch Voltage sent by JP : " & GetOEMDRO(83) & Chr(13)
'MsgBox "COM" & MSComm1.CommPort & "output ok"
message "torch voltage sent"
Sleep(1000)
MSComm1.PortOpen = False
Set MSComm1 = Nothing
End Sub
The port that I choose is port COM5, you can change it if you don't have COM5...
I have checked that it works, the port is properly receiving the DRO value.
BTW, what are the DRO's for THC ?
I will try to update my PIC code to monitor the voltages as you propose.
Cheers
JP
-
I cant remember what the numbers are, the ones i found were from the candcnc screenset, to be honest i have been using my own numbers, we should set a standard if scott is going to write us a plugin.
I cant tell you what numbers i used, i got a new plasma with hf start a few days ago, needless to say it blew the **** out of the motherboard!!
Matt
-
Hey gents,
Here is what Mach can do, Brian wrote a Serial plugin and a PID loop plugin that went to a PLC for THC, I have copies of both, and they could be combined to do the PIC acros the serial if thats what you want.......... BUT..............
I realize people say modbus and other technologies i.e. pokeys/usb is too slow, both Modbus, plugins, run in Machs 10hrtz update loop. so 1/10th of a second. I find it hard to believe that you Z axis can move THAT much in 1/10th of a second, due to acceleration/decelration times, inertia ect.
From what I understand back in the day, when Brian did the THC plugin for analog PLC control, he said it worked ok acxross the modbus. Currently in mach, (that I am aware of), there is no "FAST" analog input stuff, i.e. attached to a Para Port etc. I suspect that if you think Mach is TOO slow for your PID loop then you will need to do a stand alone PID and Z axis hiegth control. Note: this may change in the future with mach version 4, as brian says that updates are running at 50hrtz....... so.......
but at any rate, If you want to use the Modbus with a device like a PLC, or one of Aurturos boards, or Peter Holmans board, or...?? it really doesnt matter, Pokeys on USB......... it all will currently ultimatly run inside machs 10hrts loop, ther e is a 40 hurtz loop available in the plugin but it is only for VERY fast code, other wize you crash mach. So I dont really fool with it much.......
Since I am NOT a THC user, someone else will have to do a Screen Set for it, the plugin can be tied into the screen set or what ever...... you can touch and do all kinds of stuff with mach from a plugin....... Further I use MSI installers on all my plugins now, so when you run one of mine, it installs the plugin, the screen set, the xml, (the modbus config if applicable), Macros, Bitmaps, help file, read me......etc.
it is easy to make the PID loop user adjustable, via dialog boxes........ Personally for industrial applications I prefer a PLC that has a proven track record of reliablity in an industrial enviroment. A Automation Direct DL05, with an Analog module would probably run you around $200-300 so that may be getting OUT of the realm of Cheap.....
I do some "beginner" programming of Pics, but I only have a "learners" PIC board, and no real world experience in using them. But, programming, is programmming.....
scott
-
Thanks Scott for these informations.
On my side, as I am an hobbyist, I do not plan to use modbus and so I look for the cheapest solution available.
A Pic + a few componants could give a "standalone" THC for less than 10$ ;)
A believe that Mach3 is fast enough on the Z axis to achieve a proper motion when ready the UP/DOWN signals on the // port.
All the rest could be done in the PIC at a rate of 0,1s per measure (roughly).
To save a few pins on my PIC I wanted to send some DRO to my board via a standard serial port (not modbus).
I don't care about the speed of this serial link as these parameters will just be sent for initialisation purpose from a VBscript attached to a button. So I don't need real time.
Well I go on with my breadboard solution... Just to see !
JP
-
Scott,
I figure from what you say the ONLY way to get an anaolgue value into mach is via the modbus?? No chance of it via the pp or serial port at the moment?? Obviously if it could be done by either the pp or sp that would make it much easier.
I agree i call bs on 10hz not being fast enough for the z axis, the system was accused of hunting because it was too slow, i think if it hunts its not because its too slow, its because the idea of a simple threshold and no proportional response in terms of a control system is junk, its bound to hunt really. So if you can do us for a pid loop that would be first class.
Personally im very interested in what jp is doing and i do realise trying to do everything in mach has its own limitations but to me its the whole beauty of it so id be keen to keep the processing element in mach, especially if we could improve the quality of the control loop. Im sure a plc could do a better job but for the money i could buy a thc system out of the box, its probably what i should do but a combination of stubborness and interest keeps me at this.
I could sort you out with a screen set, it would probably be a simple mach screenset with an additional tab or two, before i got right down to it id need to spend some time thinking about exactly what i want it to do for me....
I will have a think about itand let you know what i come up with, this would be a great time for anybody else to give some input as to what they want.
Matt
-
The Vss is connected both to the minus signal of the bridge and to the minus power supply of the PIC (exactly as on my schema)
The PIC itself is powered by a small mobile phone 220V to 5V DC power supply
I appreciate you guys are on a role here but just indulge me one more time if you will. Can you (carefully) take a voltage reading between TRUE ground and Vss whilst the torch is firing and let me know what it is please?
-
The Vss is connected both to the minus signal of the bridge and to the minus power supply of the PIC (exactly as on my schema)
The PIC itself is powered by a small mobile phone 220V to 5V DC power supply
I appreciate you guys are on a role here but just indulge me one more time if you will. Can you (carefully) take a voltage reading between TRUE ground and Vss whilst the torch is firing and let me know what it is please?
I have not connected the ground to anything... so I cannot do this measure...
The voltage between the plasma "ground" (ie the metal plate) and the troch tip is -300V before cutting and drops to -50 to -200V when cutting.
I will try to monitor this voltage more precisely after ADC conversion and input in my PC via serail link.
JP
-
I have not connected the ground to anything... so I cannot do this measure...
???
You just put one probe from your scope or meter to plasma ground and the other probe to Vss - that gives you the potential difference (voltage) accross them.
-
I have not connected the ground to anything... so I cannot do this measure...
???
You just put one probe from your scope or meter to plasma ground and the other probe to Vss - that gives you the potential difference (voltage) accross them.
What do you mean by "Ground" ?
Neither the torch tip (torch -) nor the clamp (torch +) are connected with the plasma metal body which is connected to real ground...
JP
-
The bit that is causing confusion i think is that the plasma clamp which everyone calls the earth clamp is actually the positive side of the circuit and the torch is the negative, meaning that if you connect one side of the meter to true ground (a ground pin into the ground) and the other side to the clamp on the plasma (positive side of the plasma) you will read a few volts positive or negative, maybe 2 or 3, if you move the meter to the torch and true ground you will measure - 300vdc when firing into open air and -80 to -120 volts ish when cutting.
Hope ive confused you some more!!
Matt
-
Hi all,
Just to be clear on terminology ...
What I call "ground" is the earth of the 220V AC plug connected to the frame of the plasma device
What I call + is the clamp of the plasma connected to the metal to be cut
What I call - is the tip of the torch
(http://img715.imageshack.us/img715/2596/cncjpg102.jpg)
The ground is connected to nothing... No measure of voltage possible between earth/ground and + or minus
The voltage between + (clamp) and - (tip torch) is -300V when the arc is off but trigerred
The voltage between + and minus is betwen -50V to -200V when cutting
BTW, my serail connexion from the PIC to the PC is working ;)
I will be able to monitor voltage on an excel spreadsheet
JP
-
LOL - I hope the next time I need a tooth pulled the dentist has an easier time than this!
Just for me, like I said - humour me - stick one lead (I don't care which) of your scope/voltmeter on your your "clamp" and the other lead onto your Vss, fire the torch and take the reading. Then stick one lead onto your "plasma metal body" and leave your other lead on your Vss, fire the torch and take the reading. You never know - you might find the results interesting.
-
LOL - I hope the next time I need a tooth pulled the dentist has an easier time than this!
Just for me, like I said - humour me - stick one lead (I don't care which) of your scope/voltmeter on your your "clamp" and the other lead onto your Vss, fire the torch and take the reading. Then stick one lead onto your "plasma metal body" and leave your other lead on your Vss, fire the torch and take the reading. You never know - you might find the results interesting.
well... I don't know how to say it more clearly...
V"clamp" - Vss = 0V
earth - Vss = nothing (oscillating between -0.xx and +0.xx V --> not a fixed votage)
earth - plasma clamp = nothing
earth- torch tip = nothing
and that's normal as earth is NOT connected to torch tip nor torch ground... (unless you connect the metal part to be cut to earth you will not have a voltage reference between earth and plasma "clamp" or plasma torch tip...)
That's also normal as the power supply for my PIC is not connected to earth.
keep you teeth :-)
JP
-
Im interested to know what you find when you do it stirling?
Matt
-
Well I was going to retire from this topic but as you've asked... :). What I did right at the start was to model this in SPICE. The problem there is that SPICE (as far as I'm aware anyway) absolutely requires a properly earthed circuit. So the results I was getting were of course quite different. I was a little slow on the uptake with JP's insistance that none of his circuit is in fact earthed at all as I'm not used to working "un earthed".
It's not for me to say how other people go about things but sooner or later IMHO the plasma table/work will or at least should be earthed. At this point, it seems to me that JP's Vss becomes "TipV" and Vdd floates 5V above "TipV" with the scaled output somewhere between these two - all below and with respect to, true earth. Though it will most likely still work, I'll leave it to others to decide what their views are on the method.
-
Hi,
Any time you are using a voltage transformer, you are working "un earthed"
(http://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Transformer_under_load.svg/280px-Transformer_under_load.svg.png)
Any time you connect an electrical device on sector (110VAC or 220 VAC) neither the phase nor the neutral is connected to earth.
However these devices are safe... Only the body is connected to earth to protect you against leakage between sector and you (earth)
Of course the plasma "clamp" will be connected to earth on the CNC, it will be difficult not to do it !
Thus the Torch "clamp" V+ will be connected de facto to earth
And my schema will still work ... provided that neither Vss nor Vdd touch the earth (which is easy to achieve --> put it in a plastic box ;)
And even if you touch the earth with Vss... it would be the same as touching the metal part with the torch tip...
My electronics should survive if the plasma does.
In those conditions voltage difference between Vdd-Vss will be 5V (in blue) when voltage difference between torch clamp and torch tip will be 300V (in red)
(http://www.usinages.com/download.php?id=40804)
JP
-
I think im in the same camp as stirling there, there is no avoiding it is negative with respect to true earth and so has to be inverted
-
Just to go on a bit !
You are absolutely right when saying that Vss (and Vdd) will float (or rather sink) under the earth level. But who cares ?
The only NEEDED condition is also that any signal entering in (or going out from) the µcontroler is NOT connected both to earth and Vss (or Vdd). And this is achieved safely as these connections are optical ones (via the optocoupler). These signals are thus fully isolated from the plasma side. You can go on using your PC without risking an "explosion" ;)
Note also that I have on purpose (for clarity) suppressed the diode bridge as it is useless when you know where the + and - sides at the plasma level are.
(If not or if you want an "universal" system just put the diode birdge).
Is this schema safe ? The answer is YES (if not please go on explaining why)
I proposed to put the PCB into a plastic box --> this is NOT a joke : we must do it
And by the way it is exactly how electronic devices not grouded work. Let's look at a dremel : it is NOT grounded, and to be safe it is surrounded by a plastic body...
JP
-
I think im in the same camp as stirling there, there is no avoiding it is negative with respect to true earth and so has to be inverted
Hi Matt,
Why do you say this ?
VClamp - VTorch = 0 - (- 300) = 300 V --> there is no trick here.
If you put the "black" on the tip and the "red" on the clamp you WILL measure a positive voltage
f you connect the clamp to the earth (even if it is not the case electrically speaking on my Plasma) then you will still measure a positive voltage between clamp and tip (clamp - tip = 300V)
Right or not ?
JP
-
Hi Matt, Scot & JP
Where does it go from here, I must say and I am sure I speak for a lot of other readers whats next? I have really enjoyed reading the posts.
Is this topic closed or will it continue to run so close yet so far.
This in my mind is what its all about, you gentlemen are stars and it would be of great service to all us lesser mortals to continue to a conclusion
hopefully a cost effective home brew of a THC system that challenges the commercial options.
I am sure I am not alone in trying to build things for myself (even if it takes longer) If money was not an issue we would all go out and buy the things we want
and life would be simple, but that's not what Mach is all about for the majority of people
So come on gents and please continue your excellent debate and hopefully we can all learn as we read
Thank you for getting this far
Ex Apprentice
-
Hi,
I have not given up :-)
I just have to finish the PIC code and upgrade my CNC with my plasma torch.
I just need time.. not enough to do all I want to do >:(
JP
-
Hi JP
That's good news, as I said I am sure loads of people have read these posts and really enjoyed the content
It would be soul destroying for quite a few of us if this subject just died a death with no outcome
Having a mechanical leaning (but learning the electronics side at a very steep curve - I find this very interesting)
couple that with the fact that it has the potential to be such a good system
Cant wait to read more
I fully understand the time thing my customers just seem to get in the way of my hobby
Thanks again
Ex Apprentice
-
I have also not given up!
Summers are very busy for me, im a farmer! Add in that just after i last posted i got offered an old esab magic eye machine for cheap, which i bought and then sold my home made contraption and you understand my absence, its a weak excuse i know! The stuff still goes round in my head buut i just dont get to note it down.
Heres where i am with it.
Im trying to build a new machine to improve cut quality, speed, accuracy etc etc, i have bought a larger transformer type plasma and everything i read tells me my results will only be as good as my thc. As you may have read ive always been of the opinion that using your pc for the processing seems obvious to me, the trouble is you have to get the signal there and get it back again, im sure its quite possible and could be very fast and accurate but we have to be able to integrate it with mach and make it quick and easy and cheap. Invarialy if you want to get it into mach you appear to have to use modbus, this gets accused of being slow which personally i dont buy but for me i think where it falls down is the modbus devices availabe with analogue inputs lack flexibility, fo instance we ended up on much debate about if the voltage signal from the plasma needed to be inverted, if you were able to use a different device with more flexible analogue inputs then maybe it wouldnt. The other thing that worries me with any mach based system is that the only ability we have to adjust the z on the go is simple up or down with no adjustable speed, thats ok but for best results surely a servo responce is required?? My new z axis also has a straihtforward dc window wiper motor on it as it was only ever meant for gas cutting, but this is what the big boys use, so im thinking that in order to make the system as cheap and simple and effective as i can im going to have to sell my soul a little, im thinking i will use a pic or plc connected to the dc motor with a motor controller, much like a servo drive and with an encoder so speed will be infinately variable using a pwn about from the processor allowinf a servo response,. this will integrate with mach as if there were no z in mach, mach has the x and y co ordinates correct and wishes to start the cut it will send a signal tot he plc and the plc will control the z axis move down to the metal, touch off, fire the torch and when the plasma gives the ok to move signal it wil move, the plc then monitors voltage and thc.
It may sound complex but i think it might work and be easier and cheaper!
matt
-
Hi Guys
for cur read from plasma. must be 35/1 redictor or coverter noise filter pcb,because 140to350volt verynoise cur out
If it is noclear ithe analog input voltage PIC is blocked . dc analog voltage 0 to 4.500mlv max (must be very clean)
if from Lpt1 the contact runs very fast up down or cur ok ,from modbus 100mls delay mode contact very slow process
makes the continuous problem
-
thanks
-
OK stumbled upon this thread, since I am trying to fix one of my power supplies on my setup. I read somewhere else and heard the the bridge rectifier might have gone bad? Not sure if this is actually true, also dont know how they work.
Any ideas?
-
Hey Jacob,
I can certainly help with that. So yes bridge rectifiers sometimes do go bad and they can cause power supplies to malfunction or just not work in general. Best thing to do is just replace the power supply or get a new bridge rectifier.
-
Ok got it yea I think I might just try to replace the bridge rectifier then. i just still have no idea how it works. Do you know the basic functionality of it. Will help me understand more. Thanks
-
Yea a bridge rectifier is essentially a configuration of 4 diodes. Its used to convert AC to DC . it allows current to flow in one direction and not backwards.
-
Okay got it , 4 diodes.. Does it come in a kit and you have to put it together or something like that?
-
Nope no kit, although in theory yes you could configure your own. Don't do that though. They come in pre-assembled modules. i found this it will help explain how they work so you have a better understanding https://www.derf.com/how-a-bridge-rectifier-works-step-by-step-tutorial/ goes into detail about the process of rectification. Which is the first thing you should learn. It is the most basic principle when it comes to any type of rectifier. Full wave, half wave, three etc.. Also it talk about the different applications. Also you can google a lot of this. Tons of information out there.
-
Hey thanks so much for detailed reply. Wow just looked on google tons of information. I will give that article a read to looks like a great resource. Thanks so much.
-
Yup no problem, let me know if you have any other questions I am be happy to help.