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
Serial Port [message #41937] Tue, 30 November 2004 07:05
patrick.dillmann is currently offline  patrick.dillmann
Messages: 5
Registered: November 2004
Junior Member
Hi,

I have a problem if I try to read a serial port on a Win 2000 PC. If I
only send a message to a device everything works fine. But when I use
the following Code to get an answer IDL hangs up:

val=bytarr(34)
port='COM1:'
get_lun, u
openu, u, port
text = 'DATA?'+string(13B)
writeu, u, text
readu,u,val
close, u
free_lun, u

Due to the fact that this code works as expected even for getting an
answer if I first start and close the Hyper Terminal for this port, I
believe that I must send some port settings (e.g bits per second,..)
before sending my code.

If this is the case, how can I initialize a serial port with IDL? Are
there other possibilities to communicate with a device via a serial
port?

Thanks,
Patrick
[Message index]
 
Read Message
Previous Topic: Canny Edge Detection
Next Topic: FITS image with RA and DEC axis

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

Current Time: Sat Oct 11 11:57:00 PDT 2025

Total time taken to generate the page: 0.96284 seconds