Hi,
First, in your .ini file, I think you've to add the line HALUI = halui just
below the line [HAL], so you will have:
[HAL]
HALUI = halui
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper.hal
HALFILE = standard_pinout.hal
HALFILE = halvcp.hal
This because the hal files are executed in the order in wich they appear,
and I think the same happens with halui, so you're trying to execute
standard_pinout.hal before you've the halui pins you're using in it.
Second, in your pinout.hal, note that in the commands linksp, linkps, the
suffix "ps" or "sp" means "signal-to-pin" or "pin-to-signal" so when you use
them be careful on which order you put the names after. For example, the
line "linkps program-run <= halui.program.run" tries to connect a pin to a
signal but you put in the order a signal and after a pin. Also, remember
that the command "net", needs a name for a signal to use to connect two
pins. So for example in the line "net parport.1.pin-12-in-not
halui.program.run" the signal name is missing.
Try to add this line to your standard_pinout.hal file and remove/comment all
others regarding program run:
net runsignal parport.1.pin-12-in-not halui.program.run
try and see if that work.
Also, it is a very good idea to update to the 2.1.5 release instead to use
the old 2.1
Regards,
Manfredi
My websites: www.m24-pro.com
www.emc2cnc.altervista.org
>From: "Alfred Smart" <[EMAIL PROTECTED]>
>Reply-To: "Alfred Smart" <[EMAIL PROTECTED]>
>To: "Manfredi Leto" <[EMAIL PROTECTED]>
>Subject: Re: [Emc-users] halui.program.run?
>Date: Sun, 6 May 2007 17:02:59 -0400
>
> Here is the standard pin out and ini files
>I'm trying to pull pin 12 low for a cycle start signal
>There aren't many examples of halui interfacing on the archive that I could
>find that use halui.program.run
>
>
># standard pinout config file for 3-axis steppers
># using a parport for I/O
>#
># first load the parport driver
>loadrt probe_parport
>loadrt hal_parport cfg="0x0378 0xDFE0"
>#
># next connect the parport functions to threads
># read inputs first
>addf parport.0.read base-thread 1
># write outputs last
>addf parport.0.write base-thread -1
>#read inputs first
>addf parport.1.read base-thread 1
>#write outputs last
>addf parport.1.write base-thread -1
>
># finally connect physical pins to the signals
>linksp Xstep => parport.0.pin-03-out
>linksp Xdir => parport.0.pin-02-out
>linksp Ystep => parport.0.pin-05-out
>linksp Ydir => parport.0.pin-04-out
>linksp Zstep => parport.0.pin-07-out
>linksp Zdir => parport.0.pin-06-out
>
># create a signal for the estop force false
># alternate for estop force false pin 13 only with no ewrite
>#linkpp parport.1.pin-13-in iocontrol.0.emc-enable-in
>
># connect e-stop write/sense to I/O controller
>newsig EstopSense bit
>newsig EstopWrite bit
>linksp EstopSense <= parport.1.pin-13-in
>linksp EstopSense => iocontrol.0.emc-enable-in
>linksp EstopWrite <= parport.1.pin-16-out
>linksp EstopWrite => iocontrol.0.user-enable-out
>#estop may need to be inverted
>
># create feedhold signal
>newsig feedhold bit
># connect signal to motion control
>linkps motion.feed-hold => feedhold
># conect feedhold to physical pin
>linksp feedhold => parport.1.pin-11-in-not
># or this works too
>#net feedhold parport.1.pin-11-in-not motion.feed-hold
>
> /Tried a few variations
>#newsig program-run bit
>#linkps program-run <= halui.program.run
>#linksp program-run => parport.1.pin-12-in-not
> I get duplicate signal errors when I try to linkpp
>parport.1.pin-12-in-not
>button.program-run
>Has anyone used halui.program.run for a hardware run button?
>
>
>#net halui.program.run parport.1.pin-12-in-not
>#linkpp halui.program.run parport.1.pin-12-in-not
>#net parport.1.pin-12-in-not halui.program.run
>
># create a signal for "spindle brake"
># create a signal for "spindlefwd"
># create a signal for "spindlerev"
>newsig spindle-brake bit
>newsig spindle-forward bit
>newsig spindle-reverse bit
># connect the controller to it
>linkps motion.spindle-brake => spindle-brake
>linkps motion.spindle-forward => spindle-forward
>linkps motion.spindle-reverse => spindle-reverse
># connect it to physical pin
>linksp spindle-brake => parport.1.pin-17-out
>linksp spindle-forward => parport.1.pin-03-out
>linksp spindle-reverse => parport.1.pin-02-out
>
>
># create a signle for mist coolant
># create a signle for flood coolant
>newsig MistOn bit
>newsig FloodOn bit
># connect iocontroler to it
># connect it to a physical pin
>linksp MistOn <= parport.1.pin-08-out
>linksp MistOn => iocontrol.0.coolant-mist
>linksp FloodOn <= parport.1.pin-09-out
>linksp FloodOn => iocontrol.0.coolant-flood
>
># create signals for tool loading loopback
># use sig for tool prep to tool preped
>linkpp iocontrol.0.tool-prepare iocontrol.0.tool-prepared
># creat a signal for toolchange
>newsig changetool bit
>newsig toolchanged bit
># connect iocontroler to it
># connect it to pphyiscal pins
>linksp changetool <= parport.1.pin-04-out
>linksp changetool => iocontrol.0.tool-change
>linksp toolchanged <= parport.1.pin-10-in-not
>linksp toolchanged => iocontrol.0.tool-changed
>
>###
>### You might use something like this to enable chopper drives when machine
>ON
>### the Xen signal is defined in core_stepper.hal
>###
>
># linksp Xen => parport.0.pin-01-out
>
>###
>### If you want active low for this pin, invert it like this:
>###
>
># setp parport.0.pin-01-out-invert 1
>
>###
>### A sample home switch on the X axis (axis 0). make a signal,
>### link the incoming parport pin to the signal, then link the signal
>### to EMC's axis 0 home switch input pin
>###
>
># newsig Xhome bit
># linkps parport.0.pin-10-in => Xhome
># linksp Xhome => axis.0.home-sw-in
>
>###
>### Shared home switches all on one parallel port pin?
>### that's ok, hook the same signal to all the axes, but be sure to
>### set HOME_IS_SHARED and HOME_SEQUENCE in the ini file. See the
>### user manual!
>###
>
># newsig homeswitches bit
># linkps parport.0.pin-10-in => homeswitches
># linksp homeswitches => axis.0.home-sw-in
># linksp homeswitches => axis.1.home-sw-in
># linksp homeswitches => axis.2.home-sw-in
>
>###
>### Sample separate limit switches on the X axis (axis 0)
>###
>
># newsig X-neg-limit bit
># linkps parport.0.pin-11-in => X-neg-limit
># linksp X-neg-limit => axis.0.neg-lim-sw-in
>
># create signal for pos-limits
> newsig pos-limits bit
># connect signal to physical pin
> linkps parport.0.pin-15-in-not => pos-limits
># connect signal to pos-limits
> linksp pos-limits => axis.0.pos-lim-sw-in
> linksp pos-limits => axis.1.pos-lim-sw-in
> linksp pos-limits => axis.2.pos-lim-sw-in
>###
>### Just like the shared home switches example, you can wire together
>### limit switches. Beware if you hit one, EMC will stop but can't tell
>### you which switch/axis has faulted. Use caution when recovering from
>this.
>###
># create signal for neg-limits
> newsig neg-limits bit
># connect signal to physical pin
> linkps parport.0.pin-13-in-not => neg-limits
># create sig for neg-limits switches
> linksp neg-limits => axis.0.neg-lim-sw-in
> linksp neg-limits => axis.1.neg-lim-sw-in
> linksp neg-limits => axis.2.neg-lim-sw-in
>
>
>###
>### you can also use the "net" syntax to accomplish the "newsig" and "link"
>### operations all at once. This command does the same thing as the above
>### block.
>###
>
># net Xlimits parport.pin-13-in => axis.0.neg-lim-sw-in
>axis.0.pos-lim-sw-in
>
>
>
>
> INI File
>
>
># EMC controller parameters for a simulated machine.
>
># General note: Comments can either be preceded with a # or ; - either is
># acceptable, although # is in keeping with most linux config files.
>
># General
>section -------------------------------------------------------------
>[EMC]
>
># Version of this INI file
>VERSION = $Revision: 1.7.4.4 $
>
># Name of machine, for use with display, etc.
>MACHINE = Index CnC Mill
>
>RS274NGC_SARTUP_CODE=G21 G90
>
># Name of NML file to use, default is emc.nml
>NML_FILE = emc.nml
>
># Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
># DEBUG = 0x00000003
># DEBUG = 0x00000007
># DEBUG = 0x7FFFFFFF
>DEBUG = 0
>
># Sections for display
>options ------------------------------------------------
>[DISPLAY]
>
># Name of display program, e.g., xemc
>DISPLAY = tkemc
>
># Cycle time, in seconds, that display will sleep between polls
>CYCLE_TIME = 0.100
>
># Path to help file
>HELP_FILE = tkemc.txt
>
># Initial display setting for position, RELATIVE or MACHINE
>POSITION_OFFSET = RELATIVE
>
># Initial display setting for position, COMMANDED or ACTUAL
>POSITION_FEEDBACK = ACTUAL
>
># Highest value that will be allowed for feed override, 1.0 = 100%
>MAX_FEED_OVERRIDE = 1.2
>
># Lowest value that will be allowed for spindle speed override, 1.0 = 100%
>MIN_SPINDLE_OVERRIDE = 0.6
>
># Highest value that will be allowed for spindle speed override, 1.0 = 100%
>MAX_SPINDLE_OVERRIDE = 1.2
>
>
># Prefix to be used
>PROGRAM_PREFIX = /home/al/emc2/nc_files
>
># Introductory graphic
>INTRO_GRAPHIC = emc2.gif
>INTRO_TIME = 5
>
># Task controller
>section -----------------------------------------------------
>[TASK]
>
># Name of task controller program, e.g., bridgeporttask
>TASK = milltask
>
># Cycle time, in seconds, that task controller will sleep between polls
>CYCLE_TIME = 0.010
>
># Part program interpreter
>section --------------------------------------------
>[RS274NGC]
>
># File containing interpreter variables
>PARAMETER_FILE = stepper.var
>
># Motion control
>section ------------------------------------------------------
>[EMCMOT]
>
>EMCMOT = motmod
>
># Key for real OS shared memory, e.g., for simulated motion
>SHMEM_KEY = 111
>
># Timeout for comm to emcmot, in seconds
>COMM_TIMEOUT = 1.0
>
># Interval between tries to emcmot, in seconds
>COMM_WAIT = 0.010
>
># Base task period, in nano-seconds - this is the fastest thread in the
>machine
>BASE_PERIOD = 50000
># Servo task period, in nano-seconds - will be rounded to an integer
>multiple
># of BASE_PERIOD
>SERVO_PERIOD = 1000000
># Trajectory Planner task period, in nano-seconds - will be rounded to an
># integer multiple of SERVO_PERIOD
>TRAJ_PERIOD = 10000000
>
># Hardware Abstraction Layer
>section --------------------------------------------------
>[HAL]
>
># The run script first uses halcmd to execute any HALFILE
># files, and then to execute any individual HALCMD commands.
>#
>
># list of hal config files to run through halcmd
># files are executed in the order in which they appear
>
>HALFILE = core_stepper.hal
>HALFILE = standard_pinout.hal
>HALFILE = halvcp.hal
>
>
># list of halcmd commands to execute
># commands are executed in the order in which they appear
>#HALCMD = save neta
>
>HALUI = halui
>
>
># Trajectory planner
>section --------------------------------------------------
>[TRAJ]
>
>AXES = 3
># COORDINATES = X Y Z A B C
>COORDINATES = X Y Z
>HOME = 0 0 0
>LINEAR_UNITS = inch
>ANGULAR_UNITS = degree
>CYCLE_TIME = 0.010
>DEFAULT_VELOCITY = 0.0167
>MAX_VELOCITY = 1.2
>DEFAULT_ACCELERATION = 20.0
>MAX_ACCELERATION = 20.0
>
># Axes
>sections ---------------------------------------------------------------
>
># First axis
>[AXIS_0]
>
>TYPE = LINEAR
>HOME = 0.000
>MAX_VELOCITY = 1.2
>MAX_ACCELERATION = 20.0
>STEPGEN_MAXVEL = 1.4
>STEPGEN_MAXACCEL = 21.0
>BACKLASH = 0.000
>INPUT_SCALE = 2000
>OUTPUT_SCALE = 1.000
>MIN_LIMIT = -10.0
>MAX_LIMIT = 10.0
>FERROR = 0.050
>MIN_FERROR = 0.010
>HOME_OFFSET = 0.0
>HOME_SEARCH_VEL = 0.0
>HOME_LATCH_VEL = 0.0
>HOME_USE_INDEX = NO
>HOME_IGNORE_LIMITS = NO
>
># Second axis
>[AXIS_1]
>
>TYPE = LINEAR
>HOME = 0.000
>MAX_VELOCITY = 1.2
>MAX_ACCELERATION = 20.0
>STEPGEN_MAXVEL = 1.4
>STEPGEN_MAXACCEL = 21.0
>BACKLASH = 0.000
>INPUT_SCALE = 2000
>OUTPUT_SCALE = 1.000
>MIN_LIMIT = -10.0
>MAX_LIMIT = 10.0
>FERROR = 0.050
>MIN_FERROR = 0.010
>HOME_OFFSET = 0.0
>HOME_SEARCH_VEL = 0.0
>HOME_LATCH_VEL = 0.0
>HOME_USE_INDEX = NO
>HOME_IGNORE_LIMITS = NO
>
>
># Third axis
>[AXIS_2]
>
>TYPE = LINEAR
>HOME = 0.0
>MAX_VELOCITY = 1.2
>MAX_ACCELERATION = 20.0
>STEPGEN_MAXVEL = 1.4
>STEPGEN_MAXACCEL = 21.0
>BACKLASH = 0.000
>INPUT_SCALE = 2000
>OUTPUT_SCALE = 1.000
>MIN_LIMIT = -2.0
>MAX_LIMIT = 4.0
>FERROR = 0.050
>MIN_FERROR = 0.010
>HOME_OFFSET = 0.0
>HOME_SEARCH_VEL = 0.0
>HOME_LATCH_VEL = 0.0
>HOME_USE_INDEX = NO
>HOME_IGNORE_LIMITS = NO
>
>
># section for main IO controller
>parameters -----------------------------------
>[EMCIO]
>
># Name of IO controller program, e.g., io
>EMCIO = io
>
># cycle time, in seconds
>CYCLE_TIME = 0.100
>
># tool table file
>TOOL_TABLE = sim.tbl
>
>
>----- Original Message -----
>From: Manfredi Leto <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Sunday, May 06, 2007 4:08 PM
>Subject: RE: [Emc-users] halui.progeam.run?
>
>
> > Hi
> >
> > Are you using Ubuntu 5.1? And what version of EMC2?
> > I think halui is available only after the 2.1 (but I'm not sure).
> > Also, please post your entire .ini file and pinout hal file.
> >
> > Regards,
> >
> > Manfredi
> >
> >
> > My websites: www.m24-pro.com
> > www.emc2cnc.altervista.org
> >
> >
> >
> >
> >
> > >From: "Alfred Smart" <[EMAIL PROTECTED]>
> > >Reply-To: Alfred Smart <[EMAIL PROTECTED]>,"Enhanced Machine Controller
> > >(EMC)" <[email protected]>
> > >To: <[email protected]>
> > >Subject: [Emc-users] halui.progeam.run?
> > >Date: Sun, 6 May 2007 10:10:23 -0400
> > >
> > > Is there a way to link a signal from parport to halui.program.run to
>use
> > >a momentary switch for run?
> > >I've tried but just can't seem to get it.
> > >Using standard_pinout net halui.program.run parport.1.pin-12-in-not
> > >ties it to the parport to but the program still will only run from
>halui
>or
> > >tkemc run buttons
> > >EMC2 live 5.1install
> > >Thanks
> >
> >
> >
> >-------------------------------------------------------------------------
> > >This SF.net email is sponsored by DB2 Express
> > >Download DB2 Express C - the FREE version of DB2 express and take
> > >control of your XML. No limits. Just data. Click to get it now.
> > >http://sourceforge.net/powerbar/db2/
> >
> >
> > >_______________________________________________
> > >Emc-users mailing list
> > >[email protected]
> > >https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today it's FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users