Using the 'unicode2native' function in MATLAB reveals that this special character has a decimal value 6, which corresponds to the Unicode 'Acknowledgement' control character.
The character that is being returned before '80' is the Acknowledgement Character(ACK), which is a commonly used signal in communication protocols that indicates successful receipt of the message.
While the '80' may be a user-configured success signal, the 'ACK' character is likely being generated by the device to indicate a successful action or the receipt of a command. The device documentation may be able to confirm this.
Since the 'ACK' is generated by the device, it may not be possible to suppress it but there are a number of ways to ignore it.
To receive the '80' without the 'ACK' character, try the following workarounds:
1) Use 'fscanf' to read just a single character in order to clear the 'ACK', and then read the remaining characters, separately. For example:
fscanf(s, '%c', 1);
fscanf(s)
2) Use indexing to trim the leading character from the character array you read from the device. For example:
cmd_success = fscanf(s);
cmd_success = cmd_success(2:end)
Best Answer