Plasma THC Corner Lock

More
10 years 1 month ago #80723 by EW_CNC
Hi,
On my CNC Plasma I am using THC componant to control my torch height.
I would like more control of my corner lock velocity adjustment.
I can go in my hal file and change the parameter, setp thc.velocity-tol 80, but I would like to be able to change it on my PYVCP panel.
Is the hal pin, (thc.vel-tol float in) the connection that will let me make those adjustments?
If so I need help to connect it with my pyvcp panel.

Please Log in to join the conversation.

More
10 years 1 month ago #80982 by Rick G
Replied by Rick G on topic Plasma THC Corner Lock
It looks like you have several pyvcp pins commented out (#) in the postgui.hal file and some missing...
What panel are you using? Does it have the slider for vel tolerence?
Have you looked at the sample thc configs?
Code:
#net thc-volts-tol pyvcp.volts-tolerance

Might want to look here...
gnipsel.com/shop/plasma/plasma.xhtml

Rick G

Please Log in to join the conversation.

More
10 years 3 weeks ago #81194 by EW_CNC
Replied by EW_CNC on topic Plasma THC Corner Lock
Thanks Rick!
I am using the same xml panel as gnipsel.com.
I uncommented #net thc-volts-tol pyvcp.volts-tolerance, it did not make a differance.
I can not get the vel- tolerance spinbox to work. I can only make changes by changing the parameter, setp thc.velocity-tol.
Could I have a velocity scale adjustment wrong? I would like to be able to set at what inches per minute the corner lock sets in.
Should I be using THC.comp or THCUD.comp?
I am just learning CNC so I may be missing something simple.

Please Log in to join the conversation.

More
10 years 3 weeks ago #81206 by Rick G
Replied by Rick G on topic Plasma THC Corner Lock
I assume you are using the Mesa THCAD.
Not sure what version of linuxcnc you are using but there was a bug on the spinbox in the past that if you entered the number directly it did not work properly, but if you used the up and down arrows it would work.
When you make a change with setp thc.velocity-tol what numbers are you using and what results are you getting?
I believe the thc.velocity-tol is a percentage not an inch per minute.

thc.velocity-tol float rw

The deviation percent from planned velocity

linuxcnc.org/docs/2.5/html/man/man9/thc.9.html

It also appears that there have been different versions of the THC over the years.

Can you confirm that the corner lock is working when you use edit with setp? Does the velocity led go on and off?

Rick G

Please Log in to join the conversation.

More
10 years 3 weeks ago #81252 by EW_CNC
Replied by EW_CNC on topic Plasma THC Corner Lock
Yes, I am using the Mesa THCAD on Axis 2.7.7.
I am aware of the bug with the spinbox numbers, as my volts setting works that way.
I just noticed that the velocity statis LED seems to be linked with the feed overide % slider rather than with the Vel. on axis display.
I usually have my G code feed at 100 IPM and make speed adjustments with the feed overide slider.
When I change setp thc.velocity-tol to 80 and the feed overide slider to below 20% the LED will be off, if it's above 20% it will be on.
If setp thc.velocity-tol is set at 90 feed overide slider adjusts at 10% etc.
If G code is 100 IPM and velocity display at 20 with overide slider at 21 or greater, LED is on.
If G code is 75 IPM and velocity display at 15 with overide slider at 20 or greater, LED is on.

Please Log in to join the conversation.

More
10 years 3 weeks ago #81266 by Rick G
Replied by Rick G on topic Plasma THC Corner Lock
O.K.

When I change setp thc.velocity-tol to 80 and the feed overide slider to below 20% the LED will be off, if it's above 20% it will be on.

Well that at least shows it is working.
The velocity that is set by G code is the velocity the THC uses as reference. So if you use the feed override slider to change speed you might force the THC off. Which is a good test but not something you would want to do while cutting if you want to take advantage of the corner lock and the THC.
I have to leave, but will leave more info tomorrow.

Rick G

Please Log in to join the conversation.

More
10 years 3 weeks ago #81292 by Rick G
Replied by Rick G on topic Plasma THC Corner Lock
In your panel the spinbox for velocity tolerance is
Code:
<spinbox> <width>"5"</width> <halpin>"vel-tol"</halpin> <min_>.01</min_> <max_>1</max_> <resolution>0.01</resolution> <initval>0.2</initval> <format>"1.2f"</format> <font>("Arial",10)</font>
Which means you have a min of .01 a maximum of 1 and default of .2
I believe the version of THC that you are using is looking for a percent tolerance of the velocity in the range of 1 to 100, not .01 to 1.
Code:
component thc "Torch Height Control"; description """ Torch Height Control Mesa THC > Encoder > LinuxCNC THC component The Mesa THC sends a frequency based on the voltage detected to the encoder. The velocity from the encoder is converted to volts with the velocity scale parameter inside the THC component. The THCAD card sends a frequency at 0 volts so the scale offset parameter is used to zero the calculated voltage. Component Functions If enabled and torch is on and X + Y velocity is within tolerance of set speed allow the THC to offset the Z axis as needed to maintain voltage. If enabled and torch is off and the Z axis is moving up remove any correction at a rate not to exceed the rate of movement of the Z axis. If enabled and torch is off and there is no correction pass the Z position and feed back untouched. If not enabled pass the Z position and feed back untouched. Physical Connections .br Plasma Torch Arc Voltage Signal => 6 x 487k 1% resistors => THC Arc Voltage In .br THC Frequency Signal => Encoder #0, pin A (Input) .br Plasma Torch Arc OK Signal => input pin .br output pin => Plasma Torch Start Arc Contacts HAL Plasma Connections .br encoder.nn.velocity => thc.encoder-vel (tip voltage) .br motion.spindle-on => output pin (start the arc) .br thc.arc-ok <= motion.digital-in-00 <= input pin (arc ok signal) HAL Motion Connections .br thc.requested-vel <= motion.requested-vel .br thc.current-vel <= motion.current-vel """; author "John Thornton"; license "GPLv2 or greater"; option singleton yes; // Input Pins pin in float encoder_vel "Connect to hm2_5i20.0.encoder.00.velocity"; pin in float current_vel "Connect to motion.current-vel"; pin in float requested_vel "Connect to motion.requested-vel"; pin in float volts_requested "Tip Volts current_vel >= min_velocity requested"; pin in float vel_tol "Velocity Tolerance (Corner Lock)"; pin in bit torch_on "Connect to motion.spindle-on"; pin in bit arc_ok "Arc OK from Plasma Torch"; pin in bit enable "Enable the THC, if not enabled Z position is passed through"; pin in float z_pos_in "Z Motor Position Command in from axis.n.motor-pos-cmd"; // Output Pins pin out float z_pos_out "Z Motor Position Command Out"; pin out float z_fb_out "Z Position Feedback to Axis"; pin out float volts "The Calculated Volts"; pin out bit vel_status "When the THC thinks we are at requested speed"; pin out float offset_value "The Current Offset"; // Parameters param rw float vel_scale "The scale to convert the Velocity signal to Volts"; param rw float scale_offset "The offset of the velocity input at 0 volts"; param rw float velocity_tol "The deviation percent from planned velocity"; param rw float voltage_tol "The deviation of Tip Voltage before correction takes place"; param rw float correction_vel "The amount of change in user units per period to move Z to correct"; // Global Variables variable float offset; variable float last_z_in; function _; ;; #include "rtapi_math.h" FUNCTION(_) { // convert encoder velocity to volts volts = (encoder_vel - scale_offset) * vel_scale; if(volts < 0){volts = 0;} // make sure volts is not negative offset_value = offset; if(enable){ float min_velocity = requested_vel -(requested_vel*(velocity_tol*0.01)); if(current_vel > 0 && current_vel >= min_velocity){vel_status = 1;} else {vel_status =0;} if(torch_on && arc_ok && vel_status){ // allow correction if((volts + voltage_tol) > volts_requested){ offset -= correction_vel; } if((volts - voltage_tol) < volts_requested){ offset += correction_vel; } last_z_in = 0; } if(!torch_on){ // remove any offset float z_diff; z_diff = z_pos_in - last_z_in; if(z_diff > 0 && offset != 0){ // torch is moving up if(offset > 0){ // positive offset if(offset > z_diff){ // remove some offset -= z_diff; } else {offset = 0;} } if(offset < 0){ // negative offset if(offset < z_diff){ // remove some offset += z_diff; } else {offset = 0;} } } last_z_in = z_pos_in; } z_pos_out = z_pos_in + offset; z_fb_out = z_pos_in; // keep axis motor position fb from being confused } if(!enable){ z_pos_out = z_pos_in; z_fb_out = z_pos_in; // keep axis motor position fb from being confused } }

That is to say if you set your speed at 100 with your g code and you set your tolerance at 20 any speed above 80 the THC will work. However your spinbox range does not allow that range.
Try changing the spinbox range to say 1 to 100, a default of 20 and perhaps a resolution of 1.
And comment out any setp you may have for velocity.

Rick G

Please Log in to join the conversation.

More
10 years 2 weeks ago #81520 by EW_CNC
Replied by EW_CNC on topic Plasma THC Corner Lock
Ok, I made those changes, but did not seem to get a response from the velocity tolerance adjustment.
I watched hal pin motion.current-vel and noticed that it is not showing the same velocity reading as the axis display velocity, which is equal with the actual movement of the machine.
While cutting at G code F15, feed overide at 100%. It showed a motion.current-vel reading of .25.
With G code feed at 100 IPM motion.current-vel showed 1.6667.
Why do I get the two differant velocity readings?

Please Log in to join the conversation.

More
10 years 2 weeks ago #81521 by Rick G
Replied by Rick G on topic Plasma THC Corner Lock
G code is in inch per minute
motion.current-vel is in inch per second

So F15 / 60 = .25
Rick G

Please Log in to join the conversation.

More
10 years 2 weeks ago #81522 by PCW
Replied by PCW on topic Plasma THC Corner Lock
Because the motion.currrent-vel pin is scaled in machine units per second, not machine units per minute

Please Log in to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum