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

Home » Public Forums » archive » Re: Sending data to the serial port (Linux)?
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: Sending data to the serial port (Linux)? [message #37528] Tue, 06 January 2004 04:04 Go to previous message
Pepijn Kenter is currently offline  Pepijn Kenter
Messages: 31
Registered: April 2002
Member
Olaf Stetzer wrote:
> Hello and a nice new year!
>
> Is there an easy way to send data to the serial port
> under Linux? I have some values in a spreadsheet that
> need to be reformatted and sent to e.g. /dev/ttyS0.
> I think of exporting the spreadsheet as csv and read it
> into IDL, reformatting is easy and no problem but how
> do I send the strings to the serial interface? Probably by
> writing to another file and doing a 'cat foobar /dev/ttyS0'?
> Is the latter possible in the timed demo mode (I need
> to to this at home without access to our license server).
>

Can't you just open the device in IDL with the openw procedure?
Like so:

openw, lun, '/dev/ttyS0', /get_lun
printf, lun, "test string"
free_lun, lun

Since 'everything is a file' in linux this should work.

> There is probably an easy solution without using IDL
> any hints?) but IDL is the only language I have a
> good pragramming experience with! :-)
>

If you want the right tool for the right job, awk is probably what
you're looking for.

HTH, Pepijn Kenter.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Widgets: group leader and procedures
Next Topic: 2 little questions: (Object windows with widget_draw) AND (geting working directory)

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

Current Time: Sat Oct 11 09:46:27 PDT 2025

Total time taken to generate the page: 0.72133 seconds