From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-08-2014 10:38 PM
hi,
i have a list of arrays which need to be use as input to decision making. attached are the VI and input file. When high_data is >10, it must perform the squareroot which is under the True condition. When the high_data is less than 10, it should return zero whcih is under False condition. i tried to use case selector but it seems array cannot be use for case selection. Can anyone help me with this. Thanks
Solved! Go to Solution.
04-08-2014 10:54 PM - edited 04-08-2014 10:56 PM
First of all, you have race condition due to the blatant overuse of a local variable. Most likely, the local variable gets read before the terminal of the array gets valid data. Remove the local variable and use a wire directly. Remember, LabVIEW does not execut top to bottom or left to right. Execution order is fully determined by dataflow alone. If you have several CPU cores (and you probably have), things can even execut in parallel.
Second, have you tried to simply wrap an autoindexing FOR lop around the case structure? Then clean up the false case, which needs a scalar instead of an array, etc.. There are also loop-free solutions to this, but let's stick to the basics.
04-08-2014 11:18 PM
hi altenbach,
I do not really understand how to do the "wrap an autoindexing FOR lop around the case structure? Then clean up the false case, which needs a scalar instead of an array" because im still new to labview. can you share the vi? thanks
04-08-2014 11:31 PM
Just try what I said. 😉
04-09-2014 02:54 AM - edited 04-09-2014 02:54 AM