LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop and case structure problem

I want to calculate some values using matlab script and have four file path and want to calculate for all them these values. I started to create a vi for only one but i'm confused now how do calculation for other file paths. I think i need while loop and case structure again, but it is not effective (case in while loop in case and again while). 

(Actually there is another problem about tdms read function, matlab script give error when tdms read function in while loop.)

Is there a control for these four file path or do i create different vi? 

Any suggestions will be appreciated. Thanks!

0 Kudos
Message 1 of 6
(2,548 Views)

Why do you have so much duplicate code? All you script nodes are nearly identical and I am sure you can combine all calculations into one. What is the error you are getting?

0 Kudos
Message 2 of 6
(2,525 Views)

Something like this

 

180514_trial.png

Tim
GHSP
Message 3 of 6
(2,515 Views)

Thank you for your reply. I have four tdms file has five column data. I will calculate all these columns and see the results. I did this vi for only one tdms file, i want to calculate for others at the same time. I was stuck with repetitive while loop and case structure. 

I'm new user of labview, so i'm doing every thing step by step but I know it is not effective. I tried above solution to solve. It seems like okay. Also, I will change matlab code, after that i think about how i represent it in labview. 

0 Kudos
Message 4 of 6
(2,465 Views)

Thank you for your reply. I did some changes in your vi. Because i have five column, one of them is reference. Other four column will calculate according to this reference. I add a case structure, while loo again. Now, it works. 

Thanks!

 

0 Kudos
Message 5 of 6
(2,462 Views)

@oztaymor wrote:

I add a case structure, while loo again.


Why?

0 Kudos
Message 6 of 6
(2,434 Views)