serialRead
Top  Previous  Next

str = serialRead ( )

Use this function to read a string of characters from the currently open serial port.

Parameters
 
None  
 
Return value
 
The string containing the data from the receive buffer.  
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_NOTFOUND  
 
No open port found.  

Remark
 
To open and configure a serial port, use serialOpen.  
 
Example
 
This set of statements reads one character from a serial port:  
 
serialOpen (1)  
If (getError()<>ERR_OK) Then  
 MsgBox ("Unable to open serial port")  
 End  
EndIf     
serialWait()  
Print serialRead()  
serialClose()