linuxcncrsh 'open' path question

More
06 Sep 2013 07:54 #38498 by EasyAs314159
I'm having some issues with the open command in linuxcncrsh. It seems to be ignoring the [DISPLAY]PROGRAM_PREFIX and defaulting to ../../nc_files. I'm having trouble determining which path it is searching in as every path I can think of returns a not found error.

Please Log in or Create an account to join the conversation.

More
06 Sep 2013 14:22 - 06 Sep 2013 22:47 #38503 by ArcEye
Hi

It is not particularly user friendly and that path is hard coded unless you alter it

See the built in help print

Using emcrsh:

emcrsh {-- --port <port number> --name <server name> --connectpw <password>
--enablepw <password> --sessions <max sessions> --path <path>
-ini<inifile>}

With -- --port Waits for socket connections (Telnet) on specified socket, without port
uses default port 5007.
With -- --name <server name> Sets the server name to specified name for Hello.
With -- --connectpw <password> Sets the connection password to 'password'. Default EMC
With -- --enablepw <password> Sets the enable password to 'password'. Default EMCTOO
With -- --sessions <max sessions> Sets the maximum number of simultaneous connextions
to max sessions. Default is no limit (-1).
With -- --path Sets the base path to program (G-Code) files, default is "../../nc_files/".
Make sure to include the final slash (/).

With -- -ini <inifile>, uses inifile instead of emc.ini.


regards

PS

Seem to recall the syntax for the switches is peculiar too
It does require the double dash -- then the ones preceding the switch itself
Note also the ini file is hard coded to 'emc.ini' unless you set it
Last edit: 06 Sep 2013 22:47 by ArcEye.

Please Log in or Create an account to join the conversation.

More
21 Oct 2013 05:41 #40109 by EasyAs314159
Is this option available in linuxcncrsh? The distribution I am using seems to be missing emcrsh.

Please Log in or Create an account to join the conversation.

More
21 Oct 2013 14:44 - 21 Oct 2013 14:48 #40120 by ArcEye
Yes, I was probably using an old development version when I pasted that.

Has been 'rebranded' but still the same.

linuxcncrsh --help
Usage:
linuxcncrsh [Options]
Options:
--help this help
--port <port number> (default=5007)
--name <server name> (default=EMCNETSVR)
--connectpw <password> (default=EMC)
--enablepw <password> (default=EMCTOO)
--sessions <max sessions> (default=-1) (-1 ==> no limit)
--path <path> (default=../../nc_files/)
emcOptions:
-ini <inifile> (default=emc.ini)


It may have changed the dashes before switches however
That was always inexplicable, possibly something to do with the parsing routine used.
Now just -ini has a non standard single dash and prefixing with double dash is not mentioned You may have to experiment to be certain.

regards
Last edit: 21 Oct 2013 14:48 by ArcEye.

Please Log in or Create an account to join the conversation.

More
22 Oct 2013 05:44 #40153 by EasyAs314159
The machine I am running this on needs to be headless so I've tried this in the [DISPLAY] section:
DISPLAY=linuxcncrsh --path ""

however everytime I try and start linuxcnc I get:
linuxcncrsh: invalid option -- 'i'

I have also tried using loadusr in the hal with no luck either

Any other thoughts on what I can try?

Please Log in or Create an account to join the conversation.

More
22 Oct 2013 14:52 #40158 by ArcEye

The machine I am running this on needs to be headless so I've tried this in the [DISPLAY] section:
DISPLAY=linuxcncrsh --path ""

however everytime I try and start linuxcnc I get:
linuxcncrsh: invalid option -- 'i'


You will do, linuxcncrsh is not a GUI, nor is it going to register an instance with linuxcnc.
The error is because the linuxcnc script passes various parameters to the GUI, the first being the name of the ini file.

linuxcncrsh is a remote access and command program, linuxcnc has to be already running on the machine which is connected to

You need to start and run linuxcnc on the remote machine and access it from the client
This may give you some ideas

www.wallacecompany.com/machine_shop/EMC2/remote_notes.html

regards

Please Log in or Create an account to join the conversation.

More
22 Oct 2013 19:54 #40169 by andypugh

The machine I am running this on needs to be headless so I've tried this in the [DISPLAY] section:
DISPLAY=linuxcncrsh --path ""

however everytime I try and start linuxcnc I get:
linuxcncrsh: invalid option -- 'i'


You will do, linuxcncrsh is not a GUI, nor is it going to register an instance with linuxcnc.


You _can_ use DISPLAY = halui for the most minimal (no-GUI) user interface.

Please Log in or Create an account to join the conversation.

More
23 Oct 2013 06:42 #40211 by EasyAs314159
I am using references to the ports and pins halui exposes, when I set [DISPLAY]DISPLAY=halui it complains about missing pins, adding [HAL]HALUI=halui results in error messages about the module already being loaded.

This also doesn't solve the linuxcncrsh path issue as I still need telnet access.

Please Log in or Create an account to join the conversation.

More
23 Oct 2013 06:50 - 23 Oct 2013 16:31 #40212 by andypugh

I am using references to the ports and pins halui exposes, when I set [DISPLAY]DISPLAY=halui it complains about missing pins, adding [HAL]HALUI=halui results in error messages about the module already being loaded.

I think this is a matter of timing. It is trying to net the pins before halui is loaded in the first instance, and trying to load halui twice in the second instance.
You would need to net the halui pins in a Postgui halfile. (And I am not sure that the postgui hal-file ever gets loaded if Halui is the "GUI"

This also doesn't solve the linuxcncrsh path issue as I still need telnet access.

No. In the future there might be more options. The original idea (back in NIST days) was to use RCS / NML as a communication layer.

www.isd.mel.nist.gov/projects/rcslib/NMLcpp.html

(Don't get carried away with studying that, I am not sure how much of it actually works in the current LinuxCNC version, and all of NML is likely to be removed in the future to be replaced with something less strange)
Last edit: 23 Oct 2013 16:31 by andypugh.

Please Log in or Create an account to join the conversation.

More
23 Oct 2013 13:48 #40219 by EasyAs314159
So according to www.linuxcnc.org/docs/devel/html/config/ini_config.html POSTGUI_HALFILE only gets added if DISPLAY is touchy or axis. This explains why my code suddenly stopped working.

I have written a small launch script that basically consists of:
linuxcnc [my ini file] &
halcmd -f custom_postgui.hal

as for the path issue this seems to work:
loadusr linuxcncrsh --path [path] --

Please Log in or Create an account to join the conversation.

Time to create page: 0.107 seconds
Powered by Kunena Forum