Menu

#229 o-word file call is ignored

open
nobody
5
2014-08-24
2010-03-02
No

o-word file call is ignored

here's the main file called 'thiscallssubfile.ngc'

f100
g90 g21 g01 g17
g0 x0 y0 z10 f30
o<xxx> call
g0 z10
m2

heres the called file, it is named xxx.ngc

o<xxx> sub
g91g21f30
g1 z-.5
x.5
g02 i-.5 j0
g0 z.1
x0 y0
o<xxx> endsub
M2

both files are in the correct place (afik and both can be called up from axis file dialog)
the format seems to follow the rules on http://www.linuxcnc.org/docview/html//gcode_main.html#cha:O-Codes

Discussion

  • Jeff Epler

    Jeff Epler - 2010-03-02

    In your inifile, make sure the PROGRAM_PREFIX is specified as a full path and does not use the "home directory" syntax such as ~/emc2/nc_files. When PROGRAM_PREFIX contains ~ the GUIs treat it properly when determining the initial directory for the dialog, but the interpreter does not perform the necessary special treatment.

    If this configuration change doesn't resolve the problem, then please provide additional information. First, what is your [DISPLAY]PROGRAM_PREFIX? Second, some diagnostic information that will tell me what files the interpreter is attempting to open. Install the package "strace" if you don't yet have it. Run emc. Open a terminal, and run
    strace -o read -p `pidof milltask`
    then run thiscallssubfile.ngc and show me the results. The result will look something like this:
    open("sim.var.bak", O_RDONLY) = 4
    ...
    open("/net/filesrv1/sd3a/users/jepler/emc2-dev/nc_files/main.ngc", O_RDONLY) = 3
    open("/usr/local/jepler/src/emc2/configs/sim/~/xxx.ngc", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/xxx.ngc", O_RDONLY) = -1 ENOENT (No such file or directory)
    ...
    where the lines about .ngc files are the interesting ones.

     
  • staggerlyTom

    staggerlyTom - 2010-03-02

    re: 'o-word file call is ignored'
    Jeff, all ok now

    the .ini did have fqfn for PROGRAM_PREFIX = /home/tomp/emc2/nc_files
    but
    the emc being run was a rip, in another directory /home/tomp/emc2-dev/

    the rip version (/home/tomp/emc2-dev/..) displayed the config from the other dir (/home/tomp/emc2/..)
    and it was displayed as being in another directory

    despite the PROGRAM_PREFIX being complete and unambiguous, i think it got mangled

    FIX:
    move the config directory to the rip .../emc2-dev/ branch
    and
    copy the main & sub progs to the rip .../nc_files/ branch
    now the o-word filename is satisfactory and subprogram file calls work fine

    thanks very much, your que lead to simplifying the problem and making a solution

    i think i may have circumvented a problem by moving files
    it was not a relative path, no ',.' , no ~ no symlinks
    yet the files were not found

    do you still want the strace output?
    (maybe the circumstances make sense to you already)

    tomp