LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to array and shift register

Hello everyone

I made a program to read files, verify what's fail is and then create an 2D Array, to export an excel

I compared two different 1D arrays and then create the 2D array

I think that my code is to big, and it can improve

Maybe with a shift register, but I'm not sure how to start

Anyone Can help me?

 

 

jesusglzFELE_0-1650407644948.png

 

0 Kudos
Message 1 of 4
(1,376 Views)

The very first thing that strikes me from looking at the picture is that there is a LOT of redundant code.  See if you can make a subVI that can replace all the redundancy; see if you can see the patterns.  The good thing about a subVI is that if you have to change the algorithm, you just do it in one place, instead of trying to remember every instance of that redundant code and quite possibly miss a few instances.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 4
(1,370 Views)

Hi,

Could you please attach an old version of the programme, I tried to build a system based on you description, it may be a solution for your project :

 

1. Initialize : Initialize shift Register with files path.

2. Read txt : Read Txt File and Display (Station ID, Serial Number, UUT Result ) in an Array.

3. Search for Failed Test Result : Search the Index in which the Result : Failed.

4. Write Excel file : Write the data to Report Excel file (add the report file programe ).

5. Close : Initialize the Indicators  to default value.

 

you find attached the VI. 

 

Emna20_0-1650417239966.png

 

Message 3 of 4
(1,328 Views)

Here's what I would probably do (I removed the final file output for clarity):

 

altenbach_0-1650475123784.png

 

Message 4 of 4
(1,282 Views)