7i76E + THCad 10V

More
11 Mar 2016 04:47 #71376 by islander261
7i76E + THCad 10V was created by islander261
I am using the named combination for controlling a plasma cutter. The time has come to build the hardware to interface the THCad to the plasma cutter. In reading the documentation I can find it is not clear how the THCad interacts with the 7i76E firmware. I intended to read the the THCad with the encoder velocity function. This is read at the servo thread rate if I understand the THC.comp source correctly. When read at this rate it appears that I am sacrificing significant resolution ( yes I know the velocity is a float but the raw counts are limited to the integration period) sampling at this rate. Do I need to have an additional period to sample at 4ms? I plan on externally scaling the the THCad input to give a full scale range of 200V. With my torch and power supply the operational arc voltage is between 70V and 150V with most of my work being around 80V. Now what frequency cutoff filter do I need to insure no aliasing when reading the arc voltage? As we all know the arc voltage is very noisy with significant peaks at the inverter switching frequency plus the arc noise. I understand from the manual what I need to do if using something other than the canned solution and sampling at 4ms gate time but I don't know what is happening inside the FPGA combined with the hostmot2 software. To get good cutting performance I need to hold the physical torch height to much better than +/- .005" of the correct height (.060"). So what is the cutoff frequency and roll off I need for my external interface? The mechanics will be a 200 step per revolution stepper motor coupled to a 5mm per revolution ball screw. The stepper drive is a G540 with 10X microstepping.

John

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

More
11 Mar 2016 13:21 #71395 by andypugh
Replied by andypugh on topic 7i76E + THCad 10V

I intended to read the the THCad with the encoder velocity function. This is read at the servo thread rate if I understand the THC.comp source correctly. When read at this rate it appears that I am sacrificing significant resolution ( yes I know the velocity is a float but the raw counts are limited to the integration period) sampling at this rate


Using the encoder counter on the 7i76 the encoder pulses are sampled with MHz resolution by the FPGA.
I don't think you need to worry about the sample bandwidth.

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

More
11 Mar 2016 15:20 #71411 by PCW
Replied by PCW on topic 7i76E + THCad 10V
Yes, the velocity estimate resolution does not directly depend on the number of counts per sample (so you can use the divided by 128 frequency output of the THCAD and get the same resolution at 1 ms sampling frequency as you do with the divide by one mode)

The resolution will be roughly 10 bits at 1 ms. There is really no advantage of getting more resolution than this since the noise , HF and 120Hz ripple are magnitudes larger and lower voltage sensing bandwidth compromises height following loop bandwidth

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

