07-30-2025 05:20 PM
Hellow,
I In my VI there is a boolean selector (called measured values/Test values) meant to select between measured signals or test signals to be displayed on two indicators. I use a case loop for simply boolean "or" function to redirect the signal from a manually input test value or measured value to the indicator. The loop named Viscosity source selector works properly ( seeattached screen shoots in two modes: measurement and test). In measurement mode the signal at probe 4 (zero with some noise) is the same as probe 6 ("zero"), while manually input tst value is 1 at probe 5. But the caseloop called Temperature source selector does not work at all. In measurement mode the measured value is -40 at probe 3, but the output from the "or" function is "not executed" at probe 2 and "zero" at probe 7. In test mode the viscosity works properly too, the probe 5 is 1 and the probe 6 is 1 too. But the Temperature is even more weired: the probe 1 is 50, but probes 2 and 7 are -6.
Can you suggest me where to find my mistake? I attached my VI saved in 2017 version.
Solved! Go to Solution.
07-30-2025 07:59 PM - edited 07-31-2025 01:35 PM
07-30-2025 08:08 PM - edited 07-31-2025 01:35 PM
See if making the two cases of the same case structure as follows gives the desired behavior:
07-30-2025 08:18 PM
Before you try to put together a complex VI made from "pieces" of code lifted from pieces of the Example code that ships with LabVIEW, I recommend you do the following:
Writing your own code gets you to really look at and (hopefully) understand the various functions and operations on the Block Diagram palettes. If you follow the exercise I suggested above, you might find some Parameters or wires that are missing. Do try to keep your wires straight and horizontal (particularly the Error Line). Try to make your code all fit on a single laptop screen -- being able to see all the code is a great boon in understanding the code (without having to slide the diagram left, right, up, down while trying to remember where the data are going.
Bob Schor
07-31-2025 03:24 PM
Yes now it works. Many thanks for reminding. I completely misunderstoodd the Idea of the loop. I am a very beginner with a little experience dated on 2012 but I did not used LV since that time. Now I recall how this loop works. Thanks a lot for the help and advice regarding the Index Array too. Regards.