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!