• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MATLAB program for stepper motors?

Status
Not open for further replies.

judonight

New Member
Hello. I am new to matlab and programming as a whole.

I currently have a single axis stepper connected to a VXM stepping motor controller connected via RS-232 to my PC. The controller did come with a GUI called COSMOS, but, I would like to control the motor from MATLAB.

So, I am hoping someone here can point me in the right direction in order to figure out how to control the stepper motors from matlab, and/or knows of a written program that I can borrow/use.

Thanks much!

KT
 

Sceadwian

Banned
If you can't find published specs for the serial protocol you can figure it out yourself, I doubt it's very complicated. Use a wire to connect the TX wire from the PC to a second serial ports RX port and using any communications program you can see what the controller is sending. If the controller talks back to the PC you can tap the RX line too. If you want to see both TX and RX you can use a diode on each line to feed into the RX line on the PC to mix the two transmissions, however if they transmit data at the same time (not likley) it will get garbled.
Very likley it's a simple protocol, with a byte for instruction and a byte for data maybe some error correction or verification. If you're not able to decode the protocol yourself post the captured data in hex here and I or someone else here might be able to help you.
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top