LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9866

Hi all,

 

I am using a NI 9866 Xnet LIN module with a cDaq-9174. I try to read my LIN2.0 frame and record them in a TDMS file. I have no problem to read the LIN frames but I don't know how to save the frames. I would like to separate the data by bytes as you can see in the following table :

 

TimeStamp Data ID Type Event ID Event Slot? Echo?
                           
                           
                           
                           
                           

 

I really need help on this topic !! Can someone help me please ? I attached my .VI 

0 Kudos
Message 1 of 6
(3,022 Views)

Hey,

 

to be honest, I don't understand your problem.

You can receive the LIN frames, right?

The "LIN Frames to Table" should convert the content of the LIN frame into the corresponding peaces (ID, Type, Data, etc). And you write the ID, Type, Data etc in different channels of a TDMS file. This looks also OK for me, even if I didn't executed your VI.

The only thing I would recommend is to use numeric data types for Event_ID, ID and so on because it is easier to process the data if they are in the correct format.

 

Stephan

0 Kudos
Message 2 of 6
(2,995 Views)

Hello Stephan_D,

 

Thank you for your answer !

 

I will try to be clearer...Yes, I can receive LIN frames !! I use the "LIN Frames to Table" to save the frames. My problem is that I want to separate the data by Byte.

Actually, I have only 1 "Excel case" for 8 data bytes and I would like to have 1 "Excel case" for 1 data bytes (or 8 "Excel case" for 8 data bytes)

 

Actually :

data
AABBCCDDEEFF0011

 

Needed :

data
AA BB CC DD EE FF 0 11

 

I hope you understand what I need. Thank you.

 

Renaud

 

 

0 Kudos
Message 3 of 6
(2,989 Views)

Hi Reno,

 

split your U64 number into 8 U8 numbers. There is a function called SplitNumber. And there is a function called TypeCast…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,986 Views)

 

In fact, I don't know how to separate the data from the string table...Because I need to separate first all the informations (TimeStamp, Data, Id,...) from the string table, then to separate the data by bytesand after that create a new table which I can save in my .tdms. Is it right?

 

Do you have any example that show how separate my 2D string table ?

 

Renaud

 

 

 

 

0 Kudos
Message 5 of 6
(2,977 Views)

Hi Renaud,

 

I don't know how to separate the data from the string table...Because I need to separate first all the informations (TimeStamp, Data, Id,...) from the string table, then to separate the data by bytesand after that create a new table which I can save in my .tdms. Is it right?

No, that is NOT right. Infact, it is completely insane aka Rube-Goldberg!

 

Do you have any example that show how separate my 2D string table ?

You don't need that!

 

You already read the LIN frames and you get the frames packed in a cluster with all elements seperated in their own data type. The PAYLOAD is provided as an array of U8 - just the way you need them…

 

Why do you want to convert the LIN frames to a string table in the first place?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,972 Views)