Quantcast
Channel: Reprap Forum - Stepper Motors, Servo Motors, DC Motors
Viewing all articles
Browse latest Browse all 2228

Re: Controlling MDrive 23 ( schneider elect ) with Python....

$
0
0
hi all..

Got some commands to work using the suggested communication parameters....!

I've been able to move the motor but haven't been able to have it print back it's location.
For instance, in a terminal with puTTY I can ask the motor it's name, or position.
P = 0 # position = zero
MR 100000 # move relative x num rev
PR P # print the current position away from 0

I tried opening a connection:
ser = serial.Serial(port='/dev/ttyUSB0', baudrate=9600,timeout=3, stopbits=1,xonxoff=False, rtscts=False, dsrdtr=False)

ser.write('P = 0\r\n')
ser.wrtie('MR 10000\r\n')
ser.write('PR P\r\n')
ser.read()

but haven't gotten any output...any ideas are super helpful and thanks again...
wbg

Viewing all articles
Browse latest Browse all 2228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>