XPC target serial communication NMEA

5 vues (au cours des 30 derniers jours)
Jan De Vries
Jan De Vries le 8 Juin 2012
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?

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by