- Posts: 757
- Thank you received: 0
7i76E + THCad 10V
- islander261
- Topic Author
- Offline
- Platinum Member
-
John
Please Log in to join the conversation.
islander261 wrote: 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 to join the conversation.
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 to join the conversation.
- islander261
- Topic Author
- Offline
- Platinum Member
-
- Posts: 757
- Thank you received: 0
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 to join the conversation.
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 to join the conversation.
- islander261
- Topic Author
- Offline
- Platinum Member
-
- Posts: 757
- Thank you received: 0
John
Please Log in to join the conversation.
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 to join the conversation.
- islander261
- Topic Author
- Offline
- Platinum Member
-
- Posts: 757
- Thank you received: 0
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 to join the conversation.
islander261 wrote: 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 to join the conversation.
# 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
Please Log in to join the conversation.
