Hi Siema!
I would like you to clarify your request a bit, as I'm a little fuzzy on the details.
1. I understand you want to constantly measure a sine wave, and multiply it with a value that you have on the front panel. Do you always want to do this multiplication, or only if the threshold is exceeded? (Your threshold is 0,9*MAX_AMPLITUDE)
2. Do you want to check the threshold for the original sine, or the multiplied sine?
3. I'm also not clear on the indicator value change detection that you want. If you change the control value, do you want to check your threshold at that exact time and only write new data if it exceeds 0,9*MAX_AMPLITUDE (which means that you won't always have new data in the array), or do you want the change to wait for the next time the threshold is met, and then write data (which means that for every value change, exactly one item is generated in the array).
4. Could you please tell me a little more about your application in general? I think if we can see what you want to accomplish, we can help you better, or perhaps find an easier solution.
Kind regards:
Andrew Valko
NI AE
Andrew Valko
National Instruments Hungary