Interfacing to smart driver modules, where do I start?
- Oliver Sedlacek
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
13 Sep 2018 21:26 #117488
by Oliver Sedlacek
Interfacing to smart driver modules, where do I start? was created 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 or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17999
- Thank you received: 4843
13 Sep 2018 21:29 #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 or Create an account to join the conversation.
- Oliver Sedlacek
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
14 Sep 2018 07:37 #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 or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4865
14 Sep 2018 12:56 #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 or Create an account to join the conversation.
- Oliver Sedlacek
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
14 Sep 2018 13:38 #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 or Create an account to join the conversation.
Time to create page: 0.111 seconds