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

Home » Public Forums » archive » Serial Port access
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 access [message #23677 is a reply to message #23669] Mon, 12 February 2001 04:58 Go to previous message
ngls is currently offline  ngls
Messages: 10
Registered: November 2000
Junior Member
Hmmm - well I don't have anything attached on my com ports, but I've
managed to write to my printer port (LPT1:) with the following code and get
a page out of the printer.

As for using READU, you'll probably have to create a small string to start
with so IDL knows when to stop reading (as in the online help example).

Hope this helps,

Justin

IDL> print, !version
{ x86 Win32 Windows 5.3.1 Feb 23 2000}


PRO test_print

OPENW, u, "LPT1:", /GET_LUN

;Create some text, followed by form feed
txt = "Testing from IDL" + (STRING(12B))[0]

WRITEU, u, txt

FLUSH, u

HELP, FSTAT(u), /str ;Show debug info

FREE_LUN, u ;Close and free lun

PRINT, "Done"

END


Richard_Tyc@sbrc.umanitoba.ca (Richard Tyc) wrote in
<95pns1$fiu$1@canopus.cc.umanitoba.ca>:

> Thanks....
>
> Tried just opening 'COM1:' like your example states.
>
> Do not see any data on a writeu get to my device. On a readu, IDL
> completely hangs up and can only be killed by the task manager ?? I
> know the device spits out 60 byte messages every second so it cannot be
> waiting for data.
>
> I am not too confident with the concept of 'OPEN, COM1' in IDL.
> Anyone else know if this is possible ??
>
> Using IDL 5.4 on Win NT 4.0 SP5
>
> Rich
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Hi, My Name is David. And I'm a Lurker
Next Topic: speed comparison of IDL, numPy, Matlab

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

Current Time: Sat Oct 11 07:43:49 PDT 2025

Total time taken to generate the page: 0.39912 seconds