(SOLVED) Max Velocity Selector Switch

More
4 years 10 months ago - 4 years 10 months ago #229998 by Michael
Here is the mux16 github that shows the logic for the selects to change inputs. It really needs to be added to the linuxcnc documents for those of us not so smart people.
github.com/robEllenberg/linuxcnc-mirror/...omponents/mux16.comp

Your HAL looks good to me. Thats how I though it would work. Maybe the slider wont change until it sees the counts change and then multiplies it by the scale. You can try setp the scale to like .1 and then use the mux to change the counts value but the mux out will need to be converted to an S32.

Did you try setting this to see if it makes a difference?    halui.max-velocity.count-enable

If you supress that value then you can only use 4 direct mux16 values and get the rest with an or2 statement.
Last edit: 4 years 10 months ago by Michael.

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

More
4 years 10 months ago - 4 years 10 months ago #230003 by spumco


Did you try setting this to see if it makes a difference?    halui.max-velocity.count-enable


 



 

No, duh.  That looks like what I need - I'll have a go right now.

EDIT - no joy.  Changing that and all the other pins didn't work.  The scale value changes just fine, but nothing affects the max velocity.
Last edit: 4 years 10 months ago by spumco.

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

More
4 years 10 months ago - 4 years 10 months ago #230004 by Michael
I would see use the mux16 to select count values that get modified by a scale value that was setp maybe. Not sure how the max velocity functions but maybe it only does the change when a new count value is introduced. The mux16 final value would need to be converted to an S32 value which basically means being a whole number.

You might be able to do a quick test of this with your current Hal by manually adding setp counts to 2 or 3 via halshow and see if that changes the on screen slider
Last edit: 4 years 10 months ago by Michael.
The following user(s) said Thank You: spumco

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

More
4 years 10 months ago #230006 by spumco
setp max-velocity.counts doesn't change the max-velocity.output or the slider.   The only thing that changes the output value is setting the .increase or .decrease pin (and moving the slider as mentioned).  .decrease will immediately set .output to 0, and .increase will raise it to full value.

I tried reversing the scale and counts in hal, but that just threw a start-up error.  I poked around the probe basic screen in QT Designer, and the slider is connected to machine.max-velocity.set... some python function that I suspect is overriding any halui inputs.

I think I'm going to punt.  PCW's (and Rod's) recent guidance on connecting up 5v encoders to my particular mesa boards means I should be able to control my SRO and FRO with encoders without completely rewiring my whole panel... and I can do the same thing with the max-vel function.  I know that Probe Basic plays nicely with encoders and I still have an older hal backup somewhere with those connections I can re-use.

Thanks for the mux help.  If you get your setup working post it up as I'd like to see it.  I just think my particular GUI choice is limiting my options.

-Ralph

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

More
4 years 10 months ago #230007 by cmorley
Ok I looked in the source - I was right to begin with you must connect mux output to the counts and set the scale to an appropriate setting.

halui only looks at the counts to see if anything has changed and needs update.

The error ehen switching will because .counts is an s32 type pin and you used mux's .out-f (flost type) use .out-s (s32 type)
The following user(s) said Thank You: spumco

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

More
4 years 10 months ago #230021 by Michael
I forgot mux16 can out s32. That makes it easier. Also makes sense that counts is the trigger.
The following user(s) said Thank You: spumco

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

Time to create page: 0.437 seconds
Powered by Kunena Forum