setting mpg scale with rotary switch

More
2 years 1 month ago #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 to join the conversation.

More
2 years 1 month ago #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 to join the conversation.

More
2 years 1 month ago #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 to join the conversation.

More
2 years 1 month ago #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.
 

Please Log in to join the conversation.

More
2 years 1 month ago #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 to join the conversation.

More
2 years 1 month ago #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

Please Log in to join the conversation.

More
2 years 1 month ago #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 to join the conversation.

More
2 years 1 month ago #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 to join the conversation.

Time to create page: 0.111 seconds
Powered by Kunena Forum