04-26-2024 10:24 PM - edited 04-26-2024 10:36 PM
Hello, wanna ask a small question.
How to return an element from an array in labview? because im trying to return an element from boolean array and check whether it is true or false, then proceed to other operation. so far I only did until generating an array and change an element inside. The location will be input by the user, the element from that location will then be taken out and check whether it is true or false. if it is true, it will carry out the specific operation and the true in that element will be change to false at the end of the operation.
Solved! Go to Solution.
04-26-2024 11:26 PM
Use Index Array primitive.
04-27-2024 01:16 AM
Thank you! Btw, is there anyway to improve this part?
The green line that connect the replace subset function, is from the for loop, is there anyway to make it clean, like connecting it to an independent block but that block represent the data from array
04-28-2024 10:33 AM - edited 04-28-2024 10:34 AM
Hi Bondorudo,
@Bondorudo03 wrote:
The green line that connect the replace subset function, is from the for loop, is there anyway to make it clean, like connecting it to an independent block but that block represent the data from array
In LabVIEW you need to obey "THINK DATAFLOW!", so the wire is the variable!
There is no "more clean" way to transfer data from source to sink than using a wire!
(You could straigthen the wire so it has no bends…)
The part to improve is your two stacked FOR loops! Here you could use a simple InitArray function instead!