On Tuesday, October 05, 2010 12:38:54 pm Igor Chudov did opine: > I would like to respectfully disagree. > > I do not see why one needs to run as root just to solve basic > permissions or path issues. > > And I also do not see why being on the internet is going to ruin > latency. > > Additionally, being on the internet would enable one to get system > updates. > I have to agree with Igor here. Emc runs as well from a user account as it does from root, permissions problems are, with all due respect, usually caused by mucking about in the user account while root. We call that PEBKAC.
AND the machine being on the internet has no apparent/detectable by me effect on latency. I have had konversation going and logging the emc channel, browsed the web (usually to the emc wiki pages for coding help) and or edited gcode, all while my machine was busy carving something. And its only an XP1400 runing at 1600 mhz, with half a gig of ram. > i > > On Tue, Oct 5, 2010 at 11:11 AM, Schooner <[email protected]> wrote: > >> �Because of this I also tried a bash script > >> �that called the C program and got the same result (no response). > >> Both work �from the command line. �I get no errors from EMC2. > >> > >> �I have entered a echo command in the bash script that is shown when > >> I run it �from the command prompt. When run from EMC2 should it > >> appear in a terminal �window? > > > > Hi > > > > I think you are heading down the classic ladder path to achieve your > > overall end, but I don't recall seeing your having solved the initial > > problem of executing scripts etc from a M1XX command. > > > > I had some problems getting hal commands to run within a bash script > > called from M1xx, a while ago. > > > > First off, unless your controller computer is permanently connected to > > the internet, (why would you, hardly going to improve latency) �just > > log in as, install as and run everything as root. > > Sorts out all the problems with permissions, ownership etc. �The > > 'middle-man will get you' paranoids will argue against it, but for a > > stand alone computer, I really do not see the problem. > > > > Obviously ensure that M1xx file is in the path pointed to by > > PROGRAM_PREFIX in your .ini file > > If somehow you have 2 entries in your .ini file, EMC only reads the > > first one. > > Wonder how I found that out! > > > > If you launch EMC as child process within a terminal (ie without the > > trailing & ) you will get stderr etc from emc and any processes > > launched from within it, eg bash or your C program. > > It was seeing this and using debug outputs, that enabled me to > > discover that EMC reads M101 P3 and then passes 3.000000 instead of > > just 3, to my M101 script! > > > > As an example the below M101 script uses calls to halcmd to adjust the > > scale and stepgen associated with my spindle, to account for pulley > > changes. > > > > regards > > > > Schooner > > > > /#!/bin/bash > > > > ## sets scale gain to make output speed accurate > > ## for each of 4 pulley settings > > > > if [ ! $# == 1 ]; then > > � echo "Usage: M101 n - where n is speed range 1 - 4" > > � exit 1 > > fi > > > > ## emc takes the M101 P3 for example and passes 3.000000 > > ## to this script!!! > > ## need to convert first > > > > float=$1 > > int=${float/\.*} > > # DEBUG � �echo "$float converted to $int" > > > > > > case $int in > > > > � � 1 ) halcmd setp scale.0.gain 0.8 > > � � � � halcmd setp stepgen.4.maxvel 2400;; > > > > � � 2 ) halcmd setp scale.0.gain 1.24 > > � � � � halcmd setp stepgen.4.maxvel 1200;; > > > > � � 3 ) halcmd setp scale.0.gain 3.55 > > � � � � halcmd setp stepgen.4.maxvel 600;; > > > > � � 4 ) halcmd setp scale.0.gain 6 > > � � � � halcmd setp stepgen.4.maxvel 300;; > > esac > > > > exit 0/ > > > > ---------------------------------------------------------------------- > > -------- Beautiful is writing same markup. Internet Explorer 9 > > supports standards for HTML5, CSS3, SVG 1.1, �ECMAScript5, and DOM L2 > > & L3. Spend less time writing and �rewriting code and more time > > creating great experiences on the web. Be a part of the beta today. > > http://p.sf.net/sfu/beautyoftheweb > > _______________________________________________ > > Emc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > ------------------------------------------------------------------------ > ------ Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) It takes a special kind of courage to face what we all have to face. ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
