필터 지우기
필터 지우기

XPC target serial communication NMEA

조회 수: 1 (최근 30일)
Jan De Vries
Jan De Vries 2012년 6월 8일
I'm trying to read the data send by a NMEA compass on my Xpc target PC. I've read the tutorial from Gordon Weast about this, but unfortunately my model doesn't work.
The compass sends the following sentence 10 times a second: $HCHDG,hhh.h,,,,*ss<CR><LF>, where hhh.h is the heading (eg 180.0 means south). Serial output is RS422, 4800 Baud, 8 data bits, 1 stop bit, no parity.
When I open the com1 port in matlab and use the fscanf command, I receive the following:
>> fscanf(ser)
ans =
$HCHDG,43.6,,,,
So I suppose the com port and compass are working fine.
The problem is, I only receive zeros.
In my model I'm using the Baseboard Serial F board, connected with the FIFO ASCII read block. This FIFO block is only sending zeroes as I saw on the scope I connected. Any idea what is wrong?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Development Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by