フィルターのクリア

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 Center および File ExchangeDevelopment Computer Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by