LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help with Loops

Solved!
Go to solution

Hello all,

 

I am a beginner in Labview. So need help in Loops. Please check it out the attached vi and suggest me the procedure which i followed is efficient or not. If not correct me. 

 

Waiting for reply

---
Silver_Shaper | CLD
0 Kudos
Message 1 of 12
(3,168 Views)

Have you ever wondered what would happen if you would replace the "equal TRUE" with a plain wire? 😮

0 Kudos
Message 2 of 12
(3,164 Views)

For arrays, use the primitives to convert the booleans to (0,1)s then sum the array. I've modified your first loop to what I've described in the attached snapshot, you can do this for all your loops:

 

quicker.jpg

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 3 of 12
(3,162 Views)

altenback - you could always use the function depicted in my icon instead Smiley Very Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 4 of 12
(3,157 Views)

Thronic You Rocks.... Thanks for the fast reply

---
Silver_Shaper | CLD
0 Kudos
Message 5 of 12
(3,154 Views)

Thronic You Rocks.... Thanks for the fast reply

---
Silver_Shaper | CLD
0 Kudos
Message 6 of 12
(3,154 Views)

Not so fast. Except for the first loop, a simple "or array elements" would be all you need. 😉

Message 7 of 12
(3,149 Views)
Solution
Accepted by topic author Silver_Shaper

According to the diagram comment, the array sizes are all 16, so here's all you need: 😄

 

 

 

(Hmm, the snipped clips the booleans in the diagram constant, just ignore that)

 

"AND array elements" checks if all a true (top wire)

"OR array elements" checks if at least one is true. (all others)

Message 8 of 12
(3,141 Views)

Please check it out.

---
Silver_Shaper | CLD
0 Kudos
Message 9 of 12
(3,125 Views)
  • Again, for each little case structure that adds 1 to the value, replace the case structure with an Add primitive, convert each conditional boolean to a (0,1) and wire it to the second terminal of the Add.
  • Move your "Shift Reg Input" and "Shift Reg Output" terminals outside the error case structure, wiring them directly for the error case, to ensure the data is not lost in the event of an error at the error in terminal
Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 10 of 12
(3,113 Views)