Mesa THCAD With Parallel Port Setup

More
24 Apr 2013 22:15 #33147 by Coolmo32

Thanks Coolmo32. I did save those samples and went through the parallel files. I need to sit down again when I get a chance again and go over the 5i20 files, too. As of last week, I haven't been smart enough to see any pin assignment samples getting the THC info in. I just haven't had the time the past few days to sit down and go over John's files for the 5i20, either. I'm not saying the pin assignment isn't there, but I haven't found it yet. I see the pin assignments for everything else: Touch off, torch on, etc.

I was kind of expecting to find a line, generally, like:
net thc-data-input <= parport.0.pin-10-in-not

...or something like it.


I think you need somthing like this:

# Set up the Encoder for the THC
setp encoder.0.counter-mode 1
# added by tc
net freq-in parport.0.pin-11-in => encoder.0.phase-A
net thc-vel-in encoder.0.velocity => thc.encoder-vel
# these will need to be adjusted
setp thc.scale-offset 119000
setp thc.vel-scale 0.00037866834
#
setp thc.velocity-tol 100
setp thc.voltage-tol 1.0

I think it also needs this for z-axis:

# position command and feedback hijacked by thc comp
net emcmot.02.pos-cmd thc.z-pos-in <= axis.2.motor-pos-cmd
net thc-pos-cmd thc.z-pos-out => stepgen.2.position-cmd
net motor.02.pos-fb axis.2.motor-pos-fb <= thc.z-fb-out
The following user(s) said Thank You: Paul

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

More
25 Apr 2013 09:21 #33177 by Paul
Oh wow - Thanks Coolmo32! At one time I thought I might be able to work through this, but I never would have pulled that out of my ...head. I think I will get a chance to hook this up this weekend.

PK

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

More
25 Apr 2013 19:05 #33187 by andypugh

net emcmot.02.pos-cmd thc.z-pos-in <= axis.2.motor-pos-cmd


Just a comment, and an opinion, but I am not fond of this style of signal naming. "emcmot.02.pos-cmd" looks too much like an "offfical" label that has a meaning to LinuxCNC, whereas all signal names are completely arbitrary.

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

More
26 Apr 2013 18:15 #33235 by Coolmo32

Just a comment, and an opinion, but I am not fond of this style of signal naming. "emcmot.02.pos-cmd" looks too much like an "offfical" label that has a meaning to LinuxCNC, whereas all signal names are completely arbitrary.



Understood. Thanks for the info.

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

More
05 May 2013 07:00 #33630 by Paul
I had a chance to hook up the THC and attempt some testing. I hoping to get more help here. Using the signal watch in HAL config, I see the the thc-vel-in is not very stable and wonder if it should be. With the THC frequency divided by 64 and using the F0+ terminal for input, I have a thc-vel-in reading that bounces back and forth from 146.xxxx to 170.xxxx at 0 volts. With the input voltage at 9.25v, the thc-vel-in bounces back and forth from 170.xxxx to 204.xxxx

Would this be normal and I can move forward in my testing, or do I have bigger problems? Thanks for any input!!

Paul

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

More
05 May 2013 07:47 #33631 by PCW
Is this a 300V full scale THCAD or 10V full scale? Those are not bad numbers if its 300V FS.

In any case for software monitoring you will have to put the velocity signal through the low pass
component to get useable resolution.

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

More
05 May 2013 08:43 #33636 by Paul

Is this a 300V full scale THCAD or 10V full scale? Those are not bad numbers if its 300V FS.

In any case for software monitoring you will have to put the velocity signal through the low pass
component to get useable resolution.


This is the THCAD 10v version. What do you mean when the velocity signal needs to be put through the low pass filter component?

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

More
05 May 2013 09:09 #33637 by PCW
OK so the encoder frequency should have changed by a factor of about 8 from 0 to 9.25v so something is wrong with counting (the encoder component setup perhaps)

Is the encoder counter in count mode?

What is your base thread rate? (the /64 output of the THCAD might be as high at 16 KHz full scale)


The lowpass filter is needed to improve the voltage signal resolution when counted in software
the software encoder counter velocity output has a resolution of about

servo_thread_period / base_thread_period

Which is likely to be only be 20 to 50 at the most (so 2% to 5% noise)
To improve this the signal must be low pass filtered. This is done by using the
lowpass HAL component

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

More
05 May 2013 19:37 #33653 by Paul
I am using the thc examples I found in the 2.5.1 setup files. I don't think I have it count mode and am sure I'm not using the lowpass HAL component. I am starting to search through the HAL examples/docs to get a better handle on this. Thanks for the help, PCW. Although I'm not close, I have a better understanding (barely) of where I need to go.
PK

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

Time to create page: 0.131 seconds
Powered by Kunena Forum