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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL and data acquisition [message #10638] Tue, 30 December 1997 00:00
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
Re: IDL and data acquisition [message #10643 is a reply to message #10638] Thu, 25 December 1997 00:00 Go to previous message
Michael Sterzik is currently offline  Michael Sterzik
Messages: 2
Registered: December 1997
Junior Member
Thanks for your info.
I have just documentation on version 5.0, March 97, and I would
appreciate further information on those routines you mention.

Best,

Michael

--

------------------------------------------------------------ ----
| 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 |
------------------------------------------------------------ ----
Re: IDL and data acquisition [message #10646 is a reply to message #10643] Tue, 23 December 1997 00:00 Go to previous message
htsang is currently offline  htsang
Messages: 14
Registered: September 1997
Junior Member
Do you mean the User's Guide for Version 4? Which chapter are you refering
to??

-- Herbert

Dale Gary (dgary@umbra.njit.edu) wrote:
: There are windows-specific routines for input and output to the hardware
: ports on a PC.
: Unfortunately, I have not had a chance to try them. The routines are
: documented on page
: 18-32 of the "old" IDL User's Guide. I can't find it in the new docs
: and there is certainly
: no mention of it in the index. Let me know if you want more info.
:
: Dale Gary
: dgary@njit.edu
:
:
Re: IDL and data acquisition [message #10648 is a reply to message #10646] Tue, 23 December 1997 00:00 Go to previous message
Dale Gary is currently offline  Dale Gary
Messages: 2
Registered: December 1997
Junior Member
There are windows-specific routines for input and output to the hardware
ports on a PC.
Unfortunately, I have not had a chance to try them. The routines are
documented on page
18-32 of the "old" IDL User's Guide. I can't find it in the new docs
and there is certainly
no mention of it in the index. Let me know if you want more info.

Dale Gary
dgary@njit.edu

Michael Sterzik 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 |
> ------------------------------------------------------------ ----
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: WRITE_GIF - found it...
Next Topic: Object Graphics and Widgets

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

Current Time: Wed Oct 08 15:10:12 PDT 2025

Total time taken to generate the page: 0.00428 seconds