GladeVCP - Cannot Activate Hal Widget on UI Start

More
15 Aug 2012 22:01 #23274 by mhaberler
since I cannot find how gladevcp is started from your ini file:

please state how you start gladevcp and with which command line

are you running gladevcp from a shell after Axis has started ?

- Michael

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

More
16 Aug 2012 00:59 #23278 by wd5jwy
I use the same format as that from example given in the GladeVCP documentation:


3.3. Testing a panel

You’re now ready to give it a try (while LinuxCNC, e.g. Axis is running) it with:

gladevcp myui.ui



In my case, my file is called "cw.ui". So I use "gladevcp cw.ui".

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

More
16 Aug 2012 04:53 #23281 by mhaberler
Since you are starting gladevcp separate from Axis without embedding it (not GLADEVCP or EMBED_TAB lines) Axis happily runs your POSTGUI_HALFILE like any other HAL file.

Since gladeVCP didnt run yet, it hasnt created the HAL component yet, which is why the setp cw.something fails.

solution1: use GLADEVCP or EMBED_TAB ini options as outlined in the manual

solution2: if you want to run gladevcp from outside axis, comment out the POSTGUI_HALFILE and run gladevcp like so:

gladevcp -H mahalcmdds.hal cw.ui

- Michael

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

More
16 Aug 2012 11:32 #23287 by BigJohnT
And there I was making the big assume mistake that he was embedding the GladeVCP panel into Axis otherwise why would he have the postgui file...

John

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

More
16 Aug 2012 11:45 #23288 by mhaberler
BigJohnT wrote:

And there I was making the big assume mistake that he was embedding the GladeVCP panel into Axis otherwise why would he have the postgui file...

John


Users are usually shy when reporting issues.. looks like config files are private parts :laugh:

-m

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

More
16 Aug 2012 16:16 #23298 by wd5jwy
OK, so I'm not clear on the explanation of the issue - but regardless of that, let me try to explain what I'm trying to do. It would be very helpful to get your advice on the best way to go about doing what I'm ultimately trying to do.

I'm building a coil-winding machine. I need to control the speed and acceleration of two stepper motors. The motors would be running at fairly low RPM, but I need the ability to set the speeds of the motors independently and then once set, I need a way to start both motors at the same time with one button. The critical aspect of this application is the RATIO of speed between the two motors. So, my intention is to set the speed of motor 1 and have the app calculate the speed of motor 2 based upon a manually entered ratio.

It's clear from the documentation that this could be done with the Hal components (stepgen), but here's where I need your advice. Would it be better to build a panel that runs separate from Axis or are there some features in Axis that could be used to make development of the app easier or quicker?

I've attached a screen-shot of what the app might look like to make it more clear what I'm trying to do.
Attachments:

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

More
16 Aug 2012 16:29 - 16 Aug 2012 16:36 #23300 by BigJohnT
If your intention is to build a stand alone GUI you might want to take a gander at my Custom GUI Tutorial which is in it's infancy. It should contain enough material to get you going if you decide on that route I hope. In particular if you look at the Glade/Python tutorial 4 on my web site you can see how I do calculations like you want.

In the mean time if you attach your panel to Axis then you can use the postgui.hal file to connect up things.

Also, I would make the CAM RPM a label not a spin box.

IMHO, if that is all you want to do I would build a stand alone GUI using the Python Interface and Glade.

John
Last edit: 16 Aug 2012 16:36 by BigJohnT.

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

More
16 Aug 2012 18:37 #23310 by wd5jwy
Thanks John. Yes, I've looked through those tutorials some, but I see you have updated them as well. So, I need to go through them again. I'm pretty new to Linux so it's a whole new game for me. I'm used to developing in C, C++ and Assembler - this is a little different.....but a lot of fun. So, I have a bit of a learning curve.

Regarding the CAM RPM spinbox versus a Label. Yes, I thought of that, but there could be instances where I might want to enter a specific RPM for the CAM motor and then use a ratio to calculate the Bobbin RPM (sort of in reverse). So, I would need the ability to manually enter values for either one or the other depending on what I'm trying to do. So, in that case, a label wouldn't work.

I like the idea of using a stand-alone panel, but it doesn't really matter either way. I'm willing to do whatever is quicker and easier just to get the functionality I need. Right now, I just have a prototyping configuration with a set of motor drivers and two motors from Probotix. My first goal is to get the app built and the motors turning somewhere close to what I need.

The real challenge is going to come from attempting to build the coil machine itself. I'll be working with tolerances as small as .0001 inch, which I'm not sure can be achieved in a home workshop - at least with the tools I have available. I do have a benchtop CNC (12X24) from IMService. It works well, but really wasn't intended for cutting parts in steel or aluminum to such close tolerances.

Anyway, I'll go through the tut's - I'm sure I'll have lots more questions.

Thanks

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

More
16 Aug 2012 20:48 #23315 by BigJohnT
In the scenario you describe for the bobbin and cam rpm I would have two boxes one for input of the bobbin rpm and ratio and calculate the cam rpm and a second one to calculate in the reverse direction. This application seems like it should be simple as simple can be. You only need some HAL and a GUI... I think the answer is in GladeVCP but it escapes me now. An interesting challenge... yes I think this can be done with GladeVCP via the command line options. Look in section 4 of the GladeVCP manual. I'll try and cobble something up that just loads a couple of stepgens and a panel as an example.

Oh just don't forget your indents in Python and I think you'll be ok...

John

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

More
17 Aug 2012 00:02 #23320 by BigJohnT
wd5jwy,

I think I found your solution see this thread .

John

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

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