Can Real Time Components read shared memory?

More
06 Jun 2020 12:13 - 06 Jun 2020 12:13 #170355 by rodw
Hi I was hoping I could access the state tags structure from a component written in C
But this is not valid
#include <motion.h>
extern struct emcmot_status_t *emcmotStatus;

It compiles OK but I get this error at run time
tags: dlopen: /home/rod/linuxcnc-dev/rtlib/tags.so: undefined symbol: emcmotStatus

Is there a way to achieve this? Or is it off limits?
Last edit: 06 Jun 2020 12:13 by rodw.

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

More
06 Jun 2020 12:16 #170356 by tommylight
Notice the upper and lower case letters, might be just that.
The following user(s) said Thank You: rodw

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

More
06 Jun 2020 13:22 #170364 by rodw
nah more than that, I cut and pasted from the source code

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

More
06 Jun 2020 14:34 #170368 by rodw
I tried adding a pin in motion.c and I got an error that indicates that data is not in shared memory so back to the drawing board. Too late now!

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

More
07 Jun 2020 02:17 #170434 by rodw
I had better luck today (After about 3 hours studying the code). At least I can retrieve some State Tags fields into motion.
forum.linuxcnc.org/24-hal-components/392...the-current-feedrate

Next step is to try and publish them as pins in motion.
The following user(s) said Thank You: tommylight, Aciera

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

Time to create page: 0.214 seconds
Powered by Kunena Forum