2023-10-20 07:27 AM
2023-10-20 08:09 AM
Hello shraddhs10,
While generating your code using the MCSDK WorkBench, the MCP over UART will automatically be included in your project. You can check whether it is the case in the User Interface tab of the WorkBench UI. This will allow you to connect the MotorPilot tool to your board and access several informations, such as speed and encoder angle. You can find further information on the Motor Control Wiki and on MCSDK documentation. The latter can be found by clicking About -> Documentations -> Documentation on your MCDSK WorkBench.
2023-10-20 08:12 AM
I am able to control the motor with the MotoPilot tool. But as my end goal is to implement a stand alone application to control the motor board instead of using the tool.
I went through the documentation but the info on setting/getting the register for encoder angle and the speed are ot very clear
2023-10-21 12:31 AM
Is there a way to control the motor control board from a another processor/ host PC?
I am trying to connect with UART and sending the commands to the motor control board but it is not working
Code as below:
>>> import serial
>>> x = serial.Serial('COM8', 1843200)
>>> x.write(b"\x30") // START_STOP_MOTOR command
1
>>> x.write(b"\x18") // START_MOTOR command
1
>>> x.write(serial.to_bytes([0x18])) // START_MOTOR command
1
>>> x.write(serial.to_bytes([0x30])) // START_STOP MOTOR command
1
I am getting CMD_NOK always.
But this functionality is working through the MotorPilot GUI
2024-06-25 10:53 PM
I'm working on this at the moment. You need to follow the packet structure that is described in the documentation that they hide on your computer when you install mcsdk (I can't find it online anywhere) Look in C:\Program Files (x86)\STMicroelectronics\MC_SDK_6.2.0\Documentation or whatever is most similar to how you set up your environment.
I've been at it for about a day, its not too bad. A bit of a dense read and I wish they just had some available source code considering they wrote the motor pilot code is theirs.