configuring a "spindle-on" output

More
22 Mar 2012 00:33 #18692 by arch dude
I am a newbie, configuring my Fireball V90 with a Super-PID speed controller. I used stepconf to add a PWM output for speed control. This worked, but did not provide for the separate "run" signal needed by the Super-PID. After considerable research, I found a solution that works, but it seems overly complicated. Is there a simpler solution? I added the following to custom.hal:

# parallel port pin 16 is connected to the "run" pin on the Super-PID.
# the following causes that pin to be lo when the AXIS spindle button (motion.spindle-on)
# is "on" and hi when the AXIS button is "stopped." The two "unlinkp statements were
# needed because the existing HAL connects motion.spindle-on to pwmgen.0.enable.
# The new code re-connects these, but also connects them to not.0.in.
loadrt not count=1
addf not.0 servo-thread
unlinkp motion.spindle-on
unlinkp pwmgen.0.enable
net spindle-power <= motion.spindle-on => not.0.in => pwmgen.0.enable
net spindle-power-not <= not.0.out parport.0.pin-16-out

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

More
22 Mar 2012 02:43 #18694 by cmorley
Replied by cmorley on topic Re:configuring a
This is a bug.
One should be able to select spindle pwm and spindle-on signal.

But You could connect spindle-enable to the parport pin in your custom HAL file:

net spindle-enable => parport.0.pin-16-out
parport.0.pin-16-out-invert

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

More
22 Mar 2012 02:56 #18695 by arch dude
Replied by arch dude on topic Re:configuring a
What is a bug? I'm guessing that the "bug" is that selecting spindle-PWM as one of my outputs prevents me from then selecting spindle-on as another one of my outputs, because selection of spindle-PWM "consumes" the spindle-on "Pin" from the motion component.

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

More
22 Mar 2012 03:21 #18699 by cmorley
Replied by cmorley on topic Re:configuring a
A bug is a programmer's term - it means that the program doesn't work as expected.

Yes you pretty much got it. I'm looking in to fixing it.

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

More
22 Mar 2012 13:27 #18706 by arch dude
Replied by arch dude on topic Re:configuring a
:laugh: My post had a bug. I said "what is a bug." I meant "What part of this behavior to you consider to be a bug?"

I am far, far too familiar with the definition of the word "bug." I have been a systems architect (arch dude) for more than three decades, and there have been times when most of my interactions with co-workers have been via bugzilla.

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

More
22 Mar 2012 13:34 #18707 by arch dude
Replied by arch dude on topic Re:configuring a
cmorley wrote:

This is a bug.
One should be able to select spindle pwm and spindle-on signal.

But You could connect spindle-enable to the parport pin in your custom HAL file:

net spindle-enable => parport.0.pin-16-out
parport.0.pin-16-out-invert



Interesting. From the first statement, I infer that HAL will let me add a signal to an existing net: I do not need to define the entire net in a single statement.

The second statement is more difficult. It is a single name. Is this a function call?

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

More
22 Mar 2012 21:31 #18718 by BigJohnT
Replied by BigJohnT on topic Re:configuring a
Hal doesn't have any function calls that line by itself would give an error
net signal-name pin [optional-pin]

A quick get me up to speed on hal is here .

John

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

More
22 Mar 2012 22:35 #18724 by arch dude
Replied by arch dude on topic Re:configuring a
got it:

setp parport.0.pin-16-out-invert 1

works just fine.,

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

More
27 Mar 2012 02:05 #18821 by cmorley
Replied by cmorley on topic Re:configuring a
sorry about that.. glad you figured it out.

I have pushed a fix for this problem thanks for bringing it our attention

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

Time to create page: 0.134 seconds
Powered by Kunena Forum