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

Home » Public Forums » archive » Serial Port
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: serial port [message #40336 is a reply to message #14133] Mon, 02 August 2004 12:58 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
michele writes:

> okay i try to explain better...
>
> i want to write a program that uses the gps and so i need to read and
> write directly from the serial port.
> on the idl web-site there is a zip file (under user-contributed site,
> section dll and dlm files) that seems to provide what i need.
>
> if you unzip the file you get 4 files:
> serial.dll and serial.dlm (to be put in a specified folder)
> a readme file that is a bit like the help page that describes 4
> functions
> and a c-language source code (it doesn't have a main).
>
> my goal is to be able to use the functions described in the text file:
> these functions are
> comm_open
> comm_read
> comm_write
> comm_close.
>
> all this stuff is achieved through dynamically linked modules, and in
> this case it means that my idl program must be coupled with some piece
> of C-language..
>
> what i did is just putting the dll and dlm files in the right folder,
> and than trying to use the functions as normal idl functions.
> but they are not recognized as functions.
> moreover i didn't use the c source file in any way... but i think i
> should use it.. if it contained a main i could try to spawn it from
> the main idl module but i can't get an executable out of it becuse it
> contains no main...

I don't know. It seemed to work for me. I downloaded the file. Extracted
the DLL and DLM files to the appropriate place in my IDL distribution.
Exited IDL. Started IDL and typed this:

IDL> DLM_LOAD, 'serial'
% Loaded DLM: SERIAL.
IDL> h=COMM_OPEN('com1')
IDL> ok = COMM_CLOSE(h)

Seems to work fine.

You are running this on a Windows machine, right? If not,
the C source code is so you can recompile it for your machine.

Cheers,

David




--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ptr_Wrapper (Useful?)
Next Topic: Spectral Library Bundles

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

Current Time: Fri Nov 28 22:58:58 PST 2025

Total time taken to generate the page: 0.40160 seconds