G76 spindle settings

More
30 Oct 2021 17:20 #224721 by rider-83
I've added a second sensor to my spindle.  Both at LPT1 (Secondary port)
Sensor 1 is at Pin 10
Sensor 2 is at Pin 11
The system shows that each of the signals are correct at  LPT Pin 10 & Pin11 when I rotate the spindle by hand.
G95 & CSS work fine.

But when using G76:
Spindle rotates and tool moves to position, then on command of G76, the machine sits and waits.
I must  have missed out something in my .Hal, but I can't see the wod for the trees.
Please see below if someone may be able to tell me where I've gone wrong?

loadrt encoder num_chan=4
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread

# set the HAL encoder to 100 pulses per revolution.
setp encoder.3.position-scale 100

#set the HAL encoder count mode
setp encoder.3.counter-mode true

# connect the HAL encoder outputs to LinuxCNC.
net spindle-position encoder.3.position => spindle.0.revs
net spindle-velocity encoder.3.velocity => spindle.0.speed-in
net spindle-index-enable encoder.3.index-enable <=> spindle.0.index-enable

#Connect HAL Encoder to Parallel Port
net spindle-phase-a encoder.3.phase-A <= parport.1.pin-10-in
net spindle-phase-b encoder.3.phase-B
net spindle-index encoder.3.phase-Z <= parport.1.pin-11-in

#SPINDLE AT SPEED DETAIL
# load a near component and attach it to a thread
loadrt near
addf near.0 servo-thread

# connect one input to the commanded spindle speed
net spindle-cmd-rps-abs => near.0.in1

# connect one input to the encoder-measured spindle speed
net spindle-velocity => near.0.in2

# set the spindle speed inputs to agree if within 1%
setp near.0.scale 1.333

# connect the output to the spindle-at-speed input
net spindle-at-speed spindle.0.at-speed <= near.0.out
 

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

More
30 Oct 2021 20:04 #224728 by BigJohnT
Replied by BigJohnT on topic G76 spindle settings
If the tool moves to the start of the cut and stops then the index signal was not received by LinuxCNC.

linuxcnc.org/docs/2.8/html/gcode/g-code.html#gcode:g76

JT

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

More
30 Oct 2021 22:19 #224734 by Clive S
Replied by Clive S on topic G76 spindle settings
OK what is the gcode you are using to achieve this

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

More
31 Oct 2021 06:51 #224751 by rider-83
Replied by rider-83 on topic G76 spindle settings
?
Do you mean the complete program I'm using ?

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

More
31 Oct 2021 10:35 #224757 by rider-83
Replied by rider-83 on topic G76 spindle settings
Using Halshow I can see the signal at 'spindle index' but nothing at 'spindle index enable'
I've had a good look through the document, but I'm struggling to see what it is I need to be focusing on.

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

More
31 Oct 2021 12:31 - 31 Oct 2021 20:06 #224761 by rider-83
Replied by rider-83 on topic G76 spindle settings
I swapped M4 in the program for M3, and it now works.
I need it to work in M3 not M4 as the turret is designed only to work with left hand tools.
I'm guessing something is counting negative due to the rotation thus not triggering the spindle-at speed perhaps?
Last edit: 31 Oct 2021 20:06 by rider-83.

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

More
31 Jan 2022 15:38 #233641 by rider-83
Replied by rider-83 on topic G76 spindle settings
I'm back to this old problem again.
As previously stated, G76 works fine with M3 but not with M4.
I actually solved this problem but didn't take down any notes and moved on to something else more urgent. Now I'm back here again frustrated with my self for repeating the problem.

Can anyone help? Something tells me it's something to do with counting negative??

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

More
01 Feb 2022 13:34 #233709 by rider-83
Replied by rider-83 on topic G76 spindle settings
Has anyone got any suggestions as to why it doesn't work with M4 ?

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

More
02 Feb 2022 18:27 #233820 by rider-83
Replied by rider-83 on topic G76 spindle settings
Can anyone shed any light on this problem.
I'm stuck here and could really do with a little help?
Any suggestion is welcome,please ...

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

More
05 Feb 2023 18:28 #263763 by O.R
Replied by O.R on topic G76 spindle settings
Hi

I have same problem, M3 and G76 work but with M4 command it won't work. Is there solution or suggestions for this?

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

Time to create page: 0.110 seconds
Powered by Kunena Forum