NEWS
LinuxCNC 2.5.4 Release
There are no translations available.

LinuxCNC 2.5.4 Update Released (changelog).
 
LinuxCNC 2.5.3 Release
There are no translations available.

LinuxCNC 2.5.3 Update Released (changelog).
 
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
Home Forum Configuring LinuxCNC HAL Components Unable to Reverse the Spindle

Welcome, Guest
Username: Password: Remember me

TOPIC: Unable to Reverse the Spindle

Re:Unable to Reverse the Spindle 09 Мар 2012 13:40 #18497

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5798
  • Thank you received: 229
  • Karma: 155
You will have to know what your drive wants before you can make that work. Second point for rigid tapping you need a spindle encoder with an index.

John
The administrator has disabled public write access.

Re:Unable to Reverse the Spindle 09 Мар 2012 13:47 #18499

  • thebuc
  • thebuc's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Yeah you are probably right about that, rigid tapping that is. I really didn't even think going in reverse in my machine would be a problem. Some one else just suggested to me that i need to take the absolute value of my PWN outputs because they are negative when I say the spindle should go in reverse.
I think he might be right because I watched the signal go negative in the hal meter. I'm going to try that out too.
The administrator has disabled public write access.

Re:Unable to Reverse the Spindle 09 Мар 2012 14:20 #18501

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5798
  • Thank you received: 229
  • Karma: 155
I see your using PWM and have some gear change stuff in there, do you have a two speed spindle?

John
The administrator has disabled public write access.

Re:Unable to Reverse the Spindle 09 Мар 2012 14:25 #18502

  • thebuc
  • thebuc's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Yes I have two gears. And that has been working fine.
Right now im trying to implement something like this:

loadrt abs
addf abs.0 servo-thread
net spindle-cmd <= motion.spindle-speed-out => abs.0.in
net spindle-abs-cmd <= abs.0.out => pwmgen.0.value

But the problem is pwmggen.0.value is already defined from the end of the gear change code. And it says pin spindle-cmd doesn't exist.
The administrator has disabled public write access.

Re:Unable to Reverse the Spindle 09 Мар 2012 14:31 #18503

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5798
  • Thank you received: 229
  • Karma: 155
Do you have a direction pin on your spindle drive?

A short brush up on HAL is here

linuxcnc.org/docview/2.5/html/hal/basic_hal.html

In HAL you can only connect pins a certain way as explained in the link.

John
The administrator has disabled public write access.

Re:Unable to Reverse the Spindle 09 Мар 2012 14:37 #18504

  • thebuc
  • thebuc's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Hey
So I figured it out. It was a bit of a syntax and naming pin issue. I basically had to shove an absolute value function inbetween all the gear change and current spindle stuff. The HAL file is attached.

Thanks for the motivation and help... most importantly quick help. HAha This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.
Time to create page: 0.680 seconds
Powered by Kunena Forum
© 2014 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.