LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Large Text file

Hi GerdW,

 

How can I check both in one loop?

How can I get the signal dead without File end point?

 

Munna
0 Kudos
Message 21 of 25
(751 Views)

Hi Munna,

 

you said you know the CAN signal send interval. The signal will be received in this interval (or earlier, when there are user events). So when 2 intervals are over without receiving a new value the CAN signal is dead…

 

That's what I interpret from your previous descriptions.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 22 of 25
(748 Views)

Hi GerdW,

 

User Event will occurs anytime. We can’t take this as reference to check signal dead.

And also we can’t consider Send interval. Because here I’m reading Data by lines not with signal intervals.

Line position is not same even though signal Send interval is same. Because some other signals will add in-between.

 

Please look at this sample file. It’s having Signal & value.

Based on this, I want to read Signal A up to end.

If Signal A is dead (from 9993) then I need to display NaN else previous value.

 

 

Munna
Download All
0 Kudos
Message 23 of 25
(739 Views)

 Munna,

 

how do you decide it is the very last message "A", when the last signal value is received in row 9993 and file itself only has 10033 rows?

Additionally "A" has intervals between ~20 and ~80 rows, so in my opinion I would guess "A" is still alive for the rest of the file!

 

When you don't know anything else about those signals it seems you need to scan twice…

 

I used this one to scan your files:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 24 of 25
(730 Views)

Hi GerdW,

 

Thanks for nice snippet.

 

This is just a sample file. As per this, Signal A value ends at 9993 (Manually I checked :D).

If file is ended & Signal A is not coming (after 9993) it means I need to consider 9993 is end point for this signal. After 9993 I need to Display NaN.

 

I think we need to scan file twice.

Instead of reading text file (2 times), at 1st convert text file Raw data to CSV and while reading we will trace End points for each signal. After getting End points, again we will read CSV to replace value with NaN.

Munna
0 Kudos
Message 25 of 25
(721 Views)