How can I write "enter" or "carriage return" to a serial object?

조회 수: 10 (최근 30일)
Joseph
Joseph 2017년 6월 23일
답변: James Tursa 2017년 6월 23일
I am working on manipulating the Polhemus FasTrak tracking system via MatLab through RS-232 serial connection. So far I have been able to send commands that configure settings (using fprintf), as well as record data (using fscanf). For a certain command to enable and disable stations of the tracking system, the manual calls for a "<>" or Ascii carriage return (enter). I have tried printing < >,<cr>, \n, \r ect. to the tracking system and nothing seems to work.
Here is a link to the manual, the command I am trying to execute is on page 59: http://polhemus.com/_assets/img/FASTRAK_User_Manual_OPM00PI002-G.pdf
Any help would be greatly appreciated, thank you!

답변 (1개)

James Tursa
James Tursa 2017년 6월 23일
A carriage return is ASCII code 13. Can you simply send a char(13), or perhaps an int8(13), to the serial connection?

카테고리

Help CenterFile Exchange에서 Scripts에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by