Monday, May 19, 2014

Emulating Touchscreens In Python

DOS

Software, especially DOS-based software meant for CNC control lasts forever, but hardware most certainly does not. When faced with aged and decrepit hardware meant for controlling a CNC machine that was slowly dying, [Oliver] needed something that would emulate 3M Microtouch touchscreen. Not wanting to go the hardware route, he decided to emulate a touch screen in Python.

The Python code is fairly simple, taking mouse input and translating it to the serial protocol the 3M Microtouch, and thus the old DOS CNC app, uses. Writing the Python to capture mouse clicks was only half of the problem, though. [Oliver] also needed a way to send these mouse clicks to an old DOS application. Virtualizing an old machine running DOS created a few timing problems, but a solution was eventually found with DOSBox and the Virtual Serial Port Emulator that can connect two applications with serial ports.

[Oliver] was finally able to get everything working, bringing this equipment back to life for at least another 30 years. Let’s just hope all the code is well documented and archived for the next guy.


Filed under: classic hacks

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...