From: Frank W. on 19 May 2010 06:28 Hello, what might also be is that the 'fprintf' function adds a newline/linefeed character automatically. See http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f62852.html#f68507 for details. Perhaps the attached '/n' confuses your system? Regards Frank
From: Frank W. on 19 May 2010 06:36 Sorry, I was unprecise. It's the section 'Writing Text Data' under http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f62852.html#f68507 where you can find how to find out how many characters have been sent by Matlab. Frank
From: Ankit Desai on 19 May 2010 10:41 "Frank W." <yohansan(a)web.de> wrote in message <ht0eul$gj6$1(a)fred.mathworks.com>... > Sorry, > I was unprecise. It's the section 'Writing Text Data' under > http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f62852.html#f68507 where you can find how to find out how many characters have been sent by Matlab. > Frank You might want to match the settings of your Serial object to that of hyper terminal. Particularly the baudrate, terminator, parity, flow control etc. I see no reason why hyper terminal would work but MATLAB Serial object would not. -Ankit
From: Walter Roberson on 19 May 2010 10:45 Nandish wrote: > S = Serial('COM1'); > fopen(S); > fprintf(S,'P') > fclose(S); > > fopen(S); > fprintf(S,'A') I would suggest you replace the fclose/fopen pair by pause(0.01). Also, the other poster was correct in pointing out to you that if you use that form of fprintf that a \n will be added to each character written. To avoid that, provide a format yourself: fprintf(S,'%c','P')
First
|
Prev
|
Pages: 1 2 Prev: problem with num2str Next: neural network training on quad core machine |