Spindle override with wsum switch bouncing

More
17 Oct 2016 10:45 - 17 Oct 2016 11:06 #81715 by terkaa
I have set up panel spindle override switch. It uses weighted sum HAL component in following manner:

#Spindle
setp halui.spindle-override.direct-value 1
setp halui.spindle-override.scale 0.1
setp halui.spindle-override.count-enable 1
setp wsum.0.bit.0.weight 5
setp wsum.0.bit.1.weight 7
setp wsum.0.bit.2.weight 8
setp wsum.0.bit.3.weight 9
setp wsum.0.bit.4.weight 1
setp wsum.0.bit.5.weight 11
setp wsum.0.bit.6.weight 12
setp wsum.0.bit.7.weight 13
setp wsum.0.bit.8.weight 14
setp wsum.0.bit.9.weight 15
setp wsum.0.bit.10.weight 16
setp wsum.0.bit.11.weight 18
setp wsum.0.bit.12.weight 20
net bit0-spindle wsum.0.bit.0.in <= hm2_5i25.0.7i70.1.4.input-10
net bit1-spindle wsum.0.bit.1.in <= hm2_5i25.0.7i70.1.4.input-11
net bit2-spindle wsum.0.bit.2.in <= hm2_5i25.0.7i70.1.4.input-12
net bit3-spindle wsum.0.bit.3.in <= hm2_5i25.0.7i70.1.4.input-13
net bit4-spindle wsum.0.bit.4.in <= hm2_5i25.0.7i70.1.4.input-14
net bit5-spindle wsum.0.bit.5.in <= hm2_5i25.0.7i70.1.4.input-15
net bit6-spindle wsum.0.bit.6.in <= hm2_5i25.0.7i70.1.4.input-16
net bit7-spindle wsum.0.bit.7.in <= hm2_5i25.0.7i70.1.4.input-17
net bit8-spindle wsum.0.bit.8.in <= hm2_5i25.0.7i70.1.4.input-18
net bit9-spindle wsum.0.bit.9.in <= hm2_5i25.0.7i70.1.4.input-19
net bit10-spindle wsum.0.bit.10.in <= hm2_5i25.0.7i70.1.4.input-20
net bit11-spindle wsum.0.bit.11.in <= hm2_5i25.0.7i70.1.4.input-21
net bit12-spindle wsum.0.bit.12.in <= hm2_5i25.0.7i70.1.4.input-22
net spindle-ov-out halui.spindle-override.counts wsum.0.sum

Problem is that right after touching this OVR switch spindle speed starts bouncing around. Issue can be corrected with pressing 100% on Gmoccapy or using slide on Gmoccapy. What am I doing wrong here?

Last edit: 17 Oct 2016 11:06 by terkaa.

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

More
17 Oct 2016 22:41 #81750 by andypugh
Do you have closed-loop spindle speed control? Perhaps the PID tuning is bad?

The numbers into the weighted sum look odd. What is the switch encoding?

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

More
18 Oct 2016 04:05 #81758 by terkaa
This is open loop. There is no encoding just a switch with 13 positions. IIRC Gmoccapy shows commanded speed not actual.

Tero

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

More
19 Oct 2016 06:22 - 19 Oct 2016 06:23 #81822 by terkaa
I can not figure this out. Switch has 13 positions. All of those are connected to 7i70 inputs. I have checked halui.spindle-override.value and it is stable (varies between 0.5 and 2 depending on switch position). But still motion.spindle-speed-out bounces if switch position is changed.... It does not bounce if Gmoccapy slide is used. Any ideas? Related HAL:

setp halui.spindle-override.direct-value 1
setp halui.spindle-override.scale 0.1
setp halui.spindle-override.count-enable 1
setp wsum.0.bit.0.weight 5
setp wsum.0.bit.1.weight 7
setp wsum.0.bit.2.weight 8
setp wsum.0.bit.3.weight 9
setp wsum.0.bit.4.weight 10
setp wsum.0.bit.5.weight 11
setp wsum.0.bit.6.weight 12
setp wsum.0.bit.7.weight 13
setp wsum.0.bit.8.weight 14
setp wsum.0.bit.9.weight 15
setp wsum.0.bit.10.weight 16
setp wsum.0.bit.11.weight 18
setp wsum.0.bit.12.weight 20
net bit0-spindle wsum.0.bit.0.in <= hm2_5i25.0.7i70.1.4.input-10
net bit1-spindle wsum.0.bit.1.in <= hm2_5i25.0.7i70.1.4.input-11
net bit2-spindle wsum.0.bit.2.in <= hm2_5i25.0.7i70.1.4.input-12
net bit3-spindle wsum.0.bit.3.in <= hm2_5i25.0.7i70.1.4.input-13
net bit4-spindle wsum.0.bit.4.in <= hm2_5i25.0.7i70.1.4.input-14
net bit5-spindle wsum.0.bit.5.in <= hm2_5i25.0.7i70.1.4.input-15
net bit6-spindle wsum.0.bit.6.in <= hm2_5i25.0.7i70.1.4.input-16
net bit7-spindle wsum.0.bit.7.in <= hm2_5i25.0.7i70.1.4.input-17
net bit8-spindle wsum.0.bit.8.in <= hm2_5i25.0.7i70.1.4.input-18
net bit9-spindle wsum.0.bit.9.in <= hm2_5i25.0.7i70.1.4.input-19
net bit10-spindle wsum.0.bit.10.in <= hm2_5i25.0.7i70.1.4.input-20
net bit11-spindle wsum.0.bit.11.in <= hm2_5i25.0.7i70.1.4.input-21
net bit12-spindle wsum.0.bit.12.in <= hm2_5i25.0.7i70.1.4.input-22
net spindle-ov-out halui.spindle-override.counts wsum.0.sum

Tero
Last edit: 19 Oct 2016 06:23 by terkaa.

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

More
19 Oct 2016 18:34 #81866 by terkaa
I tried same config on my simulation laptop and was unable to reproduce this behaviour.... It has to be somekind of hardware related one. Maybe faulty switch. I have to check this.


Tero

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

Time to create page: 0.461 seconds
Powered by Kunena Forum