Spindle override with wsum switch bouncing

More
10 years 2 weeks ago #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?

Please Log in to join the conversation.

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

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

More
10 years 1 week ago #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

Please Log in to join the conversation.

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

Time to create page: 0.436 seconds
Powered by Kunena Forum