setting mpg scale with rotary switch

More
24 Sep 2024 18:04 #310724 by Krulli_Fräser
Hey all,

I am about done configuring my milling machine. One of the last things I need to do is set the mpg scales for my 3 handwheels.

All of these handwheels use encoders with different pulse/rev so I always need to assign a different scale to each axis. I want to have 3 speed settings and have already connected a 3 position rotary switch to select these settings. The three input pins for that are working fine.

I tried setting the values with a variable assignment in classicladder but can't seem to get it to output a float value.

All of the scale values I want to set are float values.

Does anyone know a solution for this?

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

More
24 Sep 2024 18:37 #310727 by PCW
Typically this would be done with a mux component.

If you have 3 inputs, you could use a mux8 component

If the 3 inputs are binary coded, you get 8 separate scales.
If the 3 inputs are linear select (just one input active at a time),
you only get  3 selections but mux8 will still work.


 

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

More
24 Sep 2024 19:11 #310728 by Krulli_Fräser
Ok I see.

I have three seperate inputs from the selector switch that are exclusive to each other (only one active at a time).

I would need 3 mux components, one for each axis for my different values right?

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

More
24 Sep 2024 19:52 - 24 Sep 2024 19:58 #310731 by PCW
edit2:

 Since you only have 3 options for jog increments you only need
one mux8 component. (any individual MPG PPR related scaling would
be done by a fixed factor elsewhere)

Think of mux8 as a 1/8 selector switch with 8 inputs and one
output and a 3 bit binary code that selects the switch position.
 
Last edit: 24 Sep 2024 19:58 by PCW.
The following user(s) said Thank You: Krulli_Fräser

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

More
24 Sep 2024 19:58 #310732 by Krulli_Fräser
I can only see one output value per selection is possible.

I need these values:

Fast setting: x-scale: 0.00125 y-scale: 0.003125 z-scale: 0.0005
Medium setting: x-scale: 0.00025 y-scale: 0.000625 z-scale: 0.0001
Slow setting: x-scale: 0.00005 y-scale: 0.000125 z-scale: 0.00002

I need these different settings because each axis has a different encoder and because i always want the z axis to move less per turn.

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

More
24 Sep 2024 22:09 - 24 Sep 2024 22:09 #310736 by PCW
You would typically scale the encoders with a fixed number
with  the encoder scale setting parameter.
Then all the jog increment values for the mux would be the same
for all axis
Last edit: 24 Sep 2024 22:09 by PCW.

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

More
25 Sep 2024 07:40 #310759 by Krulli_Fräser
Yes that was the first thing I tried however the encoder scale I set makes it so the position is a float number that I can't pass off toaxis.x.jog-counts
So if it works with 3 mux8 I would just use that and be done.

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

More
25 Sep 2024 17:23 #310792 by Krulli_Fräser
Ok I just got it running with 3x mux8 and its working flawlessly.

Now I will dig the foundation and post a video once everything is in place.

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

Time to create page: 0.130 seconds
Powered by Kunena Forum