2025-01-13 11:50 PM
Dear all,
I am developing motor control system, and would like to observer the (motor) current response.
In the past, the method I often used was DAC, where the current command and actual value were output separately through the DAC to an oscilloscope for monitoring.
I have also used UART/RS422 to send the data to a PC and then plotted it using Excel or MATLAB. However, it was insufficient to reflect (motor) current data in real time. My current control frequency is 20kHz, but the communication update rate can only reach a maximum of 1kHz, even with a baud rate of 921,600 bits/s. (It can only be used to monitor speed response at best.)
I wnat to build/implement a communication and it can enable me to observe a data with 20KHz update rate. This helps in diagnostics and analysis of transients.
So, I would like to ask if anyone has any experience or suggestions.
Currently, I am using the STM32H563 as MCU.
Best Regards,
2025-01-14 03:24 AM
@yang2 wrote:I have also used UART/RS422 to send the data to a PC...
My current control frequency is 20kHz, but the communication update rate can only reach a maximum of 1kHz, even with a baud rate of 921,600 bits/s.
Really? That doesn't make sense!
Are you using a grossly inefficient protocol?
At 921k6bps, you get around 92k bytes per second - so you should certainly be able to do much better than 1kHz
Maybe look into what's causing the bottleneck(s) in your implementation?
What other interfaces do you have available? USB? Ethernet? SPI?