Flipping Spindle Signal
30 May 2021 17:22 #210703
by andypugh
Replied by andypugh on topic Flipping Spindle Signal
(Inverting PWM pin)
It should. How did you do it?
Yeah, I tried that. I doesn’t do what is needed.
It should. How did you do it?
Please Log in or Create an account to join the conversation.
30 May 2021 18:52 #210719
by Sadlers
Replied by Sadlers on topic Flipping Spindle Signal
I don’t know if my last reply went through so this may be a duplicate...
I used pncconf on the mesa board setup page to set the Spindle Output Inv checkbox. Tried with it checked and unchecked. Tested by using MDI in axis and using M3 and various Sxxx settings. Larger numbers = slower speed.
I used pncconf on the mesa board setup page to set the Spindle Output Inv checkbox. Tried with it checked and unchecked. Tested by using MDI in axis and using M3 and various Sxxx settings. Larger numbers = slower speed.
Please Log in or Create an account to join the conversation.
30 May 2021 19:16 #210722
by Sadlers
Replied by Sadlers on topic Flipping Spindle Signal
Here is the HAL file with the Inv checkbox selected
Please Log in or Create an account to join the conversation.
30 May 2021 20:27 #210735
by chris@cnc
Replied by chris@cnc on topic Flipping Spindle Signal
To invert your spindlespeed set
loadrt scale
addf scale.0 servo-thread
setp scale.0.gain -1
setp scale.0.offset 6000
net spindle-output => scale.0.in
net spindle-speed-DAC scale.0.out => [HMOT](CARD0).7i76.0.0.spinout
Please Log in or Create an account to join the conversation.
30 May 2021 21:25 #210746
by andypugh
That seems to setwhich would reverse the spindle direction.
What you need is to invert the sense of the PWM pin.
Something like
But you need to work out which GPIO pin the PWM is on for this to work.
Replied by andypugh on topic Flipping Spindle Signal
Here is the HAL file with the Inv checkbox selected
That seems to set
setp [HMOT](CARD0).7i76.0.0.spindir-invert true
What you need is to invert the sense of the PWM pin.
Something like
setp [HMOT](CARD0).gpio.000.invert_output true
But you need to work out which GPIO pin the PWM is on for this to work.
Please Log in or Create an account to join the conversation.
30 May 2021 23:42 #210760
by Sadlers
Replied by Sadlers on topic Flipping Spindle Signal
Chris,
i entered this in my custom hal file and linuxcnc will not start. Get the attached errors report. looks like I am trying to overwrite signals that have already been setup by PNCCONF. I tried handbombing the file created by PNCCONF and couldn't make it work. any suggestions?
i entered this in my custom hal file and linuxcnc will not start. Get the attached errors report. looks like I am trying to overwrite signals that have already been setup by PNCCONF. I tried handbombing the file created by PNCCONF and couldn't make it work. any suggestions?
Please Log in or Create an account to join the conversation.
31 May 2021 00:05 #210761
by Sadlers
Replied by Sadlers on topic Flipping Spindle Signal
I am controlling my spindle drive with an analog output (which generates pwm to the motor). Looking through the hal meter pins/signals I can’t locate anything that looks like an invert_output for the analog output. Do you know what this would be called?
Please Log in or Create an account to join the conversation.
31 May 2021 01:23 #210764
by PCW
Replied by PCW on topic Flipping Spindle Signal
This (modification of your hal file) should be close:
Attachments:
Please Log in or Create an account to join the conversation.
01 Jun 2021 01:14 #210840
by Sadlers
Replied by Sadlers on topic Flipping Spindle Signal
Thank you very much for your help.
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds