Mux options for 4 / 5 bits

More
25 Jul 2019 16:29 #140541 by JB-Motoring
Hey guys,

I've got another hopefully simple question.

I want to use the oem Control panel of my machine for speed and feed overrides.

The speed override has a 4 bit connection- ABCD.
The feed override has a 5 bit connection - ABCDE

I've attached the hal file of the project.

Now the problem is, that all In bits work, so they change the state with every position of the rotary switch (EBE).

In the speed override, the % doesn't change with every change state of the bits.
The Feed override changes the % with every change of state.

BUT in both overrides, the % wont be the same like I want them to be, so lets say I turn the rotary to 75% Linux says 110% and so on.

I hope, the question is understandable for you guys :-).

Greetings, Joel

File Attachment:

File Name: Chiron_FZ_12.hal
File Size:26 KB
Attachments:

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

More
26 Jul 2019 07:12 #140623 by pl7i92
Replied by pl7i92 on topic Mux options for 4 / 5 bits
you cab use the gray encoder comp
and then do a mux 8

# jog Speed
loadrt mux8 count=2
addf mux8.0 servo-thread
addf mux8.1 servo-thread
#wheel speed per tick
setp mux8.0.in0 0
setp mux8.0.in1 0.1
setp mux8.0.in2 0.5
setp mux8.0.in3 0
setp mux8.0.in4 1
#speed for moving axes
setp mux8.1.in0 0 # this one must be 0 to prevent motion unless a button is pressed
setp mux8.1.in1 250
setp mux8.1.in2 1000
setp mux8.1.in3 0
setp mux8.1.in4 2500

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

More
27 Jul 2019 12:02 #140744 by JB-Motoring
Thank you for the reply,

But that doesn't help me very much.

How i need to Set it up, is logic, but how do I adjust it to work correctly?

Thank you guys

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

More
27 Jul 2019 13:28 #140746 by JB-Motoring
Okay guys, i finnaly managed to get it working correctly :-)))

I opened up hal Meter parameters mux gen 00. Selected.

Then turned the switch step By step and corrected the hal with each mux gen counter that was shown.

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

More
27 Jul 2019 13:43 #140747 by tommylight
Nice, thank you for reporting back.
The following user(s) said Thank You: JB-Motoring

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

Time to create page: 0.124 seconds
Powered by Kunena Forum