LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Index Values property of TABLE won't accept negative numbers

See attached screenshots. I have a VI that outputs data to a table, with more data than visible rows in the table, so I want it to scroll automatically as the data is sent to it. I do this by wiring the index of the test, MINUS 18, to the Index Values Row property. This works PERFECLY on my computer as shown in front panel screen shot attached. But it DOESN'T work on other computers with the same Labview (2011) and the same operating system (WinXP). On other computers it halts on the first execution when the value input to the Row property is -18, saying it's an illegal value. Intuitively row "-18" shouldn't make sense, but IT WORKS on my computer. Any idea why this is?scrollproblem1.JPGscrollproblem2.JPGut

0 Kudos
Message 1 of 14
(2,814 Views)

What is the representation of the numbers you are sending for the Row numbers, U[8,16,32] or I[8,16,32]? The screenshots you show don't tell us, but the VI would have, had you attached it.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 14
(2,808 Views)

I32

 

0 Kudos
Message 3 of 14
(2,790 Views)

Does it come up as I32 on the other computers also?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 4 of 14
(2,787 Views)

I bet you do not have Automatic Error Handling turned on on your machine, but it is on on the others.

 

Regardless, you should use the In Range Coerce function to make 0 the minimum value possible.


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 5 of 14
(2,779 Views)

YES

0 Kudos
Message 6 of 14
(2,778 Views)

Looking at the coersion dots (and duplicating them in the snip) you arnen't going to be sending a negative integer to row.

!0.png

 

As Tim said you need a In Range and coerce in there


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 14
(2,773 Views)

@hammer3 wrote:

YES


Yes, what?


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 8 of 14
(2,771 Views)

crossrulz: I was answering YES to camerond's question "Does it come up as I32 on the other computers also?"

 

Yes, there is a difference in Automatic Error Handling, and that is what made the difference in behavior. I now have it turned ON on my computer.

It doesn't make sense to coerce to make 0 the minimum value. The row input to the Index Values propertry MUST start at -18, and increasing through zero and on to positive numbers in order for the table scrolling to work properly. 

 

I found two solutions to this problem, with Error Handling turned ON:

1) change the Representation in the Index Values property cluster type def from U32 to I32, or

2) add an Error indicator on the output of the Index Values property (which shows no error).

 

Thank you all for your inputs.

0 Kudos
Message 9 of 14
(2,740 Views)

hammer3 wrote:

It doesn't make sense to coerce to make 0 the minimum value. The row input to the Index Values propertry MUST start at -18, and increasing through zero and on to positive numbers in order for the table scrolling to work properly. 


You are contradicting yourself.  In our original post you said setting the index value to -18 doesn't make sense.  And it doesn't.  The minimum value is 0.  What will happen if you coerce to 0 is the table will fill up before it starts scrolling.  This is the desired functionality.  Once you get 19 elements, then the index will be set to 1.  Your last item in the table will always be at the bottom.


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 10 of 14
(2,735 Views)