how to get the motion cmd?

More
8 years 2 months ago #115409 by myz
Hello everyone, I have a question, I want to know how to implement the functions in the picture in linuxcnc. I want to get the motion command and pass it to ethercat via shm. But I don't know how to achieve it. Who can tell me?

Attachment not found

Please Log in to join the conversation.

More
8 years 2 months ago #115410 by bevins
Replied by bevins on topic how to get the motion cmd?
Checkout the Linuxcnc NML interface.
linuxcnc.org/docs/html/config/python-int...nuxcnc_python_module

A couple places to get you started.

Please Log in to join the conversation.

More
8 years 2 months ago #115411 by myz
Replied by myz on topic how to get the motion cmd?
Thank you for your answer.python_module,i know that.but I want to know if I can use c?

Please Log in to join the conversation.

More
8 years 2 months ago #115427 by bevins
Replied by bevins on topic how to get the motion cmd?
Yes you can. C "cover functions" can be written to give C applications access to NML.The NIST site has code examples.
I don't know if Linuxcnc site goes into detail, but head over to nist.gov site to get started.

Please Log in to join the conversation.

More
8 years 2 months ago #115504 by andypugh
Replied by andypugh on topic how to get the motion cmd?
I am not sure that I fully understand the question, but if "SHM" in this diagram means "shared memory" then the shared-memory layer in LinuxCNC is HAL, and most drivers are HAL modules (written in C)

The LinuxCNC implementation of EtherCAT already exists as a HAL module, so I don't think you need to re-invent anything.

The EtherCAT implementation os not distributed as part of LinuxCNC, partly because of licensing issues with Beckhoff.
Details of the EtherCAT driver here: forum.linuxcnc.org/24-hal-components/223...-driver?limitstart=0

Please Log in to join the conversation.

More
8 years 2 months ago #116046 by myz
Replied by myz on topic how to get the motion cmd?
thanks!

Please Log in to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum