Mach3 -> Camtronics -> Parallel P Replacement
05 Apr 2021 01:19 #204836
by rdeeming
Replied by rdeeming on topic Mach3 -> Camtronics -> Parallel P Replacement
Thank you Andy for putting me on track with some ideas.
I replaced my hack with something much better in the long run.
There are some things I am trying to cover up the weak links in the lathe machine like using the R, Q and H of the G76 cycle.
I have read the docs on R a few times now and really don't get it. I was hoping it was a way to basically decrease the cut depth the further into the thread depth of the cycle. It does not seem to do me any favors.
H was weird because the doc sais "additional" passes IE H1 should be two final passes in my mind. I need to verify what I am saying a bit more but what I thought I saw was there was no difference till like H2.
Q that was interesting. I tried a pass with it as far down a like 15 just to see what it looked like. It was not good...
Anyways some pics of the end of that little project are attached.
If there are suggestions like maybe make two calls to G76 to simulate an aggressive cut at the beginning and then taper off on the next G76 or other ideas to facilitate a machine that cant take a whole lot I would appreciate that.
My next few tasks.
I replaced my hack with something much better in the long run.
There are some things I am trying to cover up the weak links in the lathe machine like using the R, Q and H of the G76 cycle.
I have read the docs on R a few times now and really don't get it. I was hoping it was a way to basically decrease the cut depth the further into the thread depth of the cycle. It does not seem to do me any favors.
H was weird because the doc sais "additional" passes IE H1 should be two final passes in my mind. I need to verify what I am saying a bit more but what I thought I saw was there was no difference till like H2.
Q that was interesting. I tried a pass with it as far down a like 15 just to see what it looked like. It was not good...
Anyways some pics of the end of that little project are attached.
If there are suggestions like maybe make two calls to G76 to simulate an aggressive cut at the beginning and then taper off on the next G76 or other ideas to facilitate a machine that cant take a whole lot I would appreciate that.
My next few tasks.
- Get Andys Lathe Macros going
- Get spindle speed control from linuxCNC working. Nowforever E100S1R5B
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
05 Apr 2021 02:12 #204847
by andypugh
Replied by andypugh on topic Mach3 -> Camtronics -> Parallel P Replacement
Is the spindle to encoder gearing 1:1? It doesn't look to be.
Please Log in or Create an account to join the conversation.
05 Apr 2021 03:03 #204853
by rdeeming
Replied by rdeeming on topic Mach3 -> Camtronics -> Parallel P Replacement
It is not. 20T to 40T
Please Log in or Create an account to join the conversation.
05 Apr 2021 12:31 #204889
by andypugh
Replied by andypugh on topic Mach3 -> Camtronics -> Parallel P Replacement
Do you have a separate index? If you use the index on the encoder then there are two possible places that an index might be seen for every spindle rev.
Please Log in or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
Less
More
- Posts: 915
- Thank you received: 216
05 Apr 2021 13:01 #204892
by robertspark
Replied by robertspark on topic Mach3 -> Camtronics -> Parallel P Replacement
you could always use a frequency divider circuit (very cheap ) to divide any ratio you need (2:1 is actually easy and can be done by other means but this is a sort of universal circuit and good to know imo)
www.google.com/amp/s/electrosome.com/cd4017/amp/
www.google.com/amp/s/electrosome.com/cd4017/amp/
Please Log in or Create an account to join the conversation.
05 Apr 2021 13:26 #204897
by andypugh
If using the software encoder there are ways to ignore every second index pulse in HAL, which might be easier, if it is necessary in this case.
You can use the LinuxCNC version of the classic D-type latch (which, unfortunately, lacks the "not" output.
Replied by andypugh on topic Mach3 -> Camtronics -> Parallel P Replacement
you could always use a frequency divider circuit (very cheap ) to divide any ratio you need
If using the software encoder there are ways to ignore every second index pulse in HAL, which might be easier, if it is necessary in this case.
You can use the LinuxCNC version of the classic D-type latch (which, unfortunately, lacks the "not" output.
loadrt flipflop
loadrt not
addf flipflop.0 base-thread
halcmd: addf not.0 base-thread
net pulse flipflop.0.out not.0.in encoder.0.index
net out-not not.0.out flipflop.0.data
net index parport.0.pin-in-99 => flipflop.0.clk
The following user(s) said Thank You: rdeeming, robertspark
Please Log in or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
Less
More
- Posts: 915
- Thank you received: 216
05 Apr 2021 13:33 #204900
by robertspark
Replied by robertspark on topic Mach3 -> Camtronics -> Parallel P Replacement
I did wonder if there was a hal component, and did also wonder if it could be used with Mesa hardware as I presumed that the encoder to spindle synchronisation happened within the Mesa hardware so you would then need a hardware solution prior to Mesa device ((I haven't read the whole thread so was not sure if this was a pp / Mesa hardware discussion)
The following user(s) said Thank You: rdeeming
Please Log in or Create an account to join the conversation.
05 Apr 2021 14:26 - 05 Apr 2021 15:01 #204903
by rdeeming
Replied by rdeeming on topic Mach3 -> Camtronics -> Parallel P Replacement
Yes I changed out the encoder to one that has Z. Thanks to tommylight for shedding the light on that issue I had.
I will work on making the changes to the HAL that you shared.
This might explain the luck of the draw at times and the shredding of threads I assume lol.
I will work on making the changes to the HAL that you shared.
This might explain the luck of the draw at times and the shredding of threads I assume lol.
Last edit: 05 Apr 2021 15:01 by rdeeming.
Please Log in or Create an account to join the conversation.
06 Apr 2021 20:10 #205177
by andypugh
Replied by andypugh on topic Mach3 -> Camtronics -> Parallel P Replacement
Note that it is possible to source an index elsewhere, for example a proximity sensor looking at a keyway on the spindle shaft, or an optical slot sensor looking at a hole in the toothed belt pulley flange.
Please Log in or Create an account to join the conversation.
06 Apr 2021 22:44 #205205
by rdeeming
Replied by rdeeming on topic Mach3 -> Camtronics -> Parallel P Replacement
For $13 I have another 40 tooth wheel coming. But I want to learn while I wait on amazon.
I am new to all this so this is probably more of a big deal to me than most.
I verified my encoder index is working and in fact is triggering twice. Basically extracted from this to come up with commands that were relevant to my config.
halcmd show pin hm2_7i76e.0.encoder.00.index-enable
Component Pins:
Owner Type Dir Value Name
26 bit I/O FALSE hm2_7i76e.0.encoder.00.index-enable <=> spindle-index-enable
halcmd unlinkp hm2_7i76e.0.encoder.00.index-enable
halcmd setp hm2_7i76e.0.encoder.00.index-enable 1
halcmd show pin hm2_7i76e.0.encoder.00.index-enable
Component Pins:
Owner Type Dir Value Name
26 bit I/O TRUE hm2_7i76e.0.encoder.00.index-enable
Hand spin the spindle half a turn and the value goes back to FALSE.
Off to translate what Andy has given about flipflop and not...
I inserted a few lines in hal to get the party started.
loadrt flipflop
loadrt not
addf flipflop.0 servo-thread
halcmd show pin flipflop not
Component Pins:
Owner Type Dir Value Name
41 bit IN FALSE flipflop.0.clk
41 bit IN FALSE flipflop.0.data
41 bit I/O FALSE flipflop.0.out
41 bit IN FALSE flipflop.0.reset
41 bit IN FALSE flipflop.0.set
41 s32 OUT 64 flipflop.0.time
44 bit IN FALSE not.0.in
44 bit OUT FALSE not.0.out
44 s32 OUT 0 not.0.time
This is where I am at and have run out of general lack of knowledge connecting the dots to get the latch working with my config.
I am new to all this so this is probably more of a big deal to me than most.
I verified my encoder index is working and in fact is triggering twice. Basically extracted from this to come up with commands that were relevant to my config.
halcmd show pin hm2_7i76e.0.encoder.00.index-enable
Component Pins:
Owner Type Dir Value Name
26 bit I/O FALSE hm2_7i76e.0.encoder.00.index-enable <=> spindle-index-enable
halcmd unlinkp hm2_7i76e.0.encoder.00.index-enable
halcmd setp hm2_7i76e.0.encoder.00.index-enable 1
halcmd show pin hm2_7i76e.0.encoder.00.index-enable
Component Pins:
Owner Type Dir Value Name
26 bit I/O TRUE hm2_7i76e.0.encoder.00.index-enable
Hand spin the spindle half a turn and the value goes back to FALSE.
Off to translate what Andy has given about flipflop and not...
I inserted a few lines in hal to get the party started.
loadrt flipflop
loadrt not
addf flipflop.0 servo-thread
halcmd show pin flipflop not
Component Pins:
Owner Type Dir Value Name
41 bit IN FALSE flipflop.0.clk
41 bit IN FALSE flipflop.0.data
41 bit I/O FALSE flipflop.0.out
41 bit IN FALSE flipflop.0.reset
41 bit IN FALSE flipflop.0.set
41 s32 OUT 64 flipflop.0.time
44 bit IN FALSE not.0.in
44 bit OUT FALSE not.0.out
44 s32 OUT 0 not.0.time
This is where I am at and have run out of general lack of knowledge connecting the dots to get the latch working with my config.
Please Log in or Create an account to join the conversation.
Time to create page: 0.125 seconds