Can Real Time Components read shared memory?

More
6 years 4 months ago #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
Code:
#include <motion.h> extern struct emcmot_status_t *emcmotStatus;

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

Is there a way to achieve this? Or is it off limits?

Please Log in to join the conversation.

More
6 years 4 months ago #170356 by tommylight
Notice the upper and lower case letters, might be just that.

Please Log in to join the conversation.

More
6 years 4 months ago #170364 by rodw
nah more than that, I cut and pasted from the source code

Please Log in to join the conversation.

More
6 years 4 months ago #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 to join the conversation.

More
6 years 4 months ago #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.

Please Log in to join the conversation.

Time to create page: 0.352 seconds
Powered by Kunena Forum