11-07-2015 12:50 AM
This might be a stupid question which is very easy to achieve in C++.
I searched for 20 pages and couldn't figure out how to solve it.
Basically we want to start from some point (200MHz), take 10MHz as a step, end at some point(300MHz).
First it output a 200 MHz signal for 10(variable) seconds, then output a 210 MHz signal for 10 seconds, then output a 220 MHz signal for 10 seconds, blablabla.
Thus we need a variable that initialize itself at the beginning, add "step" at each iteration.
However, I can't find a variable (That can store value) in LabView that can help me to do this.
The Array in LabView can store value, yet it is quite awkward to use array.
The C++ function (somehow) looks like this.
cin >> startpoint >> step >> endpoint;
cin >>duration;
a=startpoint;
b=step;
c=endpoint;
d=duration;
for (i = 0; i< (c-a)/b; i++)
{
RFoutput(a);
Wait(d);
a=a+step;
}
Is there anyway to use LabView to realize this?
This might seems stupid, but I am stuck for a pretty long time!
Thank you very much!
Solved! Go to Solution.
11-07-2015 01:12 AM
If you think arrays are awkward to use, you need to start with a few basic LabVIEW tutorials before attempting a simple program.
In any case, look into shift registers to maintain state between loop iterations. You could also create an array ramp covering your values and then autoindex at a FOR loop boudanriy. There is even a function called "ramp pattern".
11-09-2015 06:16 PM
Finally I found ramp pattern is very handy. Thanks!