[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Serial Port access
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
>