LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a table of values

Hi all,

 

Wondering if anyone can help. I am trying to build a chlorine indicator for swimming pools - the real thing will use a colour sensor - but a simulated randomizer is done just to generate values and show that the system works.

 

No everything works except for the table part - it plots the pH level but I really don't know how to include the chlorine level and the recommendation, I want it to plot next to it before the next set of values are put in.

 

Any help is appreciated, I'm terrible with Labview since our lecturer is absolutely useless and decided to tell us about his favorite robots instead of actually helping and teaching us how to use LabVIEW.

 

Thanks,

Ian

0 Kudos
Message 1 of 3
(855 Views)

@ianedgecomb wrote:

Any help is appreciated, I'm terrible with Labview since our lecturer is absolutely useless and decided to tell us about his favorite robots instead of actually helping and teaching us how to use LabVIEW.

 


Start with the learning resources on top of the forum. Learn about simple state machines.

 

Some tips:

  • Code that should run for an undetermined number of iterations (any toplevel code) uses a while loop, not a FOR loop.
  • The stop function should never be used.
  • Try not to use express VIs. A table is a 2D array of strings with deconrations. Build your 2D array in a shift register. Consider limiting the size and dropping the oldest entry once space runs out.
  • A 10s loop wait is too long. None of your controls will reasonably respond to user input.
  • All your cases have the same property node, so that belongs after the case structure. Only one instance needed. Properties only need to be written when their input changes, not with every iteration of the loop.
  • Your "hour" indicator does not display hours and has the wrong representation.
  • I am not sure why most of your string diagram constant terminate with a linefeed.
  • Your color clusters should probably be diagram constants.
  • You can multiply your pH by 10, convert to integer and wire it directly to the case structure. No need for comparisons. Make one case "..71, one case "72..76", and one case "77..".
  • You can show the digital display of the pH meter. No need for a separate terminal.
  • ...
0 Kudos
Message 2 of 3
(844 Views)

Thank you! This is helpful,

 

Most of this code has been slapped together from what little knowledge our lecturer has given us - when I say he is useless he is

 

we have no experience using LabVIEW however we are expected to create a complex vi that works without physically being in a lab or using equipment due to COVID.

 

Sorry for the rant, I am just a really pissed off student whose degree is on the line due to an incompetent lecturer.

0 Kudos
Message 3 of 3
(834 Views)