FORUM

STO and Drive Enabl...
 
Notifications
Clear all

STO and Drive Enable Register 0xC7

4 Posts
2 Users
0 Reactions
1,447 Views
(@dr4wd3)
Eminent Member
Joined: 2 years ago
Posts: 13
Topic starter   [#691]

Hi @milad, is the STO input linked to 0xC7 in the UART? I've done the below and it doesn't seem to toggle when applying 5V at the STO input.

Added this to SOLOMotorControllersUart.py

    #@brief  This command reads the values of the Drive Enable register 
    #          .The method refers to the Uart command: 0xC7
    def get_drive_enable(self) -> list:
        cmd = [self._address, ConstantUart.ReadDriveEnable,
               0x00, 0x00, 0x00, 0x00]
        result, error = self.__exec_cmd(cmd)
        if (result):
            data = get_data(cmd)
            return convert_from_data(data, DATA_TYPE.UINT32), ERROR.NO_ERROR_DETECTED
        else:
            return -1, error

Added this to ConstantUart.py

ReadDriveEnable = 0xC7

And this is my test code:

import SoloPy as solo

# set up comms and control parameters
mySolo = solo.SoloMotorControllerUart("COM3")
mySolo.set_motor_direction(solo.DIRECTION.COUNTERCLOCKWISE)
mySolo.set_control_mode(solo.CONTROL_MODE.TORQUE_MODE)

# initialise commands and recording 
set_torque_ref = 0
mySolo.set_torque_reference_iq(set_torque_ref)

while True:
    drive_state, error = mySolo.get_drive_enable()
    print(drive_state)

The test code just outputs 1 regardless of what STO is up to.



   
Quote
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 7 years ago
Posts: 709
 

Hello @dr4wd3,

STO is a hardware Enable/disable the feature, and it's not controller by firmware, the Drive En/Disable command that we have in our libraries, does a similar job to STO , but it's not the same, we basically disable by software the switching, however the STO disables the switching at hardware level. to handle STO you will need an external hardware switch to activate or deactivated it.

Milad

 


If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
ReplyQuote
(@dr4wd3)
Eminent Member
Joined: 2 years ago
Posts: 13
Topic starter  

Is there a way to read the status of the hardware STO over UART? That's what I'm actually after.



   
ReplyQuote
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 7 years ago
Posts: 709
 

Posted by: @dr4wd3
↑

Is there a way to read the status of the hardware STO over UART? That's what I'm actually after.

Unfortunately right now there is no command made for this, the hardware is ready meaning the feedback is there, but we need to include this in our future firmware updates and we will do so, but I can't give you a precise date for the next release yet, hopefully with the current situation you can handle the setup, we will do our best to go out with this feature ASAP.

Milad

 


If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
ReplyQuote