M
Hello everybody. This is my first post.
I've a problem. I need to communicate with a modbus device. i know all the parametrs (function id,address,etc). I put this script in matlab an a receive a message: "The specified amount of data was not returned within the Timeout period.", and the output its empty.
Code:
S = serial('COM1','Baudrate',9600,'DataBits',8,'StopBits',1,'Parity','none','Timeout',10)
fopen(S);
aa='00041036004014E5';
fwrite(S,aa);
output=fread(S);
fclose(S)
Thanks to all
Regards
I've a problem. I need to communicate with a modbus device. i know all the parametrs (function id,address,etc). I put this script in matlab an a receive a message: "The specified amount of data was not returned within the Timeout period.", and the output its empty.
Code:
S = serial('COM1','Baudrate',9600,'DataBits',8,'StopBits',1,'Parity','none','Timeout',10)
fopen(S);
aa='00041036004014E5';
fwrite(S,aa);
output=fread(S);
fclose(S)
Thanks to all
Regards