LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To find the continious element occur in a array

Hey I did a program that it will search the 1 number present in a excel and the excel sheet will be convert into array and it will automatically develop a graph by the help of time stamp . I need to find the continuous occurrence of 1's for 30 min and I have to display it in the front panel.  In this I have attach the labview code

Download All
0 Kudos
Message 1 of 6
(3,335 Views)

You have a plain delimited text file. adding an xls extension does not make it an excel file.

 

Is the attached code a simplified version of the full program? It seems extremely convoluted. The event structure really does nothing. Why is the path control invisible? What are you reading the same file over and over 10x per second. Does it ever change? I've never seen a while loop stop the way you determine the stop condition. Pure Rube Goldberg. What is the purpose of the notifier? The notifier is using a 100ms timeout, same as the event structure timeout. Smells like an unpredictable race condition.

 

I strongly recommend to do a few simple LabVIEW tutorials. If you would continue with the current code you would just be just digging yourself into a deeper hole.

 

Please explain in simple term which column contains the relevant data. Finding a continuous stretch of 1s is trivial using a FOR loop with a shift register. There are even examples in this forum. Reading the entire file only requires a single function.

I cannot quite imagine how you want to display the result since they are all 1s, it is relatively boring and all you really need to display is the start and stop time, for example.

0 Kudos
Message 2 of 6
(3,313 Views)

Thank you this program is a subvi . This program is in event structure bcs when we press a button in main VI the this subvi will pop out and when we close the subvi it will goes automatically to main Vi

0 Kudos
Message 3 of 6
(3,238 Views)

@Sahaana wrote:

Thank you this program is a subvi . This program is in event structure bcs when we press a button in main VI the this subvi will pop out and when we close the subvi it will goes automatically to main Vi


That's a matter of the "subVI node setup" in the caller and does not require an event structure inside the subVI.

 

Please answer some of my other concerns so we can help.

0 Kudos
Message 4 of 6
(3,222 Views)

You can see in the excel sheet the data is logging as 1 and 0 only I just want to see when the 1 occur continuous for 30 times it should get  stored and it should ask the reason why and it should show the start time and end time of the  1 that occur continuous.

0 Kudos
Message 5 of 6
(3,192 Views)

hi sahaana, please clean up your vi.

lots of dead/duplicate code. which makes it really difficult/unpleasant to help you out.

 

plz remember that ppl here willing to help you, do that on their own time, there is no need to waste that time.

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 6 of 6
(3,154 Views)