LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Good way to see what's in an array at a given time?

Sorry if dumb question, but I'm new to learning Labview and struggle to debug sometimes because I feel like I don't have a good grasp about how to see exactly what data is being transmitted through a given wire.

For example, I find that some built-in VIs will output an array when the only input was a double, so it would be extremely beneficial for my learning to understand exactly what is building the array and what is coming out of the VI. I can open up the VI's block diagram and try to make sense of the output array, but I feel like there must be an easier way to just open up the array to see what each element corresponds to.

I have a decent programming background mostly in Matlab, Python, and C++, so finding what indexes and elements build an array in, say, Python would be very straightforward, but I'm struggling replicating that same debugging ability in Labview. Would love to hear some recommendations from people!

0 Kudos
Message 1 of 6
(107 Views)

crosspost from Reddit

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(104 Views)

Sounds like you want to probe the data

Or learn some debugging techniques.

Certified LabVIEW Architect
0 Kudos
Message 3 of 6
(96 Views)

Thanks Gerd. I hate crossposts, but I was too quick.

Certified LabVIEW Architect
0 Kudos
Message 4 of 6
(95 Views)

Look at the wire.  It will have a color, possibly a texture, and a thickness.  This is not exhaustive, but should get you started -- 

 

Color:

  • Dark Blue = Integer (8, 16, 32, 64 bit, signed or unsigned)
  • Orange = Float (16, 32, 64 bit)
  • Green = Boolean (1 bit)

Texture:

  • A textured wire is often a "cluster", a mixture of various types, each with a name, similar to a Record in Pascal or a Struct in C.  Note that Object Oriented Programming "wires" are clusters.
  • A special Cluster, called the "Error Line", has a recognizable
  • coloring and texture.

Thickness:

  • Thin = scalar (e.g. a single value, such as 5, -3.1416, True, etc.
  • Thick = 1-D Array of whatever the underlying type is (e.g. Array of Dbl, Array of U32)
  • Pair of Thick = 2-D Array of whatever.

LabVIEW Code consists of Structures (such as While Loops, Case Statements, etc.), Functions (native to LabVIEW) and sub-VIs (code written by a Developer that "extends" the concept of a Function in that it transforms Inputs into Outputs).  A LabVIEW "program" is just the highest-level VI in a LabVIEW Project.

 

This should help you navigate around well-written LabVIEW code.  If it has "wires going everywhere" and looks like a mound of spaghetti, it may work, but it is not well-written LabVIEW code.  It it takes many monitors to see the entire VI, it is not well-written LabVIEW code.

 

Bob Schor

0 Kudos
Message 5 of 6
(42 Views)

@Bob_Schor wrote:

Look at the wire.  It will have a color, possibly a texture, and a thickness


in my old age, I sometimes misread things.  Your 2nd sentence made me laugh.

I realize that it means: It will have (color), (possibly a texture), and (thickness)

But I initially misread it as if it meant: It will have (color), possibly (texture and a thickness)

0 Kudos
Message 6 of 6
(35 Views)