if time = 3 seconds, how do i set the values of the time steps 0,0.1,0.2,0.3,0.5,1.0,1.5,2.0,3.0,5.0 to -9999 from time =3 seconds

I have 18 inputs (arrays) which contain certain statistics and if time  = 3 seconds, set the values of time step 5.0 to -9999.0.
I was wondering if there is an efficient way to do this without using a lot of case statements?
Thank you.
x9561 (148438)
8/16/2005 3:10:50 AM
comp.lang.labview 35210 articles. 1 followers. vasusachin24 (1) is leader. Post Follow

5 Replies

Similar Articles

[PageSpeed] 59

Hello AdrianT, 

it's not really clear to me what you want to do...
I suspect: you have an array containing values and you want to output
them with a fixed timing of 3 seconds: you should use a for loop
autoindexing trough your array and sending the value to your
indicator/output/whatever. Put a "wait for next multiple" into your for

Or do you want to have a minimum time delay of 3 seconds? Again use a
for loop, get the time value and use a InRange&Coerce with minimum
set to 3 seconds...

Or you should explain more precisely what you need...
x9561 (148438)
8/16/2005 7:40:33 AM
Thanks for that.
Let me explain.
The time may vary. Let me give an example. if time  = 2.1, I want to set the time step's  3.0 and 5.0's values to -9999.0.
if the time =0.1 seconds then I want to set 0.2,0.3, 0.5 etc values to -9999.0
etc ....................................................................
Can you please help?
Thank you.
x9561 (148438)
8/16/2005 10:40:39 AM
Hello TUDS, 

do you use different accounts/nicknames ?

Well, that's easy, at least for a sorted array:
Search for your time-value in the array (Threshold 1D array). Fill all
elements from that index till the end with your "error condition"
For filling the array you can do: calc how many elements have to be
written, "initialize array" with -9999 and number of elements, "replace
array subset" with initialized array starting from index. This way you
don't need a for loop.
x9561 (148438)
8/16/2005 11:10:31 AM
Thanks for that.
But I  was wondering, How do i replace the first 3 rows of an array filled with -9999.0?
Thank you.
x9561 (148438)
8/18/2005 1:10:54 AM
Hello adrianT, 

first you asked for filling all elements in an array starting from a given index (=element to be searched).
Now you ask to fill the array up to that index:

It's more or less the same: find the index of the given element, make a
for loop and replace all elements from start to that index (or index-1,
and don't forget to use a shift register). Or as I mentioned above:
create an array with "Initialize Array" with the needed number of
elements and replace all elements in one step.

You speak of "rows"? Do you have a 2d-array or a 1d-array? (Well it's
nearly the same, you just have one index more to keep an eye on...)
x9561 (148438)
8/18/2005 7:40:37 AM