Flipping Spindle Signal

More
5 years 5 months ago #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.

More
5 years 5 months ago #210735 by chris@cnc
Replied by chris@cnc on topic Flipping Spindle Signal
To invert your spindlespeed set
Code:
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.

More
5 years 5 months ago #210746 by andypugh
Replied by andypugh on topic Flipping Spindle Signal

Sadlers wrote: Here is the HAL file with the Inv checkbox selected


That seems to set
Code:
setp [HMOT](CARD0).7i76.0.0.spindir-invert true
which would reverse the spindle direction.

What you need is to invert the sense of the PWM pin.

Something like
Code:
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.

More
5 years 5 months ago #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?

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

More
5 years 5 months ago #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.

More
5 years 5 months ago #210764 by PCW
Replied by PCW on topic Flipping Spindle Signal
This (modification of your hal file) should be close:

File Attachment:

File Name: Lathe_Single_7i76.hal
File Size:10.11 KB

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

Time to create page: 0.291 seconds
Powered by Kunena Forum