Jack Ensor wrote:
> Unfortunately it crashed.
> Could anyone see why this failed to run and what it takes to fix it?
> It ran fine before my mods.
> 
> [EMAIL PROTECTED]:~$ cd /
> [EMAIL PROTECTED]:/$ emc /home/jack/emc2/MyConf/BP.ini
> EMC2 - 2.1.0
> Machine configuration directory is '/home/jack/emc2/MyConf'
> Machine configuration file is 'BP.ini'
> Starting EMC2...
> .
> libnml/cms/cms_cfg.cc 624: cms_config: can't open 'emc.nml'. Error = 2 -- No
> such file or directory

(snipped a bunch of additional messages)

Is there a file called "emc.nml" in the same directory as the rest of 
the configuration?  (/home/jack/emc2/Myconf/emc.nml)

Did the unmodified configuration work IN THAT DIRECTORY, and only break 
after you modified it?  If so, then we need to look at your mods.  But 
if the only working configurations are the ones in the EMC2 sample 
directory, then maybe something went wrong during the copy.

> I had modified stepper_inch.ini to the following: 
> 
> BP.ini
> 
> #+ Name of display program, e.g., xemc
> DISPLAY =              axis
> # DISPLAY =              usrmot
> # DISPLAY =              mini
> # DISPLAY =           tkemc
> 
> #- Path/name of help file
> HELP_FILE =             /doc/help.txt
> 
> HALFILE =               Mycore_stepper.hal
> #HALFILE =               xylotex_pinout.hal
> HALFILE =               pinout.hal
> 

Nothing there that would cause the error you are seeing.

> and core_stepper.hal to the following:

> 
> Mycore_stepper.hal
> 
> # stepper module, three step generators, all three using step/dir
> loadrt stepgen step_type=2,2,2
> 
> # connect signals to step pulse generator outputs
> newsig X_phaseA bit
> newsig X_phaseB bit
> newsig Y_phaseA bit
> newsig Y_phaseB bit
> newsig Z_phaseA bit
> newsig Z_phaseB bit
> linkps stepgen.0.phaseA X_phaseA
> linkps stepgen.0.phaseB X_phaseB
> linkps stepgen.1.phaseA Y_phaseA
> linkps stepgen.1.phaseB Y_phaseB
> linkps stepgen.2.phaseA Z_phaseA
> linkps stepgen.2.phaseB Z_phaseB

Seems correct.

> and standard_pinout.hal to the following:
> 
> 
> 
> # first load the parport driver
> loadrt hal_parport cfg="0x0378" "0xdff0"
> #
> # next connect the parport functions to threads
> # read inputs first
> addf parport.0.read base-thread 1
> addf parport.1.read base-thread 1
> # write outputs last
> addf parport.0.write base-thread -1
> addf parport.1.write base-thread -1
> #
> # finally connect physical pins to the signals
> linksp X_phaseA => parport.0.pin-01-out
> linksp X_phaseA => parport.0.pin-02-out-invert
> linksp X_phaseB => parport.0.pin-03-out
> linksp X_phaseB => parport.0.pin-04-out-invert
> linksp Y_phaseA => parport.0.pin-06-out
> linksp Y_phaseA => parport.0.pin-07-out-invert
> linksp Y_phaseB => parport.0.pin-08-out
> linksp Y_phaseB => parport.0.pin-09-out-invert
> linksp Z_phaseA => parport.1.pin-01-out
> linksp Z_phaseA => parport.1.pin-02-out-invert
> linksp Z_phaseB => parport.1.pin-03-out
> linksp Z_phaseB => parport.1.pin-04-out-invert
> 
> linksp Xen => parport.0.pin-05-out
> linksp Yen => parport.0.pin-10-out
> linksp Zen => parport.1.pin-05-out
> #

Some errors here, but nothing that would cause the emc.nml problem.
Once you solve the emc.nml issue, you will have to fix this:

For each quadrature signal, you have two lines:
     linksp X_phaseA => parport.0.pin-01-out
     linksp X_phaseA => parport.0.pin-02-out-invert

The second line is illegal - "pin-xx-out-invert" is not a HAL pin, it is 
a parameter that can be used to modify the behavior of a parport pin.
The first line is legan, and will send X_phaseA out of pin 1 of the 
parport.  Thte second line will cause an error.  I don't know what you 
are trying to accomplish here.  If you simply want to invert the signal 
on pin 1, you would set the -invert parameter for pin 1 to TRUE:

     linksp X_phaseA => parport.0.pin-01-out
     setp parport.0.pin-01-out-invert TRUE

If you are trying to use two pins for each signal, one inverted and one 
not, you would do this:

     linksp X_phaseA => parport.0.pin-01-out
     linksp X_phaseA => parport.0.pin-02-out
     setp parport.0.pin-02-out-invert TRUE

The first two lines send the signal to pins 1 and 2 of the parport.
The third line inverts pin 2.

> Here is what was in emc_debug.txt:
> 
> 
> Can not find -sec HAL -var HALUI -num 1 
> Stopping realtime threads
> Unloading hal components
> 1820
>   PID TTY      STAT   TIME COMMAND
> 
> 
> and here is what was in emc_print.txt:
> 
> 
> RUN_IN_PLACE=no
> EMC2_DIR=
> EMC2_BIN_DIR=/usr/bin
> EMC2_TCL_DIR=/usr/share/emc/tcl
> EMC2_SCRIPT_DIR=
> EMC2_RTLIB_DIR=/usr/realtime-2.6.15-magma/modules/emc2
> EMC2_CONFIG_DIR=
> EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
> INIVAR=/usr/bin/inivar
> HALCMD=/usr/bin/halcmd
> EMC2_EMCSH=/usr/bin/emcsh
> EMC2_IOSH=/usr/bin/iosh
> 
> I would appreciate any comments as to what I must do to fix this?

The important error message is the very first one:

"libnml/cms/cms_cfg.cc 624: cms_config: can't open 'emc.nml'. Error = 2
-- No such file or directory"

You need a "emc.nml" file in your configuration directory.  That 
directory is was identified by this message:

"Machine configuration directory is '/home/jack/emc2/MyConf'"

How did you get your ini and HAL files into that directory?  If you 
copied them manualy, you forgot to copy emc.nml.  If they were copied 
automatically, then maybe there is a bug in the copying code.  That is 
unlikely though - lots of other people have used it with no problems.

> And by the way, what is the difference between the 2 hal commands:  linksp  
> and 
> linkps

linksp links a Signal to a Pin
linkps links a Pin to a Signal

The only difference is the order of the arguments.

     linkps foo bar

is exactly the same as

     linksp bar foo

All of this information is in the documentation.  In the case of the 
linkps/linksp thing, the halcmd man page covers it.  (online version at 
http://www.linuxcnc.org/docs/2.1/html/man/man1/halcmd.1.html), or 'man 
halcmd' from the command line.)  The built-in help for halcmd ('halcmd 
help linkps') also explains it.

Regards,

John Kasunich


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to