comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL and data acquisition
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL and data acquisition [message #10638] Tue, 30 December 1997 00:00 Go to previous message
rpina is currently offline  rpina
Messages: 6
Registered: December 1997
Junior Member
What operating system are you using on your PC? If you are using
DOS/Windows 3.1 then you can use the INP/INPW functions to read from the
serial port and the OUTP /OUTPW procedures to write to the serial port.
However, I suspect that you are probably using Windows NT. In that case,
you are indeed correct that you must use a DLL and the CALL_EXTERNAL
function. Under Windows NT, all hardware resources (which includes serial
ports) are protected by the operating system. This means that any process
which would like to use a hardware resource must request access to the
resource from the operating system--the old INP/OUTP routines accessed
the I/O port directly (in fact using the HEX address of the port
explicitly in the function call). Thus, under NT, accessing the port is
multi-step process. First, you must request access to the port from the
operating system. If the port is free, the operating system will give you
access to the port. Then, you can read and write to the port. Finally,
when finished, you must release the port so other processes may use the
port if necessary.

I am by no means a windows programmer, but I have written a DLL which
allows access to the serial ports. For each of the DLL functions, I have
a corresponding IDL function/procedure to make access to the serial port
essentially transparent in terms of usage of the CALL_EXTERNAL functions
and the packaging of the arguments required by the various DLL functions.
The DLL was written and compiled using a Borland C compiler. I would be
more than happy to make the source code available to anyone who wants it.

Cheers,

Robert K. Pina



In article <349EA071.BD71BAFB@mpe-garching.mpg.de>,
Michael Sterzik <sterzik@mpe-garching.mpg.de> wrote:
>
> Has anyone experience in reading/writing to the serial port of an PC
> under IDL?
> I guess one has to use DLLs and call_external.
>
> --
>
> ------------------------------------------------------------ ----
> | Michael F. Sterzik | PHONE(H): ++49 89 6902633 |
> | Max-Planck Institut | PHONE(O): ++49 89 3299 3885 |
> | fuer extraterrestrische Physik | |
> | 85740 Garching | |
> | Germany | FAX: ++49 89 3299 3569 |
> |----------------------------------------------------------- ---|
> | email: sterzik@mpe-garching.mpg.de |
> | www: http://www.theory.mpe-garching.mpg.de/mfs/homepage.html |
> ------------------------------------------------------------ ----

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: WRITE_GIF - found it...
Next Topic: Object Graphics and Widgets

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:00:36 PDT 2025

Total time taken to generate the page: 2.15769 seconds