Writing a Batch File for MS-DOS Serial Port Communication

  • Thread starter Thread starter gimini75
  • Start date Start date
  • Tags Tags
    Batch File
Click For Summary
SUMMARY

This discussion focuses on writing a batch file in MS-DOS for serial port communication, specifically to send data to a stepper driver and receive responses. The primary tool recommended for this task is Expect, a scripting language designed for automating interactive applications. Users seeking to implement serial communication effectively should leverage Expect's capabilities to handle the complexities of data transmission and response management. The conversation highlights the limitations of using standard batch files for such tasks.

PREREQUISITES
  • Familiarity with MS-DOS command line operations
  • Understanding of serial port communication protocols
  • Basic knowledge of scripting with Expect
  • Experience with stepper motor drivers and their command sets
NEXT STEPS
  • Learn how to install and configure Expect for Windows environments
  • Explore serial port communication using Expect scripts
  • Study the command set for your specific stepper driver
  • Investigate error handling techniques in Expect for robust communication
USEFUL FOR

Electronics engineers, software developers, and hobbyists involved in robotics or automation projects that require serial communication with hardware devices.

gimini75
Messages
50
Reaction score
0
Hello

Can anyone help me please, I want to write a batch file in MS-DOS to:

Communicate with the serial port, send data to the serial port from a specified file and for a respond to come back from the driver that first command being done and now ready for next line of data to be send it through the serial port to a stepper driver.


Thanks for your help
 
Physics news on Phys.org
That's going to be tricky to do with batch
The normal tool for doing this sort of thing is expect http://expect.nist.gov/
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
6K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
13K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
25K
Replies
3
Views
16K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 31 ·
2
Replies
31
Views
12K