Subroutine GUI

  • piasdom
  • New Member
  • New Member
More
15 years 6 months ago #8511 by piasdom
Replied by piasdom on topic Re:Subroutine GUI
and i found this

net <signal-name> <pin-name> <opt-direction> <opt-pin-name>

net both-home-y <= parport.0.pin-11-in

what the
<signal-name> = both-home-y
<pin-name> =
is the <= between here ?
<opt-direction> =
<opt-pin-name> =

from above. they're 4 "names" in the format, but only 3 "names" in the connection.

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

More
15 years 6 months ago - 15 years 6 months ago #8512 by BigJohnT
Replied by BigJohnT on topic Re:Subroutine GUI
In the example:

net both-home-y <= parport.0.pin-11-in

<signal-name> = both-home-y
<opt-direction> = <= which does nothing at all and can be left out
<pin-name> = parport.0.pin-11-in
<opt-pin-name> = none in this case

Only two "names" are in the above net command. One is the signal name and one is the pin name. The signal name can be almost anything and the pin name has to be a valid pin name.

opt- means it is optional to use them.

John
Last edit: 15 years 6 months ago by BigJohnT.

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

More
15 years 6 months ago #8518 by andypugh
Replied by andypugh on topic Re:Subroutine GUI
piasdom wrote:

in the ini you typed MDI_COMMAND = G0 x0 y0 z0.
so i would write HOME_ALL = g0 X? Y? X? in my ini?


halui has many, many pins. (it is also optional, which is why you need to ensure it loads with the HALUI=halui INI file parameter)
JT has posted a link to the listing.
You can, however, add even more:

For every MDI_COMMAND {Some G-Code} line you add to your INI file, an extra pin is created called halui.mdi-command-NN where NN starts at 00 and increments for every MDI_COMMAND line.

Any time that you set the halui.mdi-command-NN pin to high (from low) the bit of G-code in the MDI_COMMAND line is run (note, this only happens in manual mode, not when running a progam)

You can set the pin high from the command line (and that can be useful) but generally you do it by linking it, in the HAL file, to a pin which is in turn linked to a PYVCP GUI button.

However, MDI_COMMANDs can only be G-code (subroutine calls (O<mysub> CALL ) are valid, incidentally). If you want a non-G-code result, like home-all then there are other halui pins that you can link to the PYVCP button, like halui.home-all.

Yes, it _is_ complicated.

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

  • piasdom
  • New Member
  • New Member
More
15 years 6 months ago #8519 by piasdom
Replied by piasdom on topic Re:Subroutine GUI
THANKS. that helped a lot. (really:)
i think my trouble is naming it in the ini.
i don't understand why you had halui.mdi-command-00 in the customhal
and MDI_COMMAND in the ini. should i write HOME_ALL = ?????
or as it's written in the customhal - home all = ?????
i've tried both. pins still does not exist. i see the home all pin in the link you gave me,
and i think i have everything else right. just can't get this naming in the ini.

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

More
15 years 6 months ago #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.

  • piasdom
  • New Member
  • New Member
More
15 years 6 months ago #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.

Time to create page: 0.067 seconds
Powered by Kunena Forum