RS-232C serial text strings

new topic     » topic index » view thread      » older message » newer message

Hello all you Euphers,
I'm a newbe, and have much hope for using Euphoria in automation control 
and robotics applications.  I am writing my first Euphoria program to 
create a GUI for controlling a machine micro-controller via the RS-232C 
serial comm port.  This is pretty much the standard interface for just 
about all micro-controllers.
I am using Win32lib.e for the GUI to make its use by the machine's 
humans friendly.  Everything works fine except the communication with 
the controller.  I am trying to send and receive one string at a time 
ending with a carriage return.  The open and puts statements seem to be 
working, although I can't be sure.  But, when I use the "gets" command 
my GUI locks with no err message displayed or written to err.txt
I have done this before with Qbasic and have used that app to check the 
hardware and cable connections, no problem there.  
I have looked at the various .e files in the archive dealing with serial 
comm but they all seem to just handle single characters,  maybe I'm not 
understanding there usage.

The Qbasic code sends and receives text one line at a time as follows:

    OPEN "COM2:9600,N,8,1,CS,DS" FOR RANDOM AS #1
    PRINT #1, "PC" ' set protocol in CTC
    LINE INPUT #1,  response$ ' response from CTC should be "PC0"

Any help would be greatly appreciated.
Thanks,
David Oswald

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu