Subroutine GUI

More
04 Apr 2011 19:46 #8524 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
The halui.home-all pin should already exist. No need to create it in the INI. The only pins that can be created by the INI file are the ones called halui.mdi-command.NN

All that should be needed to get a home-all button working is:

INI file:
HALUI = halui

XML file:
<button>
<halpin>"button-name-of-choice"</halpin>
<text>"Any Caption You Want"</text>
</button>

POSTGUI_HAL
net any-signal-name-you-fancy button-name-of-choice => halui.home-all

And that should do it.

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

More
04 Apr 2011 20:22 #8529 by piasdom
Replied by piasdom on topic Re:Subroutine GUI
i think i get it now.
when creating a pin to command use <=
and when creating a link to a command use =>

like;
net any-signal-name-you-fancy button-name-of-choice => halui.home-all

i have;
net remote-home-all halui.home-all <= halui.home-all

but i should have;
net home-button zero-all <= halui.home-all
i had to take the halui.home-all i had in there twice :)

the <= and => doesn't matter :) do i need to put it?

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

More
04 Apr 2011 21:30 #8532 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
piasdom wrote:

i think i get it now.
when creating a pin to command use <=
and when creating a link to a command use =>


No, they mean nothing, really, nothing. They are just to hint to human readers which pins are signal sources, and which pins are being set by those sources.

net remote-home-all halui.home-all <= halui.home-all


That means "create a signal called remote-home-all (which I might want to look at in halscope, or use elsewhere in the HAL file, or in another HAL file) and make it show the value of the halui.home-all pin, then put that value into halui.home-all.
Except that won't work, as halui.home-all is an input pin, so can't set any other pin, not even itself.

The format of a "net" command is, typically,

net random-signal-name existing.source.pin => existing.input..pin1 existing.input.pin2……existing.input.pinN.

You can only ever have one "source" pin. You can have as many input pins as you like.

You can split them over several lines, just use the same signal name in all places, so that line above could have been written:

net random-signal-name existing.source.pin
net random-signal-name existing.input..pin1
net random-signal-name existing.input.pin2

spread throughout all the hal files.

net home-button zero-all <= halui.home-all


No! (but this might be my fault).
net home-button pyvcp.zero-all => halui.home-all

Might be right, what name did you give the button in the XML file?

And feel free to just leave out the => things.

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

More
05 Apr 2011 10:16 - 05 Apr 2011 10:22 #8541 by piasdom
Replied by piasdom on topic Re:Subroutine GUI
well, the pins name is home-all so in the xml.
i took out the <frame> thinking i only needed one, but i tried with and without frame

<pyvcp>
<button>
<halpin>"home-all"</halpin>
<text>"Home All"</text>
<font>('Helvetica',10)</font>
</button>
</pyvcp>

in the custom_postgui
tried
net home-button pyvcp.home-all <=> halui.home-all
then
net home-button halui.home-all <=> pyvcp.home-all
also
net remote-home-button pyvcp.home-all <=> halui.home-all <--does the "remote" need to be part of any name i make up ?
and
net remote-home-button halui.home-all <=> pyvcp.home-all
even tried
net home-button home-all => pyvcp.home-all
net home-button home-all => home-all

in the first button
net remote-rapid-home halui.mdi-command-00 <= pyvcp.rapid-to-home

halui is first(before pyvcp), since i'm doing the opposite , should they be ..... pyvcp.home-all ....... halui.home-all in the format ?

and in the ini i left HOME_ALL

but when nothing worked i made another [HALUI] section (no good), so i left it at one [HALUI]

and in this
net random-signal-name existing.source.pin => existing.input..pin1 existing.input.pin2……existing.input.pinN.

OK, the pin name is halui.home-all.
then i should have net home -all halui,home-all ................... so far i get that.
but why doesn't adding pyvcp.home-all complete the line and work ?
Last edit: 05 Apr 2011 10:22 by piasdom. Reason: thinking

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

More
05 Apr 2011 10:49 #8543 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
Try this:

Comment-out all the new "net" commands by putting a "#" in front of them.

Start EMC2 (it should start at least), if not, report back.

In Axis, go to Machine->show Hal configuration.

Make a very careful note of the names of the relevant halui pins, and the pyvcp pins. Pay special attention to capitals and the difference between "-" and "_" signs. Also make a not of whether each pin is IN or OUT.

Then list them here.

One thing that might be tripping you up is that halui and pyvcp pins don't exist until the gui is active, so anything referencing them need to go in the postgui file. The Postgui file only runs if it is referenced in the INI file (I do hope that isn't the problem we have been overlooking?)
linuxcnc.org/docs/html/config_ini_config...ub:%5BHAL%5D-section

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

More
05 Apr 2011 10:52 #8544 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
piasdom wrote:

net remote-home-button pyvcp.home-all <=> halui.home-all <--does the "remote" need to be part of any name i make up ?


No, you can call the signal my-name-is-tarquin-and-I-am-a-teapot if you like. The name only has to make sense to you. (but can't contain any spaces)

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

More
05 Apr 2011 11:09 - 05 Apr 2011 11:13 #8546 by piasdom
Replied by piasdom on topic Re:Subroutine GUI
there's no home-all pin

XYZ pins
home-sw-in in false
homed out true
homing out false

can't find any reference to pyvcp and halui

The Postgui file only runs if it is referenced in the INI file (I do hope that isn't the problem we have been overlooking?)

this ?

[HAL]
HALFILE = Axis.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
HALUI = halui
Last edit: 05 Apr 2011 11:13 by piasdom.

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

More
05 Apr 2011 11:30 #8548 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
I am baffled.

Can you start up EMC2, then open a terminal window, then type
halcmd show all

and post the output here?

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

More
05 Apr 2011 12:01 #8553 by BigJohnT
Replied by BigJohnT on topic Re:Subroutine GUI
I have verified that the halui.home-all pin only is available if you have home switches and a home sequence set up. Since you don't have home switches there is no home all solution for you. Your only option is to create one button for each axis in your xml file to home it and link the button by using a line similar to this in hal...

net home-x halui.joint.0.home <= pyvcp.my-x-home-button-name

halui.joint.0.home the numbers for the axis are as follows

0 = X
1 = Y
2 = Z

John

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

More
05 Apr 2011 12:26 #8557 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
BigJohnT wrote:

I have verified that the halui.home-all pin only is available if you have home switches and a home sequence set up.

Aha!

Your only option is to create one button for each axis in your xml file to home it and link the button by using a line similar to this in hal.

Actually, I think that:

net home-all pyvcp.home-all => halui.joint.0.home halui.joint.1.home halui.joint.2.home

should work to home all axes from 1 button.
(I am not sure that doing so makes much sense in this case though)

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

Time to create page: 0.094 seconds
Powered by Kunena Forum