no axis values with linuxcncrsh

More
25 Jan 2021 13:15 #196526 by Jeni59
Hi there
I am trying to read the axis values with a program via "linuxcncrsh" on linuxcnc 2.8.1. An axis GUI is running. I see values, for example X = 1,000, but a query like "get abs_act_pos \ n", "get rel_act_pos \ n", "get joint_pos \ n", "get pos_offset \ n" or "get joint_limit 0 \ n" comes in string "get abs_act_pos ABS_ACT_POS 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000". E.g. other commands work e.g. "set mode mdi \ n" and "set mdi g0x1 \ n".
What could I be doing wrong?
Attachments:

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

More
26 Jan 2021 15:56 #196629 by andypugh
linuxcncrsh uses emcsh. (or maybe linuxcncsh).
So, does the local version work?
(I can't find any docs for emcsh, though)

I did wonder if the code was actually missing, but here it is.
github.com/LinuxCNC/linuxcnc/blob/master..._intf/emcsh.cc#L1238

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

More
26 Jan 2021 16:11 #196631 by dgarrett
The source file is named emcrsh.c (not emcsh.cc)
The executable is named linuxcncrsh
github.com/LinuxCNC/linuxcnc/blob/2.8/sr...c/usr_intf/emcrsh.cc
(emcsh.cc is used for tcl interfaces)

The man page for linuxcncrsh is in the usual place:
linuxcnc.org/docs/2.8/html/man/man1/linuxcncrsh.1.html

There are also some working examples in the tests directory,
example:
github.com/LinuxCNC/linuxcnc/tree/2.8/tests/linuxcncrsh

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

More
26 Jan 2021 16:58 #196634 by andypugh

The source file is named emcrsh.c (not emcsh.cc)


Yes, but the functions (such as (emc_)abs_act_pos are in emcsh.cc.

ie, emcrsh.cc is a wrapper to provide remote access to emcsh.cc

linuxcncrsh is documented, linuxcncsh isn't. (other than a placeholder I made for the 2.8 release)

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

More
26 Jan 2021 18:48 - 26 Jan 2021 18:52 #196644 by Jeni59
Hello everybody
Thank you very much, I fetched and created the whole project from scratch with git clone. No success, exactly the same as before, i.e. no axis values (all 0.000000)! Other commands work fine, (haven't checked all of them yet)
What I have found: If I start linuxcncrsh from the installed version linuxcnc, ie "/bin/linuxcncrsh", then it works as expected. If I copy the newly created linuxcncrsh into the /bin directory, it doesn't work either! I don't understand yet. I've only recently started working with the linuxcnc source code. If I have the time, I will follow it up. At the moment it's good for me.
thanks again
Ulrich


the picture is of the installed version /bin/linuxcncrsh

Attachments:
Last edit: 26 Jan 2021 18:52 by Jeni59.

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

More
30 Jul 2021 05:12 #216304 by curran209
I am using linuxcncrsh,too.
Is this problem fixed?
is linuxcncrsh ok over network?

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

More
30 Jul 2021 12:36 #216344 by andypugh
Linuxcncrsh is intended to be used over a network, the "rsh" stands for "remote shell"

I don't see any evidence of changes to the source files, so I imagine that if there was a problem it still exists.

If it does, can you raise an issue on the issue tracker?
github.com/LinuxCNC/linuxcnc/issues

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

Time to create page: 0.134 seconds
Powered by Kunena Forum