More
11 Mar 2016 17:04 #71435 by islander261
Replied by islander261 on topic 7i76E + THCad 10V
Ok, I maybe over thinking this. So someone please tell me where I am going wrong here. I agree that measuring the arc voltage to true 10 bits resolution is most likely good enough as this gives an effective resolution of about .195V. The THCad manual gives the approximate output range of 100khz to 900khz with the exact calibration marked on each card, it is on mine. The arc voltage that I do most of my work at is 80V (.070" height, 220ipm torch speed, 14ga hot rolled carbon steel). I will need a 20:1 voltage divider on the input of the THCad to extend it's input range to 200V full scale. This has the THCad seeing an input voltage of about 4V. So if my math is correct the approximate voltage to frequency transfer function is frequency = (( 800000/10)*V)+100000, which should yield an approximate frequency of 420,000hz for a 4V input. 1/420,000 = 2.381us (rounded) period. So to measure this frequency with one part in 1024 (10bit resolution) the gate time will need to be at least 1024 X 2.381us = 2.438ms. I realize that measuring the period of each cycle to a high resolution is possible but I recall that the synchronous converter used on the THCad has a high cycle to cycle jitter and must be integrated over many cycles to get good accuracy.

All of this is why I was asking if anyone can point me to the documentation that explains the counting of the encoder inputs on the 7i76E and the how this data is used in the encoder.velocity function in the hostmot2 library?

The THC.comp function is run at the servo rate of 1khz in the examples I have found. This indicates to me that the voltage measurement resolution is only about 1 in 420 parts or just under 9bits. Is this good enough voltage resolution to to get good torch height control ( torch height held within +/- .005" at .06" or +/- .00166" at .02" for stainless steel)? I don't know. I am guessing that the input filter to the THCad must be at least 6db down at 1khz to prevent aliasing? Is anyone willing to share the calculations that support running the THC component at 1khz rate? I know the gurus at Hypertherm claim that the torch height servo needs to run at greater than 25hz to get good enough height control. The bottom line for me isn't what is text book correct but dross free cuts (like the Hypertherm rep shows) without the torch diving into the material on corners and arcs. I just want to build my hardware close enough so that it is in the range of software filtering/tweaking.

John

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

More
11 Mar 2016 17:11 #71436 by andypugh
Replied by andypugh on topic 7i76E + THCad 10V
I don't understand why you think that the speed of the servo thread has an effect on the resolution of the encoder rate numbers passed on by the FPGA?

The FPGA time-stamps every encoder edge with a high resolution timer and uses this data (and how many edges have been seen in total) to update an internal encoder-velocity register. Every servo thread the Hostmot2 driver in LinuxCNC asks for the most recent value, and it is transferred digitally to HAL.

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

More
11 Mar 2016 17:27 #71439 by islander261
Replied by islander261 on topic 7i76E + THCad 10V
I am having to guess about how the encoder.velocity function works on the 7i76E. I haven't found any documents that explains it yet! I was thinking that the 7i76E reported the encoder velocity by approximately: encoder velocity = edge counts/ ( time now - time last report). So this will make the sample period approximately the servo period if that is how often the encoder velocity is requested. Are there any publicly available documents that explain how the encoder velocity function works on the 7i76/7i76E cards?

John

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

More
11 Mar 2016 18:03 #71441 by PCW
Replied by PCW on topic 7i76E + THCad 10V
The velocity estimation is a counts/time estimator but the time is not the sample period but rather the time between the first and last counts, which means the resolution can be much better than counts/servo period.

Note that this is not specific to the 7I76 or 7I76e, the encoder counter and velocity estimation code is common across all Hostmot2 based hardware

If you only need 25 Hz servo bandwidth, this is all rather academic anyway as you can increase the integration time to even 5 or 10 ms. Just depends on what your Z mechanics can do and how fast and how bumpy a surface you want to track

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

More
11 Mar 2016 18:36 #71442 by islander261
Replied by islander261 on topic 7i76E + THCad 10V
Thank you, I assume from your answer that this explanation is not available in a public document.

I don't know if a 25hz servo rate is good enough for my mechanics, that is just a magic number a Hypertherm guru quoted one time. I am still building my new Z axis mechanics. Based on the performance of my X &Y axis I see no reason the actual Z maximum velocity and accelerations will be lower, same drive, same stepper, nearly same reduction, 1/4 the mass. My X and Y axis run reliably at 225ipm so if my Z can move that fast I should be able to cut some pretty wavy sheet, I will not be trying to cut corrugated sheet steel like some of the THC ads show. Some day I will shell out for 5 new Gecko drivers and power supply to boost my top end.

To increase the integration time do I need to instantiate a new thread running at the desired integration period? I assume that this is the thread that will call the THC component? I have not gotten to creating ini and HAL files yet, I only know that the communication between my PC and the 7i76E works!

John

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

More
11 Mar 2016 19:06 #71444 by andypugh
Replied by andypugh on topic 7i76E + THCad 10V

Thank you, I assume from your answer that this explanation is not available in a public document.


It is, to an extent. The source-code is here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...cab5bd11fe3f2ed#l862

And the FPGA code is here
git.linuxcnc.org/gitweb?p=hostmot2-firmw...f8568c80b728818b9a8b

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

More
19 Apr 2016 22:26 #73620 by OPS
Replied by OPS on topic 7i76E + THCad 10V
I also has same problem at the moment: trying to attach THCAD-10 to 7i76E. Unfortunatelly I have created the topic under HAL configuration questions before I've met this thread. My initial intention was to attach THCAD to the hardware encoder counter on 7i76E board and configure thc component by providing the right pins. But on the first attempt my setup didn't work. Here my config files. Physically I connected feedback from plasma to analog input on THCAD board, and verified that it shows some meaningfull value while arc is on. Then I've connected pins FO+ FO- to 7i76e enc A+ A- inputs according to the documentation. Then I've running 'thc' component on servo thread and connected encoder frequency out signal to thc in signal:

# Set up the Encoder for the THC
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 1
net thc-vel-in hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => thc.encoder-vel
setp thc.scale-offset 119000
setp thc.vel-scale 0.00037866834

# this might need to be increased
setp thc.correction-vel 0.0001

As the result I don't see it working yet: the voltage indicator shows 0 and not changing while arc is on.
What's wrong with my config?

I also have 2 further questions:

1. Is 'thc' component built-in or it requires explicit halcomp 'install'?
2. Am I right that 'thc' also can move Z axis without 'thcud' component, or both components shold be configured?

Thank you in advance!
Oleg
Attachments:

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

Moderators: PCWjmelson
Time to create page: 0.077 seconds
Powered by Kunena Forum