XPC target serial communication NMEA
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Development Computer Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!