Logging Torque via Python
I have to log the torque of an brushed DC Motor via Python. The Solo is connected via USB to an Windows PC.
Logging via SoloPy and 'get_dc_motor_current_im()' is to slow (max 60 Hz with reducing the sleeping time in __excec_cmd. Is there an easy way to do that with 200 Hz?
Moving the reading of the torque from 60 Hz to 200 Hz is an hard challenge, and it will require a bigger effort then common tasks.
I personally suggest you to avoid asking to the SOLO unit the torque in high frequency request, as this option can reduce the motion performances.
- When you activate the mode: a new packet will be sent to the SOLO unit. You can read more about the command used in the UART_USB communication manual > page 31 “0x19 : Monitoring Modes Enable/Disable”
- the SOLO unit will keep send back data with all the information (torque too) and they are plotted in the Motion terminal.
- When you stop the mode: a new packet will be sent to the SOLO unit, so it will stop to keep sending data.
The possible alternative solutions, based on your application goal and restrictions:
- You can Make a Python implementation of the monitoring mode command. I suggest you to start from empty Python code, implement the monitoring mode command feature (you can follow the JS approach) and then add the commands you need.