You are here

Motion commands for controlling CNCs

3 posts / 0 new
Last post
andresv
Offline
Last seen: 1 month 1 week ago
VESC Free
Joined: 2017-08-16 16:56
Posts: 1
Motion commands for controlling CNCs

Currently there is command called mc_interface_set_pid_pos(1) that can be used to set motor position from 0 to 360 degrees if you have encoder connected. However it would be very useful if there will be support for a command like mc_interface_set_pid_pos(float degrees, float max_erpm), where degrees can be any number of degrees. For example if you would like to turn motor exactly 2 revolutions then degrees would be 2*360 etc. There should be also support for maximum speed and probably even acceleration to be useful for CNC machine.

benjamin
Offline
Last seen: 8 hours 12 min ago
VESC Original
Joined: 2016-12-26 15:20
Posts: 320

There are plans for an extended motion interface, but currently I don't have so many projects where I'm using it and therefore not many opportunities to test it out. What I do think about adding regarding CNCs is an app that would accept stepper motor pulses and translate them to position control commands. This way the VESC could be connected to LinuxCNC easily, which does the motion planning internally.

brushlessjoe
Offline
Last seen: 1 month 3 weeks ago
VESC FreeVESC Gold
Joined: 2019-02-04 21:03
Posts: 3

Hi

Would like to pick up this topic with another motivation.

for a development project I would like to control position and velocity by MatLab.
Are there extended commands to set position and set velocity over serial interface?
I tried "help" in the terminal of VESC Tool, but couldn't find Position command.
Alternatively I could do a workaround:
- add an RS232 - CAN adapter
- use an Arduino
- use an Arduino with CAN-adapter
Is there any possibility to command a position and command a velocity without VESC Tool Software?
Could you give me a hint?

Regards
BrushlessJoe