Another plasma component...

More
01 Feb 2019 08:14 - 01 Feb 2019 08:20 #125456 by rodw
Replied by rodw on topic Another plasma component...
I'm looking forward to seeing what Tommy achieves with this.

I spent a bit of time today working on the component I use for scaling the voltage from the THCAD. It already has a lowpass filter built into it and now I'm working on a moving average of the arc volts from 3-1000 consecutive readings. Comparing the dv/dt between the current period and the moving average should allow us to sense if the torch crosses into a void.

For Phil's benefit, this is the moving average code which receives torch volts, arcOK and buffer size as parameters. I've had this working but have changed it so we can define the number of readings to average which are read into a fixed buffer so it might need a bit of cleaning up yet. I did not want to use any dynamically allocated memory which is how I'd normally write something like this.

We do some fancy pointer footwork to calculate the total and average without resorting to any for loops
Warning: Spoiler! [ Click to expand ]
Last edit: 01 Feb 2019 08:20 by rodw.
The following user(s) said Thank You: phillc54
More
01 Feb 2019 12:07 #125458 by andypugh
Whilst your method will return a true moving-average it is often sufficient just to use
(for a notional 10 point average)
new = 0.9 * old + 0.1 * latest

Or, for variable gain:
new = (1 - G) * old + (G) * latest
The following user(s) said Thank You: rodw
More
01 Feb 2019 12:50 #125459 by rodw
Replied by rodw on topic Another plasma component...

andypugh wrote: Whilst your method will return a true moving-average it is often sufficient just to use
(for a notional 10 point average)
new = 0.9 * old + 0.1 * latest

Or, for variable gain:
new = (1 - G) * old + (G) * latest

Andy, thanks for shooting down my cool non-looping algorithm down in flames with a single line of code :)
I'm not really sure if plasma is an application I'd like to use approximations. There are a number of places I would like to use this. It would be fine for sampling the voltage to establish the command signal for PID control (Currently I only take a single point reading).
But now I have the technique, there are other signal processing techniques mentioned in the literature that I may extend the algorithm to include. But one step at a time.
More
07 Feb 2019 00:39 #125897 by phillc54
I have been unable to have access to my workshop since late December so have not made any more progress on my table. I have completed the structure, the water tray/storage which is pneumatically controlled and all the axes (which are working from a test setup). All I have left to do is build the control box and connect it all together then I will finally be ready for testing. I am not sure when I will be able to get back to it.
In the meantime I have been playing around with QtVCP which has recently been pushed to master branch and it looks really promising for the construction of custom GUI's.
I have now included a sample QtVCP GUI (which is still very much a work in progress and incomplete) in the repo. It can be found in sim/qtvcp_screens/plasmac.

Cheers, Phill
The following user(s) said Thank You: tommylight, rodw
More
08 Feb 2019 21:56 #126019 by sevaz
Replied by sevaz on topic Another plasma component...
Thank you! It turned out the problem was in the sim settings and especially in the homing configuration. Now everything works perfectly fine.
More
10 Feb 2019 02:05 #126116 by tommylight
Why change the thread name ? Just spent 15 minutes looking for it, started thinking my brain got fried and messed up !! :)
Managed to get the toma_thc config to work with Mesa boards, uploaded it to the original post at
forum.linuxcnc.org/plasma-laser/34978-th...-with-how-to?start=0

Hopefully will have some more time to give your config a good run over and test it on some actual hardware.
Regards
Tom
The following user(s) said Thank You: phillc54, sevaz
More
10 Feb 2019 02:09 #126117 by rodw
Replied by rodw on topic Another plasma component...
Tommy, I think a user changed the thread name. Lets see if this post changes it back! And yes, I found it really annoying too!
The following user(s) said Thank You: phillc54, tommylight
More
10 Feb 2019 02:19 #126118 by phillc54

tommylight wrote:
Why change the thread name ?

rodw wrote:
Tommy, I think a user changed the thread name. Lets see if this post changes it back! And yes, I found it really annoying too


Thanks guys, I didn't notice that, nor did I know it could be done...

Cheers, Phill.
More
10 Feb 2019 03:02 - 10 Feb 2019 03:03 #126121 by rodw
Replied by rodw on topic Another plasma component...

phillc54 wrote: [
Thanks guys, I didn't notice that, nor did I know it could be done...

Cheers, Phill.


And you changed it again!

EDIT. When I posted, it went back to "hights problem" so I edited the title in this post.
Last edit: 10 Feb 2019 03:03 by rodw.
The following user(s) said Thank You: phillc54, sevaz
More
10 Feb 2019 12:56 #126144 by tommylight
It's been stable for the last half hour ! YAY !
I was just a bit worried that my sanity went out of the window after several hours in front of 4 monitors ! :)
The following user(s) said Thank You: rodw
Time to create page: 0.121 seconds
Powered by Kunena Forum