Rapid overide selector switch bounce
- COlger81
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 187
- Thank you received: 6
31 Aug 2020 16:01 #180183
by COlger81
Rapid overide selector switch bounce was created by COlger81
I am using a 3 position selector switch to select rapid override value. Values for selector switch are 25%, 50%, and 100%. On startup, the value in Gmoccapy bounces rapidly from these 3 values until i rotate selector switch. After rotating selector, it calms down and acts as it should most of the time. HAL and python file attached.
Attachments:
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7774
- Thank you received: 2055
31 Aug 2020 16:52 #180187
by cmorley
Replied by cmorley on topic Rapid overide selector switch bounce
This sounds like fighting between two programs setting the override.
Each program must allow another to set the override without creating an endless loop of changes. I don't know if this is the problem just guessing.
You have chosen a unique way to set the override with a python program.
Usually for a selector switch I would use a mux component and use halui's direct-value option. using a mux16 allows for debounce as well.
This is how pncconf sets up overrides; you could create a dummy config to study the HAL files if you are interested.
It's tough to troubleshoot these kinds of problems because of the highly specific hardware HAL code makes testing impossible for others.
Chris
Each program must allow another to set the override without creating an endless loop of changes. I don't know if this is the problem just guessing.
You have chosen a unique way to set the override with a python program.
Usually for a selector switch I would use a mux component and use halui's direct-value option. using a mux16 allows for debounce as well.
This is how pncconf sets up overrides; you could create a dummy config to study the HAL files if you are interested.
It's tough to troubleshoot these kinds of problems because of the highly specific hardware HAL code makes testing impossible for others.
Chris
Please Log in or Create an account to join the conversation.
- COlger81
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 187
- Thank you received: 6
31 Aug 2020 17:03 #180188
by COlger81
Replied by COlger81 on topic Rapid overide selector switch bounce
Python seemed like a simple path being that the switch is not just 3 outputs (one for each position). It's a logic setup with 2 outputs.
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
Less
More
- Posts: 2075
- Thank you received: 406
31 Aug 2020 17:08 - 31 Aug 2020 17:08 #180189
by newbynobi
Replied by newbynobi on topic Rapid overide selector switch bounce
Please try to use directly the gmoccapy Hal pin,
Documentation is here
Use this pin and report:
gmoccapy.rapid.rapid_override.direct-value = HAL_FLOAT To adjust the max velocity slider
gmoccapy.rapid.rapid_override.analog-enable = HAL_BIT Must be True, to allow analog inputs
Do never use "enable direct value" and "count-enable", like you did in your Hal file!
Norbert
Documentation is here
Use this pin and report:
gmoccapy.rapid.rapid_override.direct-value = HAL_FLOAT To adjust the max velocity slider
gmoccapy.rapid.rapid_override.analog-enable = HAL_BIT Must be True, to allow analog inputs
Do never use "enable direct value" and "count-enable", like you did in your Hal file!
Norbert
Last edit: 31 Aug 2020 17:08 by newbynobi.
Please Log in or Create an account to join the conversation.
- COlger81
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 187
- Thank you received: 6
31 Aug 2020 17:13 #180192
by COlger81
Replied by COlger81 on topic Rapid overide selector switch bounce
I'm using a 3 position selector switch. Not an encoder or potentiometer...
Please Log in or Create an account to join the conversation.
- COlger81
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 187
- Thank you received: 6
31 Aug 2020 17:16 #180193
by COlger81
Replied by COlger81 on topic Rapid overide selector switch bounce
I think i see what you're saying.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7774
- Thank you received: 2055
31 Aug 2020 17:19 #180194
by cmorley
Replied by cmorley on topic Rapid overide selector switch bounce
So Norbert has confirmed that GMoccapy doesn't like other programs setting the overrides. , but has HAL pins available to do the same.
So use the GMoccapy pins to set the overrides rather then halui.
the process is similar - pin types and names may be different.
So use the GMoccapy pins to set the overrides rather then halui.
the process is similar - pin types and names may be different.
Please Log in or Create an account to join the conversation.
- COlger81
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 187
- Thank you received: 6
31 Aug 2020 17:21 #180195
by COlger81
Replied by COlger81 on topic Rapid overide selector switch bounce
Yes, got it sorted now.
Thanks Guys
Thanks Guys
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19411
- Thank you received: 6507
31 Aug 2020 18:00 #180201
by tommylight
Replied by tommylight on topic Rapid overide selector switch bounce
Fixed title.
The following user(s) said Thank You: COlger81
Please Log in or Create an account to join the conversation.
- COlger81
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 187
- Thank you received: 6
31 Aug 2020 18:46 #180210
by COlger81
Replied by COlger81 on topic Rapid overide selector switch bounce
Was i yelling again? Gotta work on that i guess.
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.165 seconds