I can't say I agree with you there. If you set requested time to 10,
for example, shouldn't it provide the value at time ten and output a
value near 10 for the actual time? I think 9 is the magic number
because I arbitrarily set that example loop to run ten times. Set the
loop to 20 iterations and then try the your hypothesis, you'll get the
same error as soon as you hit the tenth loop.
Still my question was, why does the actual time value increment and not
just match the requested time? I've figured how to solve the problem
now, even though i don't know what was causing it. i needed to reset
the Average DC/RMS function which was generating the waveform being fed
to the Get Y VI. It seems the apparent incrementing behavior was a
result of succesive times being assigned each time the Average DC/RMS
Vi was run in the loop.
To see a similar behavior, do this with the example VI I posted.
Set
the sampling info to, for example, 1000,3000. With the signal
generator in the loop, the signal is regenerated with successive time
ranges each time the Vi is run. First loop time range: 0-3
seconds, Second loop 3-6 seconds, etc. In order to prevent the
error you have to request a value within the time range of each
loop. In other words requested time has to be incremented along
with the time stamps. (Interestingly, if you set requested time
to greater than the time range, it will coerce to the largest value,
but if you set the requested time to less than the time range, you get
the out of range error.) Now move the waveform generator outside
of the loop, so it is only generated once. Now the time range is
always 0 to 3 and you can request any value in that range on each
succesive loop without seeing any odd behavior.
So, why does LabView add successive time ranges to waveforms generated
in a function within a loop? And why doesn't relative time work
from the beginning of the waveform time range rather than as an
absolute time? Is this a bug?
Thanks for the inputs. Though you didn't answer the question, you
got me thinking in a way that made it possible for me to solve the
problem. Still wondering what the developers intent is with the
time ranges, though. Seems very counterintuitive.