LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with tidying up

Hi all,

 

Was just wondering if there are any suggestions as how to tidy the code up i have done on the far right. On the far right coming out of each of sub VIs there is a number of index arrays identifying certin bits in the selected byte. Obvoiusly this is going to very packed out and wondered is there was an easier way to achieve the same outcome by combining index array somehow. It would help if i gave the option of a better front panel display as well with the boolean indicators 🙂

 

I would want anything to diffficult as i've not been using labview very long.

 

Many Thanks in advance.

 

Rob

0 Kudos
Message 1 of 6
(3,856 Views)

It looks pretty good.  My recommendations.

 

1.  The labels with each LED seem rather long.  Get rid of the "element # - " part and leave just the code letters.  I'm assuming those abbreviations mean something to your users, while the element # does not.  If you need a more detail.  Use the ip Strip box in the control's property pages, "Documentation".  That way a user gets more information if they hover over the LED.

 

2.  Index Array is Resizable.  Sow here you break your boolean array into 3 branches to get rows 4, 5, 6,  use a single one and drag the bottom border downward.

 

3.  Converting an array to a cluster to use unbundle to get individual elements is unnecessary and a Rube Goldberg.  Again, just use Index Array and extend the border downward.. 

 

4.  If those groups of LEDs are related, you may want to put them other into a cluster and arrange them on screen how you like.  Then converting an array to a cluster would make sense (made sure the # of elements setting for that cluster is correct) because then you could just have one wire going into one cluster indicator.

 

5.  I'm not sure of your overall architecture.  You are grabbing 9 bytes of data and appending that into a string until either you get an error or stop recording.  Then you proceed to process that data using a bunch of SubVI's that aren't attached.  It means the User has to stop recording, but doesn't have any feedback because no indicators are updated until he hits stop.

0 Kudos
Message 2 of 6
(3,846 Views)

Mostly you are just encountering the same problems with having a large number of indicators that everyone else has, ideally grouping the related indicators into clusters should make things much easier to read and program.

 

With regards to the unbundle array and multiple subarrays you can just use the resizable aspect to allow access to multiple different values without having multiple instances of the tool.

 

[EDIT] Pretty much what ravens said, just with slower typing and snippets.

[EDIT 2.0] Fixed missing values for indexing 2D arrays

 

SubArray.pngArray.png

0 Kudos
Message 3 of 6
(3,834 Views)

@ogk.nz wrote:

 

SubArray.png


Actually the right most is NOT equivalent to the other two.  It will give you row 4, row 0, row 0.  It would need the 5 and 6 constants wired into the other Index Array functions to be the equivalent.

0 Kudos
Message 4 of 6
(3,824 Views)

This is what I get for trying to copy paste early in the morning

0 Kudos
Message 5 of 6
(3,816 Views)

That is fantastic advice thanks you very much. I was aware of bundles had just completely forgotten about them.

 

Apologies not attaching the sub VIs there is alot. They are just acting as filters to seperate different bytes of data relevant to certain equipment.

 

Next up taking different different bits from 2 different index arrays and giving thema b value so they can be added to form a account 🙂

 

Thanks you again appreciated

 

Rob

 

 

0 Kudos
Message 6 of 6
(3,801 Views)