LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI help!

Hello All,
 
I'm attempting to integrate 2 programs together... but I think thought that a SUB-VI would be kinda useful.
I took an existing VI to calculate strain, added some connectors and tried running the program. However, it seems that things aren't as simple as I had hoped they would be.
 
In this case, the the whole program stops after one loops. I was wondering exactly how should the SUB_VI be like. I'll attach all thee files.
 
 
--> this is the original VI that I want to transform into a SUBVI
 
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 1 of 7
(2,562 Views)
--> this is my original program
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 2 of 7
(2,558 Views)
And this is the integrated sum of everything: (that fails to work)
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 3 of 7
(2,556 Views)

Without looking too closely to your code the first thing I see are the controls connected to your loop's "stop sign". If the string control has chars the "empty string" check will return a False which your NOR will make a True, which is the stop signal for the loop. It will execute once because a While loop will always execute once.

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 7
(2,553 Views)

Sorry could you detail a bit more... I didnt really understand what u said ...

 

*clueless*

Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 5 of 7
(2,549 Views)
Oh! I managed to make it wokr *(not sure what I changed)*.
 
but however, theres still problems...
 
A.k.a The Value received is not correct!
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 6 of 7
(2,542 Views)
I don't think that your second example works either. In both cases ("14" & "15") the terminate node of the WHILE loop surrounding everything is wired to a NOR which has as one of it's inputs the "Empty string" check. This Empty string check is used to determine if the operator has entered a batch description or whatever, but the problem is that if the operator has the "empty string check" returns a False (the string is not empty) which the NOR converts to a TRUE, which tells the loop to stop. It executes the loops code once because a while loop will always execute once (it is how LV2 still globals work), but then it stops, so you see it work once and then stop. You need to rethink what are the loops stop conditions, maybe making not having the information select a case around the rest of your code, preventing it from executing, rather than terminating the loop. You have an AND just after the "empty string" check whose output isn't wired to anything, and you may have wanted the stop to be conditional on more conditions, but as it is if you have data in your string the loop will stop.
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 7 of 7
(2,540 Views)