Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

serial IO functions blocks matlab

Status
Not open for further replies.

mesak82

Electrical
Joined
Jun 20, 2005
Messages
1
Location
MX
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top