User manual
IEC61131 User and Reference Manual 
April 22, 2008     
334 
rxstring 
Receive a Message String 
Description 
This function receives a message string on the specified communications port of a controller. 
rxstring 
enabl 
comX 
lenRe 
done 
strin 
Arguments 
Inputs 
Type 
Description 
enable 
Boolean 
Set to TRUE to receive the string. 
While this input is on and the complete message has 
not yet been received, characters will continue to be 
received and appended to the output string. 
Enable must then be set to FALSE and back to TRUE 
to receive another message. 
comX 
Integer 
Communications Port. 
Allowed values are 1-4 
lenRequest 
Integer 
The number of characters to receive.  
If lenRequest characters have been received, these 
characters are copied to the output string, and the 
done output is set to TRUE. 
Any remaining characters will be left in the 
communication port receive buffer, and may be read 
in a subsequent call to this function. 
Outputs 
Type 
Description 
done 
Boolean 
Set to TRUE if the string of lenRequest characters 
was successfully received. 
Set to FALSE if the string was not received. This will 
occur if there are less than lenRequest characters in 
the buffer for comX, or if comX represents an invalid 
communications port. 
Set to FALSE if the comX port does not have Rx Flow 
set to none and Protocol set to none. 
string 
Message 
The returned message string. 
Notes 
The protocol must be set to „None‟ and the Rx Flow must be set to „None‟ for any 
communication ports that use this function. 










