LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicate with a NMEA 2000 device with LabView 2015

I have a Garmin GPS19x NMEA 2000 antenna connected to a NI-9862 in a cDAQ 9171.  I am using the NI-XNET bus monitor to see messages coming from the device and I have a database cluster configured per the NMEA 2000 standard.  I am primarily interested in the message group 129029 "GNSSPosData" for the purpose of recording the altitude.

 

The problem is that the data is not stable and does not make sense.

 

I have attempted to ignore the application protocol but since the DLC is 51, the bus monitor gives an error stating that a propery value is out of range.  The bus monitor will only work if the application protocol is set to SAE J1939, but the data makes no sense.

 

Does anyone know what might be wrong?

0 Kudos
Message 1 of 4
(3,798 Views)

Hi!

 

Can you provide the community with a little more information?  Have you been able to communicate properly with your device before?  What values are you expecting to see?  Can you attach screenshots of how you are configuring your acquisition? Also, when you say the DLC is 51, are you saying that the DLC is supposed to be 51 bits or 51 bytes?

 

 

Thanks!

Tucker
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(3,755 Views)

Hello Tucker,

 

I can successfully communicate and acquire valid data from the antenna using the same code, hardware configuration, and dbc file, but only when reading signals configured with a DLC of 8 bytes. I am using Vector CANoe to modify the dbc file. I use LabView Database editor to create an alias which is then used to point to the dbc to acquire the signal from the frame and cluster. I have also used the LabView database editor to create an XML and alias thinking that would help – it does not. I have also noticed that LabView database editor does not like signals with more than 32 bits. In the NMEA 2000 protocol, the particular message group (129029) that I am attempting to read has three signals with 64 bits. Per internet searches, I found someone that broke the signal into two parts. Not sure how to put the signal back together but in either case, breaking it into two parts does not work either. LabView is still not recognizing any message (frame) with greater than 8 bytes. I was told that LabView 2015 can handle extended J1939 messages so I am hoping that someone can tell me what I am doing wrong. Attached is my simple test code to read the signals.

 

Thanks,

 

Steve

0 Kudos
Message 3 of 4
(3,735 Views)

Hi Steve!

 

From my current understanding, LabVIEW should only recognize a Data Length of 8 bytes.  I believe the "extended" portion that you are referring to is that LabVIEW can handle extended frames that have a longer identifier, but the DLC still must be no greater than 8 bytes.  If the data were longer, it would likely need to be broken up into multiple frames.  I believe section 5 of this document may provide a little more information for you:

 

J1939 Transport Protocol Reference Example

http://www.ni.com/example/31215/en/

 

Give this a look, and see if it helps!

 

 

Thanks,

Tucker
Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(3,681 Views)