LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric array blank fields

Solved!
Go to solution

Hello,

 

I am trying to create a numeric array indicator that contains blank fields for all the odd indexes. For example, (i= 1, 3, 5, etc...) Right now I have a case structure to determine if the index is even or odd. For an even index, I pass in the appropriate values into the "Insert into Array" function. For the odd index, I am unsure of what to wire to the "new elements/subarray" connector pane to generate a un-intialized value. Right now, I am wiring the infinite constant to use as an example. Ideally I want the field to be blank. Thanks for the help!

 

 

Download All
0 Kudos
Message 1 of 8
(4,337 Views)

There is a function under the array palette called 'Interleave 1D Arrays'.

If you take your array, then interleave an array of all 0's, this should do the trick. 

Cory K
0 Kudos
Message 2 of 8
(4,312 Views)

hello,

 

i can't think you can have uninitialised value in filled array ,but zero,

 

if you don't want any caractere and use string array for displaying as you want, see pict: 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 3 of 8
(4,307 Views)
Solution
Accepted by topic author Newbie217

A numeric cannot be blank.

 

If it is just an indicator, you would just substitute a string instead. It can be made to look the same. Here's one code possibility.

 

 

Of course if half of the elements are always the same (blank), it does not provide any useful information to the operator. You might as well just display the even elements without any gaps. This saves you FP space.

Message Edited by altenbach on 12-22-2008 06:05 PM
Message 4 of 8
(4,285 Views)

Given that there is no such thing as a "blank" number the real question is, "What do you want the behavior of the odd-numbered fields to be?" Is there going to be some math done on all the elements of the array? Will they be later replaced with real data? We need some more details concerning what you are trying to accomplish.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 5 of 8
(4,272 Views)

If the blank value you desire is for display purposes only, then you would use the convert to string examples already given. 

 

If you want to pass the array to a subvi or return it to a calling vi for additional processing, you might want to replace Inf with the special flotaing point value NaN.

Message 6 of 8
(4,218 Views)
I mainly want to create a blank field for display purposes. The string function looks like it will do the job. Thanks for the help!
0 Kudos
Message 7 of 8
(4,177 Views)
Of course if you want to get fancy, you could make an xcontrol that acts like a numeric but displays a certain specified value (e.g. NaN) as blank.
Message 8 of 8
(4,172 Views)