Feedoverride with Potentiometer

More
17 Oct 2019 08:13 #148091 by Aciera
I have a potentiometer for feed-override installed on my machine panel. The value gets passed on to classicladder via modbus and reads from 0..1023. Now I connect this in the HAL to the halui.feed-override.counts and I can control the feedoverride slider in axis with the pot. The problem is that the value only changes in 10% increments and not in the desired 1% steps.

Any ideas?

File Attachment:

File Name: Aciera.hal
File Size:15 KB
Attachments:

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

More
17 Oct 2019 08:25 #148092 by bevins
This is a bit more readable....

Warning: Spoiler!

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

More
17 Oct 2019 08:50 #148094 by cmorley
might help to see the classiclader program so we know what is feeding the scale component

Chris

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

More
17 Oct 2019 11:13 #148108 by Aciera
The classicladder programm is only the variable assignment "%QF0=%W0".
I can see the potmeter input in the HAL pin classicladder.0.floatout-00. Its fine going in but the halui.feed-override.counts only counts in whole numbers where 3 produces 30% override, 4 is 40% 5 is 50% and so on.
I dont understand how to get it to count in 1% increments since halui.feed-override.counts wants a s32 value.

Dave

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

More
17 Oct 2019 11:40 #148111 by cmorley
setp scale.feed.gain .001023

Try that

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

More
17 Oct 2019 17:04 #148127 by Aciera
Thanks for the reply!
However, setting scale.feed.gain to .001023 lets me change the feedrate override only either 0 or 10 percent.
scale.feed.in changes from 0 to 1023
scale.feed.out changes from 0 to 1.05..
after the conv_float_s32 I only get 0 or 1
this then gets somehow multiplied by 10 and so I get 0% or 10%.
Where does this factor 10 come from?

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

More
17 Oct 2019 22:56 #148155 by cmorley
I have some more questions:

I don't see how classicladder gets the pot number - is that from modbus?
I don't see where you set the halui.feed-override.scale
in halui scale times counts = percentage

I don't see that you need the scale component.
send pot to classicladder
send out as a s32 to halui counts
set halui scale to scale counts from 0-100

Chris

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

More
18 Oct 2019 08:30 #148174 by Aciera
Thanks Chris!
I've tried your suggestion and sent the pot value as s32 to halui counts. However the problem remains. The halui counts value gets somehow multiplied by a factor of 10.
So halui conts value of 1 sets the feedrate override to 10%, a value of 10 results in 100%.
Anyway, I am now trying to get this working in gmoccapy.

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

More
18 Oct 2019 08:37 #148175 by cmorley
What did you set halui.feed-override.scale to?

Chris

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

More
15 May 2020 14:00 #167844 by HansU
Interesting that this basically works on your system. I tried the same and the slider in the axis GUI is always jumping between the value set in axis an the value coming from the analog input. Does anyone have an idea about this behaviour?

Hans

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

Time to create page: 0.168 seconds
Powered by Kunena Forum