Interrogating LinuxCNC for realtime information (position, etc.)

More
30 Apr 2018 23:04 #109875 by ericm
What's the best way to get realtime information about position, velocity, program line number, etc. from LinuxCNC? I want to be able to take this data and send it to another server for display on an operational dashboard. I've been poking around and it seems like there are a ton of ways to do this, but I'm not sure what would be the best. In this case, "best" is a combination of easiest, least likely to break in the future, and that puts the least load on the processor.

Thanks in advance!

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

More
More
09 May 2018 11:53 #110423 by andypugh

What's the best way to get realtime information about position, velocity, program line number, etc. from LinuxCNC? I want to be able to take this data and send it to another server for display on an operational dashboard. I've been poking around and it seems like there are a ton of ways to do this, but I'm not sure what would be the best.


One very easy way is to ssh in to the LinuxCNC machine and "halcmd loadusr halmeter".
I do that quite often, typically to monitor motion.program-line to see when the machine is finished or waiting for a (manual) tool change.
You can look at any HAL pin this way, and can open mutliple instances of halmeter.

A very similar way would be to create a custom Glade panel with pins that link to the HAL pins of interest, and then to load that in a remote X session on the other machine (halcmd loadusr gladevcp mypanel...).
I think that you could relatively easily have the Glade panel link its own pins, but there is also the option of having it poll linuxnc_stat
linuxcnc.org/docs/2.7/html/config/python...ding_linuxcnc_status

Or your remote widget could send linuxcncrsh commands and parse the return values:
linuxcnc.org/docs/2.7/html/man/man1/linuxcncrsh.1.html

As you say, there are lots of ways to do this. Halmeter is the least work. (because it is no work)
The following user(s) said Thank You: ericm

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

More
11 May 2018 02:07 #110557 by ericm
Thanks! That's exactly the info was looking for.

Cheers,
Eric

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

Time to create page: 0.104 seconds
Powered by Kunena Forum