-
Re: Plasma Table
Tom
Thank you, I was fishing for a way to move the KSTEP input functions to another KFLOP port(s) (J4 and or J6) so I could use the predefined serial routines on J 7 to query an external isolated ADC.
I understand conceptually the dual loop approach you are speaking about for THC. I am a bit lost on how you define it in Kmotion. I know that I can make a micro read an ADC and output a quadrature pulse train that follows a change in input voltage so one of the encoder inputs can be used. This has the problem is that I need to control the arc voltage to about +/- .2VDC or better to get good height accuracy over a full range of arc voltages ( 0 to 200VDC for cutting and up to about 325VDC open circuit). Now I know with some clever design I could get it so I only need to send data for the 50VDC to about 200VDC range. What I am not sure about is a clean way changing filter response and initializing the starting voltage in both the micro and KFLOP. I was really hoping to avoid the multiple communication paths that the better THCs use to pass data between the parts. Another minor detail is freezing the torch at a preset height when the feedrate slows for corners and smaller arc segments, most THCs use special M codes inserted by the PP. Also the THC needs to be aware of the state of the torch function. This was why I originally wanted try and do everything in the KFLOP.
John
-
Re: Plasma Table
Hi John,
Seems like you would need an 11 or 12 bit ADC. Regarding sending encoder counts as voltage: it seems like one extra line could be used as a level to tell both side to zero..
To process the 19KHz sawtooth would require at least a 200KHz Sample rate. So I agree that would be very difficult to get the data into KFLOP at that rate.
Regarding freezing Torch height when the feedrate slows: you should be use either method - MCodes or Freezing based on Feedrate. My previous post shows how to turn dual loop on and off. Instead of using a persist Variable you might use a Virtual Bit. The advantage would be that I/O bits (real or virtual) can be embedded into the Motion stream to happen synchronously at a specified point in the motion. See:
Synchronous IO Commands Embedded in Coordinated Motion
For the other method you could have a User Program running monitoring Feed Rate and when it drops below some threshold it would automatically disable the dual loop.
HTH
Regards
-
Re: Plasma Table
Hello
Sorry about resurrecting such an old thread but I want to keep my thoughts in one place.
I really need to make a new control for my plasma table so the hunt continues for a solution I can manage. I am dead set against using Mach 3 for a number of reasons so that leaves me with few choices for a system that is open enough to customize for a plasma table with good reliable torch height control. Right now I think my choices are KFLOP or LinuxCNC. Both systems will require a customized GUI and LinuxCNC uses the PC for all timing which scares me. I must admit that I have tried to use VS to modify Kmotion CNC as far as the GUI goes with little joy. I have struggled with the work flow used in VS for GUI development for years and it just isn't improving.
Measuring the plasma arc voltage and getting it into a KFLOP seems to be the real hurdle for now. I am sure I can find a VS programmer to generate the GUI code I need. Looking around it still appears the best solutions for galvanically isolated arc voltage measurement have a frequency or pulse width output proportional to the input. Is it possible to use one of the KFLOP encoder inputs as a simple up counter? I believe I asked about measuring frequency before and that was out. I think I have figured out how to use a simple Arduino to measure pulse width or frequency and then simulate an encoder for the output. This may require one or more single bit lines to keep things synchronized. So I guess to cut to the chase what is the best way to measure the frequency of a 100khz to 1mhz square wave signal (Mesa THCad card) with a KFLOP so it can be used as the arc voltage feedback?
John
-
2 Attachment(s)
Re: Plasma Table
Hi John,
Regarding Torch Height Voltage. It seems you are referring to:
THCAD-300 High isolation A-D accessory
That looks like a really nice device. I think you could measure it's frequency output with a KFLOP encoder input. Unfortunately it only outputs a single signal where Kanalog Encoder inputs need A/B Quadrature signals. KFLOP's encoder inputs can count at 1meg quadrature transitions per second (250KHz Cycles). So the divide by 32 option would be required for a max frequency of 31250Hz (125000 quad counts/sec). Too bad it doesn't have a divide by 4 option.
To create the B phase for Kanalog I think a simple circuit with two 100 ohm resistors and a 0.01uF capacitor could be used. See this circuit where the differential "A" channel coming from the THCad board could basically be delayed by ~1us to create the differential "B" channel for Kanalog:
Attachment 291494
and this simulation:
Attachment 291496
BTW I just discovered this cool on-line free circuit simulator. The link is:
Online Circuit Simulator with SPICE
By sampling the Encoder count every 30 milliseconds should provide a voltage measurement with ~ 0.1% resolution. Do you thing that would be adequate resolution and sample frequency for you?
HTH
Regards
-
Re: Plasma Table
Tom
Thank you for the prompt and informative reply. Your solution wins for cost and simplicity. I am sure that with the resolution and update period a THCad can be read into a KFLOP at that a real high performance torch height control can be implemented. Fast enough response to cut corrugated sheet steel at >300ipm may be out but all real world cutting will be good. Now I have to get my act together and make this happen.
1. Finish requirements and specification documents for table and torch height control.
2. Start modifying KMotion CNC GUI for plasma cutting with torch height control.
3. Define interfaces between all hardware pieces/produce preliminary interconnection drawings.
4. Construct new Z axis for table.
5. Develop plasma power supply/THCad (10V)/ KFLOP interfaces and test.
6. Develop KFLOP program(s) to handle table and torch height control.
7. Build prototype bench test system using spare steppers and drives to test Z axis and preliminary torch height control.
8. Replace existing Flashcut and Torchmate controls with one that functions in a reliable and consistent manner.
Ok, now that I have frightened myself with the amount of work required to refit my table I will have to get going before I burn up any more consumables because of buggy torch height and plasma power supply control.
John
-
Re: Plasma Table
Tom
One thing about the KFLOP encoder inputs that is not clear to me. Do the encoder inputs require pulses that are 4us or more wide or do they only require that they arrive at a rate of 250khz or less? Thank you.
John
-
Re: Plasma Table
Hi John,
Encoder signals do not have any 4us requirement. They are basically A/B square waves not pulses. The max count rate for the encoder inputs are specified at 1 million quadrature transitions/second (250KHz cycles for both A and B). The encoder signals are sampled at 16.67MHz and pass through a programmable digital filter to eliminate noise glitches. The default level of filtering is 7 which means the A/B levels must be continuously stable (high or low) for 7/16.67 = 0.42us to be considered a valid transition. The range for the digital filtering is from 1 - 255.
HTH
Regards
-
2 Attachment(s)
Re: Plasma Table
Tom
Will this work as an interface between the THCad and the KFLOP encoder inputs? It is based on parts on hand from junk collection. The simulation plot is for the maximum frequency output of the THCad.
Attachment 292040
Attachment 292042
John
-
Re: Plasma Table
Hi John,
I think that is a great idea and will allow the full 1MHz rate of the THCad. But I think your logic is wrong so you are not getting quadrature.
To convert a 2-bit counter to A/B Quadrature I think the simplest way is with an Exclusive OR gate.
A = MSB
B = MSB ^ LSB
Code:
MSB LSB A B
---------------
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
HTH
Regards
-
2 Attachment(s)
Re: Plasma Table
Tom
Ok, my bad, I've only used an encoder with counters that looked at the leading edge of the pulse train and didn't care about the duty cycle before. Here is the corrected circuit with a symmetrical 50% offset output. I don't have any LS86s in my junk box but lots of LS00s.
Attachment 292096
Attachment 292094
Sorry about the poor quality of the spice picture, I'm not a graphics wiz.
One thing this has gotten me thinking is keeping high resolution in the arc voltage measurement. There are actually two regions I need to work in. Most of my work is at 45A with Finecut consumables which use an arc voltage between 60 and 80 volts. The other is when cutting thicker material using normal mechanized consumables at 45A to 85A which is an arc voltage between 110 and 160 volts. I am thinking that a dual range system might be good here with the range selected by a radio button or check box in the THC setup tab (I will need to create this) on the GUI. Of course this will require separate gains and scaling factors for each range that should auto load on selection. Is this possible with out too much trouble? The change will only be before starting to run a G code file.
John
-
Re: Plasma Table
Hi John,
Looks good. I don't see any problem with selecting different Ranges. The PID gains or C Program parameters can always be changed as required. To Test you might use two User Buttons to change whatever is required.
Regards
-
1 Attachment(s)
Re: Plasma Table
Hello All
Moving forward I developed a preliminary requirements document for the new plasma table controller I need. The main feature of this is to have a Torch Height Control integrated with the rest of the machine control. I only cut thin carbon and stainless steel, 14ga typically, and most lower cost solutions that you purchase off the shelf have poor performance with this thin material. This is why I want to refit the existing hardware I have. My present setup will move fast enough, >300ipm, with barely acceptable acceleration 20ips^2 so I am not keen to replace the drives. I am hope to find someone to collaborate with or mentor me in modifying KmotionCNC to be good plasma table control. This should provide a wealth of material for the proposed KFLOP wiki.
John