LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time measurement

Dear forum members. I do real-time measurement and on attached picture named by "real time 1" showed my measurement result. If you see start from center point the reference level go down and after continue from there. But it should be like pictured "real time 2". I found 1 algorithm how to solve that problem, but i think inside of Vi something wrong, could you help me to solve this problem? How can i increase reference level if suddenly go down....?
 
Thanks in advance
Sincerely yours
Harutyun Melikyan!
Download All
0 Kudos
Message 1 of 6
(3,571 Views)

I guess you make the real-time measurement at the "create random number".

One think it does not make any sense is that you continiously reverse the array of the shift register.

 

0 Kudos
Message 2 of 6
(3,564 Views)
Thank you for attention. Actually i find the algorithm for finit array, but for real-time cannot. I am attaching 1 solution for finit array. But how it make for real-time case...?
0 Kudos
Message 3 of 6
(3,561 Views)
I am not sure i understand your problem.
Just use a while loop , as you did, but without the reverse array. I think you should switch the two inputs of the build array too. So the new element will go the end of the array.
0 Kudos
Message 4 of 6
(3,557 Views)

Thank you. Please see this attached Vi. When i have finit array, in that case i can find out any element i want, for example in this case the last 2 elements are number 7 and 8, and i need to compare last 2 elements everytime. But real time measurement case i cant find out last 2 elements, so i reverse the array and number 'n' becomes number 0, and number 'n-1' becomes 1. so after i can do comparison and the last  i will reverse array back. In my case first i compare number 0 and 1 elements of array, after 2 and 3, and like that continuesly...If 'n' minus 'n-1' less than 0.1 the array continue like original, but when 'n' minus 'n-1' greater than 0.1 the last element 'n' changes to 'n-1' and continue the next....I think i wrote by details and now you fully can understand the problem.

Thanks. 

0 Kudos
Message 5 of 6
(3,550 Views)

"But real time measurement case i cant find out last 2 elements,"

You can always find the last two elements. Use the "array size" function. Ths will give you a number , let's say 16. The last two elements of the array are the index numbers 14 and 15 (because the first element is the zero).

0 Kudos
Message 6 of 6
(3,545 Views)