I am using the ATI Axia80-M20 force/torque sensor. It uses the rs-485 serial protocol and I'm having problem reading data using the "serial" command in MATLAB. It works fine when I am connecting with the same configuration using PuTTY.
Below is the code I am using:
FT = serial('COM18','BaudRate',115200);FT.Terminator = 'LF';fopen(FT);fprintf(FT,'r'); % serial command that reads instantaneous force/torque data
fgets(FT); % prints force/torque readings in hexidecimal format
fclose(FT);delete(FT);
The output for the instrument command "r" from "fgets" we are looking for is a character string in hexidecimal format. I expected something like this:
'200000000FFFFFFFFFFFF0000'
But now I only get one of the three things below returned:
' '' Command not found '' ýýüþóëæØÐÇFFFF0000âþóØóëæ '
Best Answer