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

In summary: If you're using a bipolar stepper motor, then no, it wouldn't work with a different power supply. If you're using a unipolar stepper motor, then you could try using a different power supply, but it's more likely that you just need to find a higher-current power supply (perhaps a wall wart) to use with your stepper motor.
  • #1
gimini75
52
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
  • #2
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.
 
  • #3
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
 
  • #4
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.
 
  • #5
Hi

Thanks for your reply

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

1. What is a serial port and how does it work?

A serial port is a physical interface that allows data to be transmitted one bit at a time. It is typically used to connect devices such as computers, printers, and modems. It works by sending and receiving data through a single wire, using a specific protocol to control the flow of information.

2. What are the benefits of using serial port communication?

Serial port communication offers several benefits, including simplicity, reliability, and low cost. It also allows for communication over longer distances compared to other types of interfaces, making it suitable for industrial and remote applications.

3. What are the common types of serial ports?

The most common types of serial ports are RS-232, RS-422, and RS-485. RS-232 is the most basic type and is commonly used for connecting peripherals to computers. RS-422 and RS-485 are more advanced types that allow for longer distance communication and can support multiple devices on the same line.

4. How do you establish a serial port connection?

To establish a serial port connection, you will need a serial cable, which can be either a DB9 or DB25 connector, depending on the type of serial port. You will also need to configure the communication settings, such as baud rate, parity, and flow control, on both devices to ensure they are compatible.

5. What are some common issues with serial port communication?

Some common issues with serial port communication include incorrect communication settings, faulty cables or connectors, and conflicting devices on the same port. These issues can usually be resolved by double-checking the settings and ensuring all hardware is functioning properly.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
4K
  • Programming and Computer Science
Replies
19
Views
3K
Replies
1
Views
2K
Replies
15
Views
3K
  • Computing and Technology
Replies
13
Views
6K
  • Computing and Technology
Replies
2
Views
1K
  • Electrical Engineering
Replies
2
Views
5K
  • Programming and Computer Science
Replies
3
Views
3K
  • Programming and Computer Science
Replies
5
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
Back
Top