LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WTF: Constant has properties?

 

 

1149.jpg

No need more words,just look at the picture and try the code.

Why there is no prompt for the difference?

0 Kudos
Message 1 of 10
(3,061 Views)

Hi avater,

 

which "properties" are you talking about in the title of your message?

 

You have two array constants, which show different dimension sizes despite both are empty: LabVIEW can handle (2D) arrays having some rows, but no columns. Such arrays are still empty…

(You probably created those constants in different ways, did you?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,057 Views)

Easy enough to recreate.

 

 

Edit the first element in one of the array constants (row 0, col 0). Now right click on the element and delete the row. Run the VI, and you'll see the size for that array is {0,1}. Delete the first column, and re-run - the size for the array is now {0,0}.

 

The most important thing, as you say, is that it's still empty!

---
CLA
0 Kudos
Message 3 of 10
(3,041 Views)

This has also come up from FOR loops with the inner loop iterating 0 times, but the outer loop iterating N times.  The dimension lengths is not exactly a property as it is part of the data structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(3,017 Views)

Yes, diagram constants have properties, such as display format, text and bg color, font, value, etc.

 

This is completely independent of what you seem to be trying to discuss.

 

Any dimension of an array can be zero or nonzero and there is nothing wrong with that. An array is empty if at least one of the dimensions is zero. There are plenty of discussions here with more details.

0 Kudos
Message 5 of 10
(2,970 Views)

The problem is that this can be very confusing,while they have the same outlook.

0 Kudos
Message 6 of 10
(2,933 Views)

@avater wrote:

The problem is that this can be very confusing,while they have the same outlook.


They may have the same outlook, but they excel in their differences, that's the latest word!  

 

Bob Schor

Message 7 of 10
(2,930 Views)

@avater wrote:

The problem is that this can be very confusing,while they have the same outlook.


It does not need to confuse you. Unless you crafted it yourself for a very specific purpose, it does not really matter. Focus on programming instead 😄

0 Kudos
Message 8 of 10
(2,922 Views)

@Bob_Schor wrote:

@avater wrote:

The problem is that this can be very confusing,while they have the same outlook.


They may have the same outlook, but they excel in their differences, that's the latest word!  


I don't really like the amount of Access, that this Project has. I think with some more help we could (power) Point to the issue. Smiley Tongue

0 Kudos
Message 9 of 10
(2,873 Views)

I'll just leave this here.

0 Kudos
Message 10 of 10
(2,867 Views)