- Posts: 5
- Thank you received: 0
Interfacing to smart driver modules, where do I start?
- Oliver Sedlacek
- Topic Author
- Offline
- New Member
-
Less
More
8 years 1 month ago #117488
by Oliver Sedlacek
I'm a newbie on LinuxCNC but I'm looking to control a three axis CNC mill that includes smart stepper drives. The interface to the stepper drives is through serial commands that allow you to control speed and position. I'm an experienced C/C++ coder, so I'm comfortable with low level interfacing, but I don't know what I need to do. Where do I start?
Please Log in to join the conversation.
8 years 1 month ago #117489
by PCW
Replied by PCW on topic Interfacing to smart driver modules, where do I start?
What type of interface do the step motor drives have?
Please Log in to join the conversation.
- Oliver Sedlacek
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
8 years 1 month ago #117509
by Oliver Sedlacek
Replied by Oliver Sedlacek on topic Interfacing to smart driver modules, where do I start?
ASCII commands,VE????? sets speed, FP???? sets position, stuff like that. The interfaces are Ethernet and RS485, so reasonably quick.
Please Log in to join the conversation.
8 years 1 month ago #117525
by andypugh
Replied by andypugh on topic Interfacing to smart driver modules, where do I start?
Sounds like fun...
Ideally you would want to remain in the realtime layer. I think that this might be easiest using a Mesa FPGA card with UART firmware.
Here is a simple Mesa UART driver written in the LinuxCNC comp preprocessing language. github.com/LinuxCNC/linuxcnc/blob/master...ivers/mesa_uart.comp
It _might_ be possible to send serial data out of the PC serial port, do you know if that is possible with simple inb() and outb() commands?
linuxcnc.org/docs/2.7/html/man/man3/rtapi_inb.3rtapi.html
With either approach you would create HAL input pins for your driver component that would be linked to the joint.N.motor-pos-cmd HAL pins from the motion controller.
Ideally you would want to remain in the realtime layer. I think that this might be easiest using a Mesa FPGA card with UART firmware.
Here is a simple Mesa UART driver written in the LinuxCNC comp preprocessing language. github.com/LinuxCNC/linuxcnc/blob/master...ivers/mesa_uart.comp
It _might_ be possible to send serial data out of the PC serial port, do you know if that is possible with simple inb() and outb() commands?
linuxcnc.org/docs/2.7/html/man/man3/rtapi_inb.3rtapi.html
With either approach you would create HAL input pins for your driver component that would be linked to the joint.N.motor-pos-cmd HAL pins from the motion controller.
Please Log in to join the conversation.
- Oliver Sedlacek
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
8 years 1 month ago #117528
by Oliver Sedlacek
Replied by Oliver Sedlacek on topic Interfacing to smart driver modules, where do I start?
Thanks for that, I don't understand it all but it does look really useful (and interesting). I'm sure I'll have some supplemental questions.
Please Log in to join the conversation.
Time to create page: 0.160 seconds
