pyvcp tachometer
ie: the spindle control is manual.
A pulse can be seen on pin 10 but I'm unsure how to make the software connections
or whether this is even practical using only parallel port.
btw: the spindle has a belt driven quad encoder fed to a DOS program but a 1 ppr disk is being
added. I believe 1 ppr will be needed for future thread cutting ?
Please Log in or Create an account to join the conversation.
You can certainly have a spindle rpm meter with just an index signal.
That is all you need.
This is pretty much what you need in your hal for the encoder
loadrt encoder num_chan=1
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread
setp encoder.0.position-scale 1
net spindle-position encoder.0.position-interpolated => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=>motion.spindle-index-enable
net spindle-pulse-and-index parport.0.pin-NN-in => encoder.0.phase-A encoder.0.phase-Z
(should all be on one line)
and this in your custom_gui.hal for the RPM meter
loadrt scale count=1
loadrt abs count=1
loadrt lowpass count=1
addf scale.0 servo-thread
addf abs.0 servo-thread
addf lowpass.0 servo-thread
setp lowpass.0.gain 0.01
###############################################
# Display spindle speed in pyvcp bar
###############################################
setp scale.0.gain 60.0 #convert velocity per sec into rpm
net spindle-velocity => lowpass.0.in
net filtered-spindle-velocity <= lowpass.0.out => abs.1.in
net absolute-spindle-velocity <= abs.1.out => scale.1.in
net scaled-spindle-velocity <= scale.1.out => pyvcp.spindle-speed
This index signal will be fine for threading too, but you will require a separate pulse (encoder A channel) to thread properly.
I have a hall effect switch for my index and an optical switch and 120 hole disc for pulse on my lathe, which works fine.
(only Mach tries to kid people that you can thread with just one reference per revolution)
regards
Please Log in or Create an account to join the conversation.
Yes, just use an encoder counter with that pulse wired to ChanA, and set to "counter mode"Is it possible to have tachometer with only an index pulse ?
btw: the spindle has a belt driven quad encoder fed to a DOS program but a 1 ppr disk is being
added. I believe 1 ppr will be needed for future thread cutting ?
You need an index for threading, but a quadrature encoder is also usual.
You _can_ thread with 1 ppr, but it isn't a good idea, or likely to give very good threads.
Mach3 requires 1ppr, because it can't use an encoder for threading. LinuxCNC needs an index pulse to align the thread starts, then a quadrature encoder to control the feed. Normally the index comes from the encoder Z channel.
Please Log in or Create an account to join the conversation.
I'm thinking of ditching the belt driven encoder and going with the more common multi-hole disk.
2 questions:
What's realistic with software counting ? 100 holes ? Does it matter ?
Excluding the disk, are there bolt-on electronic kits available or do most people roll their own ?
(okay that's more than 2 questions)
![;) ;)](/media/kunena/emoticons/wink.png)
Please Log in or Create an account to join the conversation.
If you have a working belt driven encoder, I would keep it if possible.I'm thinking of ditching the belt driven encoder and going with the more common multi-hole disk.
I had one but it was fried, along with many other components in a power outrage at some point before i bought it.
Thats the reason I went to other indexing methods
This is my set up, as posted previously.
www.linuxcnc.org/index.php/english/compo...imit=6&start=6#14832
There are no kits I am aware of, but the components are simple and quite easy to put together.What's realistic with software counting ? 100 holes ? Does it matter ?
Excluding the disk, are there bolt-on electronic kits available or do most people roll their own ?
This is the circuit I use, kindly supplied by Andy Pugh some years ago.
I have a 120 hole disc, which is approaching the limit of practicality in terms of disc diameter and the number of holes that can be drilled along its circumference, for the space available to me. The holes are 3mm and 3mm ish spacing between.
I chose to work in multiples of 60 for sheer convenience of calculation, both with spindle velocity and the initial PCD calculations for making it.
I also hypothesised that if all calculations within software as to the exact position of the spindle were in numbers that divided exactly into 360, the accuracy must be better.
Whether this is true I don't know, but it threads very smoothly.
regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
What's realistic with software counting ? 100 holes ? Does it matter ?
Excluding the disk, are there bolt-on electronic kits available or do most people roll their own ?
The speed at which you can count with software depends on the speed of the base thread. The number of holes will be dependent on your RPM and the speed at which you can count them. I'm not sure but I assume it takes two ticks of the base period to count a pulse, one to see it on and one to see it off.
John
Please Log in or Create an account to join the conversation.
If you have a working belt driven encoder, I would keep it if possible.
I'll give it a try.
The manual page for encoder reads "phase B is ignored" for unidirectional threading with software counter.
So only index and phase A need to be connected in Hal ? In what situation would phase B be used ?
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.