Solved : THCAD with toma_thc config help needed

More
7 years 8 months ago #126224 by tommylight
Due to time constraints i had to resign from the managing position at the factory i was working on, so i spent last week trying to get as much done as possible regarding Linuxcnc while i can spare some time.
On to the subject at hand:
Anyone willing to do a hal implementation that takes the arc voltage from THCAD and outputs the Up/Down signals for correction referenced by the set voltage?
That would be awesomely nice to implement with the existing THC hal implementation, as it has proven to be very reliable and very easy to use, on several machines for 5 years, give or take. It's only drawback is that it is made for simple THC's that output Up/Down/ArcOk signals like Proma THC150 and some other types with the same output configuration, so not usable for THCAD.
Already uploaded the said config for Mesa stepper cards so it should work with 5i25/6i25, 7i92, 7i96, 7i76 and 7i76E.
Also working on a full servo controlled config, finished as far as i could test on the bedroom table setup with 6i25/7i77, needs more testing on actual hardware due to encoder feedback, and how it behaves while the hal has control of the Z axis.
The config uses AXIS as GUI and PyVCP to control cutting parameters so it would require only adding the actual voltage display and provisions for setting the cut voltage.
Also i wonder why there is no effort on using the spindle PID to output corrections to Z axis for THC, or am i missing something ? I might as well be missing something, very little sleep and to much chasing code through multiple hal files lately !
Thanks in advance,
Tom

Please Log in to join the conversation.

More
7 years 8 months ago #126225 by Grotius
Tom, implementing divided voltage instead of up or down signal looks quite easy. Do you mean this. And is it for axis gui or only hal pins?

Please Log in to join the conversation.

More
7 years 8 months ago #126228 by tommylight
And i thought i was going to bed.......oh well.
PyVCP i can do easily, so i would need hal provisions for taking the actual voltage and the preset voltage, compare them and depending on the result issue an Up or Down pin that i could add to the existing config.
Of course the actual voltage should be encoder counter for the THCAD output frequency.

Please Log in to join the conversation.

More
7 years 8 months ago #126239 by phillc54

tommylight wrote: Anyone willing to do a hal implementation that takes the arc voltage from THCAD and outputs the Up/Down signals for correction referenced by the set voltage?


The following component may do what you want.
Code:
component torchud "Torch Up Down"; description """ torch up down by voltage calculated from encoder velocity """; license "GPLv2 or greater"; option singleton yes; // Input Pins pin in bit enable "enable up/down"; pin in float encoder_in "connect to encoder.nn.velocity"; pin in float voltage_offset "to set 0 volts"; pin in float voltage_scale "to set correct voltage"; pin in float setpoint "setpoint voltage"; pin in float tolerance "deviation from setpoint before up/down"; // Output Pins pin out float arc_voltage "calculated arc voltage"; pin out bit move_up "arc voltage is too low"; pin out bit move_down "arc voltage is too high"; function _; ;; #include "rtapi_math.h" FUNCTION(_) { arc_voltage = (encoder_in - voltage_offset) * voltage_scale; if(arc_voltage < 0){arc_voltage = 0;} if(enable && arc_voltage > setpoint + tolerance){ move_down = 1; }else if(enable && arc_voltage < setpoint - tolerance){ move_up = 1; }else{ move_down = 0; move_up =0; } }

Cheers, Phill.

Please Log in to join the conversation.

More
7 years 8 months ago #126241 by rodw
Very nice Phil. I was actually thinking about trying something similar myself.

EDIT: But I think that the formulas only work for the THCAD300 as its not scaled back to to arc volts from the 0-10 volt full scale reading

Please Log in to join the conversation.

More
7 years 8 months ago #126247 by phillc54
To use existing components this may work, it seemed ok just playing around in a halrun session.

Code:
loadrt sum2 names=maxv,minv loadrt scale names=arcvolts loadrt wcomp names=window addf maxv servo addf minv servo addf arcvolts servo addf window servo # SET PARAMETERS setp minv.gain1 -1 setp arcvolts.offset N (value to set arcvolts.out to 0 at 0 Volts) setp arcvolts.gain N (value to set arcvolts.out to correct Volts) # NETS net max_net maxv.out window.max net min_net minv.out window.min net volt_net arcvolts.out window.in # INPUTS net in arcvolts.in (from encoder out) net setpoint maxv.in0 minv.in0 (required arc voltage) net tolerance maxv.in1 minv.in1 # OUTPUTS net move_up window.under net move_down window.over

Cheers, Phill.

Please Log in to join the conversation.

More
7 years 8 months ago #126288 by tommylight

rodw wrote: EDIT: But I think that the formulas only work for the THCAD300 as its not scaled back to to arc volts from the 0-10 volt full scale reading

I have a THCAD300. :)

Please Log in to join the conversation.

More
7 years 8 months ago #126301 by Grotius
@Phill,

I don't like the voltage scale value, it's also undefined, is it in kw?

For new linux users we have to be clear in our future components, we have to do something like this :

Max_raw_arc = 380 "the maximum voltage the plasma source is given when torch is super high and at max power";
Voltage_divider 1 to = 50 "voltage divider ratio, dip switch inside inverter, see manual inverter";
Analog_input_0_10v = 7.7 "maximum value user has ever seen on his plasma with maximum power";

Phill, you see the above settings. I like this more then a scale value. The THC.comp and THCad.comp are very old component's,
at that time Linux Ethercat did not exist.

So i hope only one thing. Be powerfull in your component's. LET LINUX RULE. Let new user's understand it....

Please Log in to join the conversation.

More
7 years 8 months ago #126306 by phillc54

rodw wrote: EDIT: But I think that the formulas only work for the THCAD300 as its not scaled back to to arc volts from the 0-10 volt full scale reading


I don't understand why that would be the case. I assume that encoder output velocity is linear then it is scaled to the appropriate value.
Am I missing something?

Cheers, Phill.

Please Log in to join the conversation.

More
7 years 8 months ago #126307 by phillc54

Grotius wrote: @Phill,

I don't like the voltage scale value, it's also undefined, is it in kw?

For new linux users we have to be clear in our future components, we have to do something like this :

Max_raw_arc = 380 "the maximum voltage the plasma source is given when torch is super high and at max power";
Voltage_divider 1 to = 50 "voltage divider ratio, dip switch inside inverter, see manual inverter";
Analog_input_0_10v = 7.7 "maximum value user has ever seen on his plasma with maximum power";

Phill, you see the above settings. I like this more then a scale value. The THC.comp and THCad.comp are very old component's,
at that time Linux Ethercat did not exist.

So i hope only one thing. Be powerfull in your component's. LET LINUX RULE. Let new user's understand it....


I like a scale when it does what I need it to do.
I have no interest in Ethercat.

Cheers, Phill.

Please Log in to join the conversation.

Time to create page: 0.118 seconds
Powered by Kunena Forum