Solved : THCAD with toma_thc config help needed
- tommylight
-
Topic Author
- Away
- Moderator
-
Less
More
- Posts: 20256
- Thank you received: 6890
11 Feb 2019 22:29 - 15 Feb 2019 00:29 #126224
by tommylight
Solved : THCAD with toma_thc config help needed was created 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
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
Last edit: 15 Feb 2019 00:29 by tommylight. Reason: marked as solved
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
- Grotius
-
- Offline
- Platinum Member
-
Less
More
- Posts: 2408
- Thank you received: 2320
11 Feb 2019 22:36 #126225
by Grotius
Replied by Grotius on topic THCAD with toma_thc config help needed
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?
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
-
Topic Author
- Away
- Moderator
-
Less
More
- Posts: 20256
- Thank you received: 6890
11 Feb 2019 22:47 #126228
by tommylight
Replied by tommylight on topic THCAD with toma_thc config help needed
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.
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 or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
Less
More
- Posts: 5723
- Thank you received: 2095
12 Feb 2019 01:33 #126239
by phillc54
The following component may do what you want.
Cheers, Phill.
Replied by phillc54 on topic THCAD with toma_thc config help needed
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.
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.
The following user(s) said Thank You: tommylight, rodw
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11256
- Thank you received: 3760
12 Feb 2019 02:25 - 12 Feb 2019 02:28 #126241
by rodw
Replied by rodw on topic THCAD with toma_thc config help needed
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
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
Last edit: 12 Feb 2019 02:28 by rodw.
The following user(s) said Thank You: phillc54, tommylight
Please Log in or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
Less
More
- Posts: 5723
- Thank you received: 2095
12 Feb 2019 04:06 - 12 Feb 2019 07:06 #126247
by phillc54
Replied by phillc54 on topic THCAD with toma_thc config help needed
To use existing components this may work, it seemed ok just playing around in a halrun session.
Cheers, Phill.
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.
Last edit: 12 Feb 2019 07:06 by phillc54.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
-
Topic Author
- Away
- Moderator
-
Less
More
- Posts: 20256
- Thank you received: 6890
12 Feb 2019 17:52 #126288
by tommylight
Replied by tommylight on topic THCAD with toma_thc config help needed
I have a THCAD300.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 or Create an account to join the conversation.
- Grotius
-
- Offline
- Platinum Member
-
Less
More
- Posts: 2408
- Thank you received: 2320
12 Feb 2019 22:53 #126301
by Grotius
Replied by Grotius on topic THCAD with toma_thc config help needed
@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 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....
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
Less
More
- Posts: 5723
- Thank you received: 2095
12 Feb 2019 23:41 #126306
by phillc54
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.
Replied by phillc54 on topic THCAD with toma_thc config help needed
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 or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
Less
More
- Posts: 5723
- Thank you received: 2095
12 Feb 2019 23:47 #126307
by phillc54
I like a scale when it does what I need it to do.
I have no interest in Ethercat.
Cheers, Phill.
Replied by phillc54 on topic THCAD with toma_thc config help needed
@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 or Create an account to join the conversation.
Time to create page: 0.075 seconds