| Description tline = fgets(obj) reads one line of text from the device connected to obj, and returns the data to tline. The returned data includes the terminator with the text line. To exclude the terminator, use fgetl. [tline,count] = fgets(obj) returns the number of values read to count. [tline,count,msg] = fgets(obj) returns a warning message to msg if the read operation was unsuccessful. Remarks Before you can read text from the device, it must be connected to obj with the fopenfunction. A connected serial port object has a Status property value of open. An error is returned if you attempt to perform a read operation while obj is not connected to the device. If msg is not included as an output argument and the read operation was not successful, then a warning message is returned to the command line. The ValuesReceived property value is increased by the number of values read - including the terminator - each time fgets is issued. Ifyou use the help command to display help for fgets, then you need to supply the pathname shown below. |