Another THC approach

More
09 Apr 2016 20:58 - 10 Apr 2016 09:19 #73012 by kagouraki
Hello,

I am new to linuxcnc and i am about to build a plasma and i want to have thc.

My approach is that i have a parport and gmoccapy plasma gui. I have an arduino for reading the analog voltage from the powermax 45. It has a voltage divider. The software for the arduino is this : link .
It can read the analog voltage.

The problem is in the thc compoment. I have modified it to work with direct voltage read and not converting it from the mesa frequency.
i attach the modified thc.comp.

in my main hal file i have made the following connections :
loadrt stalThc
setp stalThc.velocity-tol 30
setp stalThc.correction-vel 0.01
net zpos-cmd axis.2.motor-pos-cmd => stalThc.z-pos-in
net curvel motion.current-vel => stalThc.current-vel
net reqvel motion.requested-vel => stalThc.requested-vel
net zposout stalThc.z-pos-out => stepgen.2.position-cmd
net zfbout stalThc.z-fb-out => axis.2.motor-pos-fb

in my plasma.hal file i have :
net spindleison motion.spindle-on => signals.led-torch-on => stalThc.torch-on
net curvolt arduino.analog-in-01 => plasma.hal-lbl-cur-volt => stalThc.volts
net setvolt plasma.Target-Voltage => stalThc.volts-requested
net arcOk arduino.digital-in-08 => signals.led-arc-ok => motion.spindle-at-speed => stalThc.arc-ok
net thcenable plasma.hal-btn-THC => stalThc.enable
net curentoffs stalThc.offset-value => plasma.hal-lbl-corr

i get "cannot unhome while moving, Axis Z" and "Axis Z following error" error messages when trying to jog the z axis. i think the problem is in this two lines
net zposout stalThc.z-pos-out => stepgen.2.position-cmd
net zfbout stalThc.z-fb-out => axis.2.motor-pos-fb

any help is appreciated !
Giorgos

EDIT : i had to add addf stalThc servo-thread after the loadrt stalThc in the main .hal file.

these are the results of been on the computer from 08.00 in the morning until late at night...
Attachments:
Last edit: 10 Apr 2016 09:19 by kagouraki. Reason: found the problem

Please Log in or Create an account to join the conversation.

More
10 Apr 2016 10:41 #73041 by mariusl
Replied by mariusl on topic Another THC approach
The Z axis must have no homing or limits. You set that in the INI file. When the machine is in manual mode, you should pass the cmd and feedback straight through and there should be no following error if your stepgen acceleration has a setting of at least twice the max acceleration of your Z axis.
The offset of the feedback is catered for in the component already so there should be no issue there. However if there is just a minute difference in the calculated feedback and the expected feedback then this will happen. When using a stepper the feedback is calculated in the stepgen. You should not have to fiddle the feedback. The feedback must just be accumulated and then returned to the start cmd and feedback. Remember the Z axis has not moved a single tick as far as the system is concerned. That is why you have to return the setting to the original when you give control back to the system.

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

More
10 Apr 2016 10:45 #73042 by mariusl
Replied by mariusl on topic Another THC approach
I just looked at what you are using for THC. That solution is not reliable with plasma at all. The USB will constantly be dropped and cannot reconnect unless it is unplugged and linuxcnc is restarted.
Stay away from USB and plasma unless you go through a galvanically isolated USB driver.
I tried that solution for a long time and from all sides. Take my advise here.

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

More
10 Apr 2016 10:51 #73043 by kagouraki
Replied by kagouraki on topic Another THC approach

a galvanically isolated USB driver


what is this ? i have no other option. The budget is limited and i need a cheap solution for reading the analog input from the powemax 45

Thank you very much for your help Marius !

Giorgos

Please Log in or Create an account to join the conversation.

More
10 Apr 2016 12:20 #73045 by BigJohnT
Replied by BigJohnT on topic Another THC approach

a galvanically isolated USB driver


what is this ? i have no other option. The budget is limited and i need a cheap solution for reading the analog input from the powemax 45

Thank you very much for your help Marius !

Giorgos


One of these will work and very cost effective.
mesaus.com/index.php?route=product/category&path=65

JT

Please Log in or Create an account to join the conversation.

More
10 Apr 2016 12:28 #73046 by kagouraki
Replied by kagouraki on topic Another THC approach


One of these will work and very cost effective.
mesaus.com/index.php?route=product/category&path=65

JT


it is difficult to order from international. i cant send money outside of Greece. We have capital controls here as you probably know.
i will build a faraday cage around the controller box and the plasma machine will be in the other side of the table so 2.5 meters away. i will try and post the results ! Thank you.
Giorgos

Please Log in or Create an account to join the conversation.

More
10 Apr 2016 14:44 - 10 Apr 2016 14:46 #73052 by mariusl
Replied by mariusl on topic Another THC approach
It not radiated interference but rather earth or ground loop interference. The plasma flame has a negative to earth voltage and causes huge interference. Most USB ports will not tolerate any ground or power noise. The controllers actually protect themselves and switch off. Linuxcnc does not handle "hot plug-able" devices as the drivers are loaded at startup or run time. Once it has dropped out the kernel can not use it again.

I understand that you need a cheap solution but this is NO solution. Sorry to say. :(

There is a component from Linear Technologies - LTM2884Y. It is a micro module that will give you isolated USB.

P.S. Galvanically isolated means - electrically isolated.

Regards
Marius


www.bluearccnc.com

Last edit: 10 Apr 2016 14:46 by mariusl.

Please Log in or Create an account to join the conversation.

More
13 Apr 2016 19:56 #73246 by kagouraki
Replied by kagouraki on topic Another THC approach
Marius will this disconnection hapen even if i make the arduini talk to the pc via ethernet ?

Please Log in or Create an account to join the conversation.

More
15 Apr 2016 06:18 - 15 Apr 2016 06:20 #73332 by mariusl
Replied by mariusl on topic Another THC approach
It will not disconnect but Ethernet has its own problems. I have another topic somewhere on this forum that has code examples of a very fast UDP message system using the ARDUINO. It works well but is unpredictable as the UDP component runs in user space. I can get message through in 1ms but sometimes it has a delay of several seconds. I did this Ethernet test in order to try and get a better solution for the USB problems but I gave that up as well as it was not reliable from a timing point of view. You do not drop any messages but they get queued. So when they eventually get executed the condition of the plasma has changed again and the command is no longer valid. It makes a huge mess of things if the required action is note xecuted at the right time.

The most cost effective way to do a THC is to use a filter and a window comparator circuit. Use a PWM signal from one of the par port pins to generate an analog signal that you can use to compare to for the voltage level.

OR:
If you want to use the Ethernet solution do this:

Send the requested voltage levels with UDP and use your Arduino to measure the actual voltage after you have filtered it and then let the Arduino generate UP/DOWN signals that you can read from the par port.

Regards
Marius


www.bluearccnc.com

Last edit: 15 Apr 2016 06:20 by mariusl.

Please Log in or Create an account to join the conversation.

More
15 Apr 2016 06:24 #73333 by mariusl
Replied by mariusl on topic Another THC approach
Have a look here on the FORUM

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum