LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading custom UART message with a 16 bit termination character?

Hello,

I'm new to LabView and I'm trying to part a UART from a motor controller. I'm using the "continuous Serial Write and Read" vi provided, but I can't seem to get any useful messages displayed. The only documentation I have on the protocol is:

Baud rate: 115200

Index
Datapoint
Size
0
Voltage
16bit Unsigned Int
1
Temperature
16bit Unsigned Int
2
Bus Current
16bit Int
3
Reserved
16bit Unsigned Int
4
E-RPM
32bit Unsigned Int
5
Input Duty
16bit Unsigned Int
6
Motor Duty
16bit Unsigned Int
7
Status Flags
8bit Unsigned Int
8
Reserved
8bit Unsigned Int
9
Checksum (Fletcher)
16bit Unsigned Int
10
Stop Bytes
16bit (Value is 65535)

 

I have tried using the example with the correct baud rate, default data bits, parity and stop bits with the termination character set to 0xFF (from the C code attached). So far it's mostly gibberish, but I'm not sure how to break the data stream into the above packets...

Additionally I have some code written in C that is designed to parse the messages which I will attach. I was wondering if anyone could help me along my path to parsing these messages continuously to extract the data above. Thank you so much!

0 Kudos
Message 1 of 1
(478 Views)