Reading data from COM ports

Sarah Reichelt sarah.reichelt at gmail.com
Thu May 25 18:03:43 EDT 2006


On 5/23/06, Dharminder Singh <dsraina at gmail.com> wrote:
> Hi Sarah,
>
> I was googling yesterday to find out how to read data from 2 COM ports and
> saw
> that you some scripts which can read and send data.
>
> My requirement is:
>
> I have a PC with 2 com ports. There is a set of scales on com1 and a barcode
> reader on com2. Basically All I want is a simple app which will
>
> open com1
>
> read the data
>
> close com1
>
> open com2
>
> read the data
>
> close com2
>
>
> And then want to use that data from analysis.
>
> Do you think your scripts can help me out. If so,please send them across.

You can download my serial comms test stack from
<http://www.troz.net/Rev/tutorials.php>.
This will allow you to open a port, write to it, read from it and
close the port again.
That should give you enough help to do what you need.

I have never tried it, but I would think that you could have 2 com
ports open at the same time, with a "send in time" routine that reads
from them one after another.

HTH,
Sarah



More information about the use-livecode mailing list