How can I write a MS DOS program for serial communication with a stepper driver?

Click For Summary

Discussion Overview

The discussion revolves around writing a program in MS-DOS for serial communication with a stepper driver, specifically focusing on sending data from a CSV file and receiving feedback from the driver. The context includes programming challenges, hardware specifications, and communication protocols.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant seeks assistance in writing a program to send data from a CSV file to a stepper driver via serial communication, noting a lack of familiarity with MS-DOS programming.
  • Another participant questions whether the stepper driver is controlled via serial port or requires waveforms, indicating the need for clarification on hardware capabilities.
  • A later reply confirms that the stepper driver does not use a serial port but instead takes waveforms, while also specifying that the program should send streams of 7 bits and wait for feedback.
  • Concerns are raised about the adequacy of a serial port for driving a stepper motor, suggesting that a dedicated stepper driver is necessary.
  • One participant suggests that the program should be written as a console application in a Windows environment rather than a traditional MS-DOS program, mentioning the potential use of Microsoft Visual C++ Express for development.
  • Another participant confirms the use of a different power supply for the stepper motor and identifies it as unipolar.

Areas of Agreement / Disagreement

Participants express differing views on the nature of the stepper driver and its control method, with some uncertainty about the programming environment and requirements. The discussion remains unresolved regarding the specifics of the programming approach and hardware compatibility.

Contextual Notes

There are limitations regarding the clarity of hardware specifications and the exact requirements for the software, as well as potential dependencies on the definitions of terms like "MS-DOS program" versus "console program."

gimini75
Messages
50
Reaction score
0
Hi and thanks for your help

I have a table in Excel spreadsheet which is containing data to motor through a stepper driver I can convert this spreadshhet by save as CSV file, the problem I have know is to write a programme in MS DOS throgh windows to send this CSV file to the serial port and wait for the feedback from the stepper driver to come back and then another 4 pice of stream data because the stepper driver does not have hand shacking, can you please help me how to write this programme in MS DOS, really Iam not familier with MS DOS programming and serial communication?



Thanks for your help
 
Physics news on Phys.org
Your question is a little ill-defined.

Hardware-wise, is your stepper driver meant to be controlled with a serial port, or does it just take in waveforms to control the firing of the coils?

Software-wise, do you actually have a Windows 3.1 / DOS setup? Or do you run something like XP, and mean that you need to write some kind of software (a console--i.e. non-GUI--program) to control the stepper driver?

If you answer these, we may or may not be able to help you. Posting links to the hardware in question would also help.
 
Thank you very much for your help

Really the stepper driver will not be controlled by the serial port it just take in waveforms to control the firing of the coils? for the software I will run Windows XP and I need to writ a programme in MS-DOS after I run (cmd), the programme should send a stream of 7 bites each time to the stepper driver an wait for the driver feedback and send after another 7 bites to it till all the required bites will be send in this way to stepper drive actually it will be 3 stepper drivers (X, Y, Z), that's the jobe of the programme which I have to write it?



Thanks for your help
 
gimini75 said:
Really the stepper driver will not be controlled by the serial port it just take in waveforms to control the firing of the coils?

Well, it really depends on what you're using as a stepper driver (and you *are* using a stepper driver, yes? A serial port will not supply enough current to drive a stepper motor). If you were using something like the following, you could control it with a serial port (and now you'll need to find out if you have unipolar or bipolar):
http://store.qkits.com/moreinfo.cfm/KT-5197A
http://www.active-robots.com/products/motorcon/ (scroll to the bottom of the page)

More on stepper motors, and stepper motor control in general:
http://www.cs.uiowa.edu/~jones/step/

gimini75 said:
for the software I will run Windows XP and I need to writ a programme in MS-DOS after I run (cmd), the programme should send a stream of 7 bites each time to the stepper driver an wait for the driver feedback and send after another 7 bites to it till all the required bites will be send in this way to stepper drive actually it will be 3 stepper drivers (X, Y, Z), that's the jobe of the programme which I have to write it?

Thanks for your help

You are *NOT* writing a MS-DOS program, but rather a console program (one that doesn't have a user interface, like most Windows programs, and just pops up the text black and white DOS-like window). This wouldn't be too hard (with, say, Microsoft Visual C++ Express). You could quite easily read in a csv file and slowly spit out the bytes in the fashion you describe. But you'd need to do a fair bit of reading, and probably find a library or few.
 
Hi

Thanks for your reply

Iam using a different power supply for the stepper motor and the stepper motor unipolar?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
16K