LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find position

Solved!
Go to solution

Hello,

 

I have several huge files. The problem is when I would like work with them, it's very long.

That's why, I try to search the position in the file. It's a same principe when you search one word in a dictionnary. If you search the word "painter" you known it's after the middle of the dictionnary.

Therefore you go directly in this section.

I would like apply the same idea but instead of a word I'm looking for dates. But it doesn't work.

 

You can found in attachment my vi.

 

Thank in advance.

0 Kudos
Message 1 of 21
(4,283 Views)

I believe your looking is called a binary search. for the principle just type that into google

 

i have found an example on this site but have not looked into it to see how applicable it is too you tho

 

http://zone.ni.com/devzone/cda/epd/p/id/220

 

hope it helps 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 21
(4,280 Views)

Hi kourte,

 

maybe the problem is your mixing of the state enum with some file position numbers in case "1" of your case structures?

 

I suggest making that enum a typedef!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 21
(4,279 Views)

Helo Akiel and GerdW,

 

Thanks for your help.

  


Akiel a écrit :

I believe your looking is called a binary search. for the principle just type that into google

i have found an example on this site but have not looked into it to see how applicable it is too you tho
 
http://zone.ni.com/devzone/cda/epd/p/id/220


hope it helps


  

 I have try this solution before but doesn't correspond completely to what I want.


GerdW a écrit :

Hi kourte,

 

maybe the problem is your mixing of the state enum with some file position numbers in case "1" of your case structures?

 

I suggest making that enum a typedef!


 Oops, I have change one thing before send the file and I don't see it change my enum. But the problem comes not from here.

0 Kudos
Message 4 of 21
(4,266 Views)

Hi kourte,

 

"Oops, I have change one thing before send the file and I don't see it change my enum. But the problem comes not from here."

I do believe that's part of the problem when you screw up your state machine like this!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 21
(4,252 Views)

Hello GerdW,

 

yes it's a part of my problem, thanks. I have correct this error but it's around in circles... I get no result

0 Kudos
Message 6 of 21
(4,250 Views)

Hi kourte,

 

you still screw up your statemachines.

In case 1 you don't provide a new state but instead wire the file position as new state. I believe this will not work...

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 21
(4,243 Views)

Hi GerdW,

 

I have considered your comments but I have no information that appears.

Do you see why?

0 Kudos
Message 8 of 21
(4,208 Views)

Finaly, I successful to display informations on my array but it don't display the good information...

0 Kudos
Message 9 of 21
(4,194 Views)

someone has an idea ???????

0 Kudos
Message 10 of 21
(4,162 Views)