LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting LIN Data collected w/ NI-USB 8476s

Hello All,

 

I am currently in the process of attempting to take in specific hex bytes via a NI-USB 8476s LIN interfacing piece of hardware (communicating with a sensor that uses LIN as well) and translate these specific bytes to decimal format.  I know the exact channel and position of these bytes that I need converted to decimal (Channel 35 and the 1st 8 BITS on the channel.. so the first BYTE), however I am having trouble approaching the problem as I'm not very familiar with LIN.

 

The motivation for doing this is to be able to output an analog signal in real-time (through other means) which is proportional to the decimal values (converted from hex LIN), and feed this analog signal to an embedded microcontroller.

 

I have attached a copy of the VI that I have successfully used to read the hex LIN signals in real-time in the Labview Workspace.

 

Thank you!

0 Kudos
Message 1 of 2
(2,569 Views)

Hi ColWal,

 

It sounds like you are getting the data but having trouble accessing the raw decimal value of the first element in your LIN frame. The raw data comes in as an Array of Clusters.

 

As you can see here,

 

AccessLINRawData.PNG'

To access the data, we can index the array to get a single LIN Frame, and then use unbundle by name to get just the U8 Array of data, after which we can index array to get the single first element from the frame. You can then use that data in LabVIEW however you need it.

Joey S.
Senior Product Manager, Software
National Instruments
Message 2 of 2
(2,532 Views)