LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Empty String from Array

Solved!
Go to solution

Hello All,

 

   I am using LabView 2020 to run an automated end of line test stand used in production. If the DUT passes, the program queries the serial numbers from a SQL database issued for that job, increments it by one and then saves the new serial number and the test results in a SQL database. If the DUT fails no serial number is incremented but it DOES save the failure test results in the same database.

 

  The problem I have is after a failure the serial number field in SQL is null. After the next part is tested, and the program queries the serial numbers for that job to increment the latest the null in the serial number field comes up as an empty string constant in the array. This causes the next serial number once a DUT passes to be set to 1; If there are multiple failures in a row an empty string constant shows up for each failure so the number of empty string constants varies. How can these be deleted programmatically?  

0 Kudos
Message 1 of 3
(2,379 Views)
Solution
Accepted by topic author Dennis_B.

Seems like a funny way to handle data, but this is how you can get rid of empty string constants from an array of strings:

capture.PNG

Message 2 of 3
(2,361 Views)

Thank you Greg. I did not know that you could make indexing conditional like that.

0 Kudos
Message 3 of 3
(2,294 Views)