mesak82
Electrical
- Jun 20, 2005
- 1
Hi,
I'm using serial functions (fwrite, particularly), but it blocks the matlab sesion. My computer hasn't a built-in serial port, so I use a usb-serial converter. I think that the problem should be there. The same function (fwrite) works properly in a computer with a built-in serial port.
Another problem is the next:
s=serial('COM1');
fopen(s);
for i=1:8
fwrite(s,i,'int8','async'); %ERROR WHEN i=2.
end
Matlab notifies that an error occurs. The error is because there is a write operation in progress. A delay function solves the problem, but it also delays the total time involved in the transmission.
I'm using serial functions (fwrite, particularly), but it blocks the matlab sesion. My computer hasn't a built-in serial port, so I use a usb-serial converter. I think that the problem should be there. The same function (fwrite) works properly in a computer with a built-in serial port.
Another problem is the next:
s=serial('COM1');
fopen(s);
for i=1:8
fwrite(s,i,'int8','async'); %ERROR WHEN i=2.
end
Matlab notifies that an error occurs. The error is because there is a write operation in progress. A delay function solves the problem, but it also delays the total time involved in the transmission.