Serial Communication Using fwrite or fprintf

Hello! I am trying to set up code to use the serial function to send communicate through the serial port. On page 31-33 of this manual: http://www.biopac.com/Manuals/fnir%20cobi%20manual%20v3i.pdf It says that I can send marker synchronization. There is a table that lists byte values for different markers. How would I send this through MatLab?
I already have this code thus far:
s = serial('COM3', 'BaudRate', 9600);
fopen(s);
What can I write to send the marker through?
Thanks for your help! You'll be alleviating a lot of headaches.

 채택된 답변

Walter Roberson
Walter Roberson 2012년 7월 25일

0 개 추천

fwrite(s, 20); %baseline begin
fwrite(s, 254); %stop experiment

댓글 수: 1

Stephanie
Stephanie 2012년 7월 25일
Thanks! This helps. I wasn't quite sure what I was supposed to put for 'A' in the MatLab documentation center.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Instrument Control Toolbox Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by