Macro/coding to control external device via IO/RS232

Status
Not open for further replies.

faintrespite

Reputable
Jul 13, 2014
20
0
4,520
Quick overview:
I have a Windows NT4.0 and would like to code/macro/control an external device through the I/O port connection. I have experience successfully doing something similar through an RS232 connection. However, the problem I'm having is that I'm not familiar with NT4.0 and don't know enough terminology to find the type of information/instructions that I am looking for.

Basically, if someone can point me in the right direction I can learn and figure this out myself.

Biggest questions I have:
1. Are there specific problems to NT that would prevent me from doing what I want to do? My previous experience doing this on RS232 was on Windows XP with the Labview software.
2. What's the difference between the I/O port and RS232 port in terms of COM designation? Is the I/O port even designed as a COM port?
3. Is there an optimum language/method to utilizing the I/O port for this task?

 
Solution
...
I doubt you will succeed in this endeavor.

1. You'll need to find documentation for NT4.0 API (Application Programming Interface) calls and most likely do everything via API calls. That is probably what your Labview software was doing under XP - putting a layer of simplification between you and the API calls. NT went through 2 major iterations to get to XP NT->Win2000->XP and in each iteration the API support was expanded. I doubt that the NT software had anywhere near the XP API calls available. You may even need to learn how to write device drivers to get to the hardware in NT and they would have to be NT4.0 drivers but I'm not sure about that. Labview was doing a lot of the work for you under XP so you would, essentially, need to write a Labview for NT 4.0.
2. "I/O port" is a generic term. It could be a serial (RS232) port, a parallel port (most older printers used this), a keyboard port, a monitor display port - any port that put info into the machine (input) or got data out of the machine (output). "RS232" is a physical circuit specification which deals with voltage levels and timing - it is the physical implementation and parameters to be observed by devices attaching to the port. "COM" is the logical name used within the OS to access a physical implementation of a RS232 I/O port - the API calls use the COM port name (COM1, COM2, etc) to communicate with the port much like you use a logical file name to communicate with the disk hardware system to store and retrieve data.
3. I don't think that VisualBASIC was around in the days of NT 4.0 so you would be pretty much limited to C or C++ and you'll have to find a compiler that will run on NT 4.0 which might be impossible these days. Remember, those were the days of the floppy disk, multi-megabyte hard drives (no gigabyte drives or RAM), and 256 color monitors.

IMO, you would be wasting your time just trying to find the documentation and compiler and learning how to do it. I had a bunch of really old computers some years back that I was thinking of sending to school kids in a 3rd world country but after thinking about it I concluded that it would actually have been a disservice to them because they would be spending their time learning absolutely dead technologies. Just as a reminder I keep some old 8 inch floppies and a 40Mb RLL Seagate hard drive that was top of the line in its day lying around.
 

faintrespite

Reputable
Jul 13, 2014
20
0
4,520
Thanks for the detailed thoughts thx1138v2. I've been fiddling around in the meantime and what you're saying is generally the feeling that I was getting about my endeavor.

Also, this is the type of connection I was referring to:
00665563001096974191.jpg

Sorry for the bad terminology. I don't know what it's called and it's just labeled as I/O on my device and the back of the computer so I thought that's what it was called. Still, does knowing the type of connection help in answering my questions any?
 

faintrespite

Reputable
Jul 13, 2014
20
0
4,520

I don't think it's a printer port. My device (which is a spectrometer, PerkinElmer Lambda EZ201) has 3 ports: the 'Centronics' labeled I/O, a 25-pin labeled Printer, and an RS232.

It's designed to be bi-directional and I have the input commands necessary to control the device (my instrument comes with an instructions manual that details them) but I don't have a program to send those commands. I was hoping to find a free or trial program to macro it once I knew what I was looking for or to send the commands manually through the computer's console with C++.
 

Then your NT system will need an I/O card to match before you can to anything with it.
 
Solution
Status
Not open for further replies.