how to get the motion cmd?

More
02 Aug 2018 15:26 #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?
Attachments:

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

More
02 Aug 2018 15:41 - 02 Aug 2018 15:47 #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.
Last edit: 02 Aug 2018 15:47 by bevins.

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

More
02 Aug 2018 15:56 #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 or Create an account to join the conversation.

More
02 Aug 2018 18:35 #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 or Create an account to join the conversation.

More
03 Aug 2018 12:30 #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
The following user(s) said Thank You: myz

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

More
14 Aug 2018 13:31 #116046 by myz
Replied by myz on topic how to get the motion cmd?
thanks!

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

Time to create page: 0.082 seconds
Powered by Kunena Forum