From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I use arrays to reduce my code 'novice'

I have the code working but I have a lot of redundant code and do not know how to use arrays to simplify it. I have attached my VI, any suggestions or guidance? This is my first time using LabVIEW so im pretty lost.
0 Kudos
Message 1 of 2
(2,164 Views)
I suspect that there are lots of different ways to achive what you are looking for.  For the subtle approach, I stuffed all the booleans into a cluster.  Then I noticed that you structured the enum to alternate between light and don't light.  So, divide enum by 2, take it to 2**x, convert to array of booleans, convert to cluster (do not forget to right click on the convert and change to cluster size to 42).  Note that this will be very difficult to maintian.  Also, I suspect that there is a similar trick for the case structure, but I cannot figure out what the pattern is / is supposed to be.


Message Edited by jasonhill on 08-11-2006 01:21 PM

0 Kudos
Message 2 of 2
(2,159 Views)