LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting String Array to Integer string

Solved!
Go to solution

I need that to be sure all elements are processed in the worst case.

0 Kudos
Message 11 of 22
(1,814 Views)

@Mmehrabin wrote:

I need that to be sure all elements are processed in the worst case.


You should use a while loop and stop when you run out of elements. You still have not explained the algorithm.

0 Kudos
Message 12 of 22
(1,812 Views)

Here's all you need to read the two files:

 

0 Kudos
Message 13 of 22
(1,806 Views)

Two text files are the time of rising edge two separated ones and I want to detect the latency between signal1 and signal2 (Ther are already sorted). So I transfer them into two arrays and check the first element of them. If the signal2 element is greater than signal1, it should be removed from signal2, if they are equal, both should be removed in case of the greater, signal1 should be removed and so on.

0 Kudos
Message 14 of 22
(1,803 Views)

You do that for the first element.

 

Once that is done, do you care about later elements in the arrays?

0 Kudos
Message 15 of 22
(1,800 Views)

Do you need the leftover pieces once things are removed or do you just need it for the processing?

0 Kudos
Message 16 of 22
(1,797 Views)

@Mmehrabin wrote:

Two text files are the time of rising edge two separated ones and I want to detect the latency between signal1 and signal2 (Ther are already sorted). So I transfer them into two arrays and check the first element of them. If the signal2 element is greater than signal1, it should be removed from signal2, if they are equal, both should be removed in case of the greater, signal1 should be removed and so on.


You have not explained the middle shift register where you buld an array.

 

It would be much easier to explain it with an example.

0 Kudos
Message 17 of 22
(1,793 Views)

I do not need them

0 Kudos
Message 18 of 22
(1,793 Views)

@Mmehrabin wrote:

I do not need them


OK, no need to chop up the array. Just keep track of the current index.

 

Does the code currently work as desired? What result would you expect for array5 given the example files.

0 Kudos
Message 19 of 22
(1,790 Views)

It works now. Thank you

 

0 Kudos
Message 20 of 22
(1,778 Views)