hal_spinbutton

More
04 Jan 2012 16:45 #16304 by andypugh
Replied by andypugh on topic Re:hal_spinbutton
dab77 wrote:

it's not the case to restart changing the source of emc 2.5 to make manual jogging work!!


I think Michael was suggesting asking micges to do a 2.5 into JA3 merge. You would then get a rather more capable JA3 version to use.

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

More
04 Jan 2012 16:55 #16305 by dab77
Replied by dab77 on topic Re:hal_spinbutton
Ops. i didn't even think it was possible..
Ok, i will try to take his attention on this.

thanks guys.

p.s. widget.hal_update() doesn't change things..

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

More
04 Jan 2012 16:56 #16306 by mhaberler
Replied by mhaberler on topic Re:hal_spinbutton
dab77 wrote:

Michael, I have to work with JA3 branch, because is the only one where manual jogging is supported with non-trivial kinematics.


As I said: talk to the author and suggest to him to bring this branch up to date.

Please understand that until then I see no chance to further help you.

Sorry

- Michael

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

More
04 Jan 2012 17:02 #16307 by dab77
Replied by dab77 on topic Re:hal_spinbutton
Ok.
Thanks for given help.

Davide.

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

More
08 Jan 2012 22:02 #16446 by dab77
Replied by dab77 on topic Re:hal_spinbutton
Hi, JA3 isn't yet merged with 2.5, but i'm still trying to make something work on this JA3 and my gladevcp panel.
I've noticed a strange behaviour of the spinbutton. My problem was that if i set the initial value of the spinbutton, and then this value correcly appears when i start axis with the panel inside, unfortunately this value isn't set to the hal-pin attached to the spinbutton.
The strange behaviour i saw today is that since the spinbutton has two output, one s32 and one float, if i attach the float to my hal_pin that is seen as 0, while the other is seen correctly as the initial value. If i use the other output the situation is inverted: meaning the hal-connected output becomes always 0, while the 'free' output takes the right initial value..

I thought it could be useful or interesting to write it here.
Ciao, Davide.

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

More
08 Jan 2012 23:19 #16450 by andypugh
Replied by andypugh on topic Re:hal_spinbutton
dab77 wrote:

If i use the other output the situation is inverted: meaning the hal-connected output becomes always 0, while the 'free' output takes the right initial value..


Do the controls need to be added to a thread? The behaviour sounds similar to what you see on a non-running HAL component. As you connect and disconnect the pins their values change depending on the contents of the memory they are pointed at. (netting HAL pins really means pointing to a specific shared-memory location)

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

More
09 Jan 2012 00:33 #16458 by dab77
Replied by dab77 on topic Re:hal_spinbutton
Yes, i think. I've tried to net hal_spinbutton1-f => my_tetrapodkins.Bx
and I've tried also to net that only to a mux2 input which I addf 'ed to the servo-thread. the same.
Then, I believe Michael here who suggests not to use gladevcp on a 2.4 release, but it seems strange to me that this happens.
i also tried not to net that into hal time. When i start axis then the spinbutton value appears into the widget. then i use the hal command into the 'show hal config window' to net hal_spinbutton1-f => my_tetrapodkins.Bx and in that moment both hal_spinbutton1_f and my_tetrapodkins.Bx(which was 1) become 0.

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

More
09 Jan 2012 19:51 #16481 by micges
Replied by micges on topic Re:hal_spinbutton
master was merged into ja3, please test it

regards
Michael

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

More
09 Jan 2012 22:31 #16483 by dab77
Replied by dab77 on topic Re:hal_spinbutton
Thank you very much Michael. During all january i can test it only on a sim machine, 'cause i'm out for work. Then i'll test all the functionalities.
Davide.

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

More
09 Jan 2012 23:01 - 09 Jan 2012 23:02 #16484 by dab77
Replied by dab77 on topic Re:hal_spinbutton
mhaberler wrote:

dab77 wrote:

Hi, that's what i wrote:

def on_hal_spinbutton1_realize(self,widget):
widget.set_value(30)

and as the widget is drawn it assumes the value of 30, but unfortunately the hal_pin associated to that doesn't change.


1. It does work for me, again I have no idea what version of emc you are running. I cannot help you with some random branch with hasnt been merged with recent fixes.

2. You can try to add
widget.hal_update()

and see wether that improves things.

If not, try with master or v2.5_branch. If this helps, merge your branch upwards.

- Michael

Let's say that until trying with 2.5 merge, i've found a nice workaround.
if you want, see the attached file:

File Attachment:

File Name: tgvcp.zip
File Size:1 KB


In two words, i created 4 out pins, and linked them to my 4 Kins-pins, then assigned 4 spinbuttons-values to the out pins, but only when I reset the estop. this way the 4 kins-pins are well-assigned!
Then i used the persistence method to save a file with the name i put inside a text-box, when i click a button. This name append to a comboboxentry liststore and so every new setup i do is saved into that list.
Then i can choose in this list a setup and click another button to recall the setup. The spinbuttons are changed as well and when i reset the estop the new values are passed to my kins-pins.
not bed for a noob programmer!
TODO: i still miss the way to make the comboboxentry liststore permanent, or to save the list into a file...

Thank you good people for helping.

Davide.

p.s. if you see something wrong into the file, please let me know!
Attachments:
Last edit: 09 Jan 2012 23:02 by dab77.

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

Moderators: HansU
Time to create page: 0.169 seconds
Powered by Kunena Forum