On Wednesday 20 April 2016 11:31:28 [email protected] wrote:

> So you're saying [HALUI] in a supplemental .ini file?
> Alright, that sounds like the problem!
>
Not supplemental, but in the ini file as a marked [HALUI] section.
Taken from the top of my ini file, the important parts:
=====================SOF===============
[DISPLAY]
DISPLAY = axis
PYVCP = pyvcp-panel.xml
====================EOF===============
this pyvcp_panel.xml was a community developed file, a bit long, but here 
it is after I elide some commented out code:
====================SOF==================
<U+FEFF><?xml version='1.0' encoding='UTF-8'?>

<pyvcp>
<!-- 
Include your PyVCP panel here.
The contents of this file will not be overwritten when you run stepconf 
again.
-->
<!-- the RPM meter -->
  <hbox>
    <relief>RAISED</relief>
    <bd>3</bd>
    <meter>
      <halpin>"spindle_rpm"</halpin>
      <text>"Spindle"</text>
      <subtext>"RPM"</subtext>
      <size>235</size>
      <min_>0</min_>
      <max_>2750</max_>
      <majorscale>500</majorscale>
      <minorscale>100</minorscale>
      <region1>0,2250,"green"</region1>
      <region2>2250,2600,"yellow"</region2>
      <region3>2600,2750,"red"</region3>
    </meter>
  </hbox>

<hbox>
  <vbox>
    <relief>RAISED</relief>
    <bd>2</bd>
    <label>
      <text>"SPWR"</text>
      <font>("Helvetica",12)</font>
    </label>
    <rectled>
      <halpin>"on-led"</halpin>
      <height>"20"</height>
      <width>"72"</width>
      <on_color>"green"</on_color>
      <off_color>"red"</off_color>
    </rectled>
  </vbox>

  <vbox>
    <relief>RAISED</relief>
    <bd>2</bd>
    <label>
      <text>"FWD"</text>
      <font>("Helvetica",12)</font>
    </label>
    <rectled>
      <halpin>"fwd-led"</halpin>
      <height>"20"</height>
      <width>"72"</width>
      <on_color>"green"</on_color>
      <off_color>"red"</off_color>
    </rectled>
  </vbox>

  <vbox>
    <relief>RAISED</relief>
    <bd>2</bd>
    <label>
      <text>"REV"</text>
      <font>("Helvetica",12)</font>
    </label>
    <rectled>
      <halpin>"rev-led"</halpin>
      <height>"20"</height>
      <width>"72"</width>
      <on_color>"green"</on_color>
      <off_color>"red"</off_color>
    </rectled>
  </vbox>
</hbox>
<!-- The following is added to your .xml file inside the <pyvcp> </pyvcp> 
tags --> 
<!-- here we have to re-invent the camview missing stuffs -->
  <labelframe text="Calibrate machine">
    <button>
      <halpin>"checkbutton1"</halpin>
      <text>"CamOn"</text>
      <font>('Helvetica',10)</font>
    </button>
    <hbox>
      <button>
        <halpin>"button1"</halpin>
        <text>"CamOff"</text>
        <font>('Helvetica',10)</font>
      </button>
      <button>
        <halpin>"button2"</halpin>
        <text>"CamStor"</text>
        <font>('Helvetica',10)</font>
      </button>
      <button>
        <halpin>"button3"</halpin>
        <text>"CamCtr4"</text>
        <font>('Helvetica',10)</font>
      </button>
    </hbox>
  </labelframe>
  
<!-- and last, the alignment stuff -->

  <labelframe text="Align Sheet">
    <button>
        <halpin>"align-start"</halpin>
        <text>"Align Start"</text> 
        <font>('Helvetica',10)</font>
    </button>
    <hbox>    
    <button>
        <halpin>"align-y"</halpin>
        <text>"Align Y"</text> 
        <font>('Helvetica',10)</font>
    </button>    
    <button>
        <halpin>"align-x"</halpin>
        <text>"Align X"</text> 
        <font>('Helvetica',10)</font>
    </button>    
    </hbox>
    <button>
         <halpin>"clear-offset"</halpin>
         <text>"Clear Offset"</text> 
         <font>('Helvetica',10)</font>
    </button>    
  </labelframe>
</pyvcp>
================EOF=============== 

then later,
Example from my .ini for a G0704 I'm still tuning for original mistakes.
==================SOF===============
[HAL]
HALUI = halui
HALFILE = GO704fast.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]
MDI_COMMAND=o<_camon> call
MDI_COMMAND=o<_camoff> call
MDI_COMMAND=o<_camstore> call
MDI_COMMAND=o<_camcenter3> call
MDI_COMMAND=o<_camcenter4> call
MDI_COMMAND=o<align_start> call
MDI_COMMAND=o<align_y> call
MDI_COMMAND=o<align_x> call
MDI_COMMAND=o<clear_offset> call

Those are all subroutine calls whose links are created by the postgui 
files that also add a tach, spindle power & direction tallies, and a 
series of clickable buttons that will execute those above HALUI 
commands.

postgui_call_list.hal:
source postgui.hal

This may not be 100% correct as its being taken out of context, but it 
should serve as a somewhat poor tutorial to show what can be done.  I've 
abused the list enough by posting the .xml file already.

> Are there more elements which will only work if placed in the main
> .ini file?
>
> layout20.ini has [XHC_HB04_BUTTONS], [EMC], [HAL], [XHC_HB04_CONFIG],
> and [APPLICATIONS].
>
> I'm guessing [EMC] and [HAL] need to be in the main .ini, right?  What
> about [APPLICATIONS]?
>
>
> [XHC_HB04_BUTTONS]
> step        = xhc-hb04.stepsize-up
> spindle     = halui.spindle.start
>
> So, the step size did not go up when I pressed the button.  Spindle
> didn't start.  Those are NOT an MDI, so I still have another problem,
> right?  What might it be?

Best guess is that the action from the jog wheel kit is not all properly 
linked in your hal file. Clear dmesg by running it as root 
with "dmesg -c", then run LCNC and stop it after its finished loading, 
then run as root, "dmesg". Screen copy it to get a list of everything it 
found, then check your hal file to see if its in there, both as a source 
for a "net" "name" "source_of_sig" "where_it_goes". The latter can be a 
space/tab separated list. If the list is too long, add another 
identical "net name" line anyplace below the first one, and continue 
your list of "where_it_goes".  Hal will append them when the duplicate 
net name is found later.

> Danny
>
> ---- andy pugh <[email protected]> wrote:
> > On 20 April 2016 at 07:29, Danny Miller <[email protected]>
> > wrote: IIRC the halui.mdi-command-01 etc didn't seem to exist under
> > halui.
>
> Those pins are created by halui based on the MDI_COMMAND entries in
> the [HALUI] section of the main INI file.
>
> So, you need to find or create a [HALUI] section in your main .ini
> file (as many as you need) and each one will define a single-line
> G-code command that will be run when the corresponding HAL pin is
> triggered.
>
> http://linuxcnc.org/docs/2.7/html/config/ini-config.html#_halui_sectio
>n
>
> For more complex actions your MDI_COMMAND can be a subroutine call
> such as O<machine_interocitor> CALL


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to