Best way to do external controls for LinuxCNC

More
5 years 1 month ago #219552 by FDP
I would like to set up a prototyping/development environment that feeds from Rhino/Grasshopper into LinuxCNC. The goal is to do development inside Grasshopper and then move code over to LCNC. What is the best way for me to approach this? 

Grasshopper can generate and transmit GCode, but I'd also like to be able to interface LCNC's HAL directly (e.g. command a step & direct movement from Grasshopper and then feed that to the HAL). There are some servos that will be acting as rotary axes and I would like to interface them at a lower level (playing with absolute encoder feedback). 

Thanks,
FDP

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

More
5 years 1 month ago #219591 by Roiki
What language are you targeting?

There's no way to directly interface with hal the way you envision it. You can look at the user interfaces for pointers how they interface with the core. Or you can try to make sense of the NML api, which is the underlying method to talk to the realtime core. The motion control pipeline also is not open do you need to feed it with gcode commands, either through gcode files or MDI commands.

If you work in python, I can give you some pointers.

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

More
5 years 1 month ago #219623 by Grotius
Hi

Maybe hal-core is something to try out. github.com/grotius-cnc/hal-core
To create a interface for Grasshopper you can look here for idea's : github.com/grotius-cnc/hal_trajectory


 
The following user(s) said Thank You: FDP

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

More
5 years 1 month ago #219696 by FDP
I am working in Python!

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

More
5 years 1 month ago - 5 years 1 month ago #219697 by FDP
Thanks. @Grotius There are some other threads where you seemed to be doing things with the UI and perhaps EtherCAT that I was looking at, now I need to try to sort out my bookmarked threads and figure out what they were!

I am considering this vs. just trying to directly interface EtherCAT (or one of the other ethernet step & direct appliances) from Grasshopper. My feeling is that LinuxCNC is probably the better, but more complicated way to go.

hal_trajectory looks super useful!
Last edit: 5 years 1 month ago by FDP.

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

More
5 years 1 month ago #219703 by Grotius
Ahh we catch a Python guru ! image missing /media/kunena/emoticons/cool.png

Maybe look at QtVcp. That's a cool environment for Python.
Then you could write a component to interact with grashopper.
After you know the above, you can connect to Ethercat (last stage of development)


 
The following user(s) said Thank You: FDP

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

Time to create page: 0.091 seconds
Powered by Kunena Forum