Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Setting stanby current #16

Copy link
Copy link
@salvadominguez

Description

@salvadominguez
Issue body actions

I am trying to set the stanby_current, and although it says that is applied, the power supply shows that the current has not been modified. Its quite strange since the max_current changes correctly. Any idea what I'm doing wrong?

Thanks

from serial import Serial
from time import sleep
import pyTMCL

## serial-address as set on the TMCM module (Check on the TMCL-IDE).
MODULE_ADDRESS = 1

## Open the serial port (Check on the TMCL-IDE)
serial_port = Serial("/dev/tty.usbmodem1241")

## Create a Bus instance using the open serial port
bus = pyTMCL.connect(serial_port)

## Get the motor(ONLY ONE)
motor = bus.get_motor(MODULE_ADDRESS)



## Start of TMCL COMMANDS

motor.axis.stanby_current=200
motor.axis.max_current=230

print(motor.axis.stanby_current)



## Rotate motor left speed 1234 for 2 seconds
motor.rotate_left(1234)
sleep(2)
motor.stop()

## Rotate motor right speed 1234 for 2 seconds
motor.rotate_right(1234)
sleep(2)
motor.stop()


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.