08-05-2014 09:21 PM
Sorry Denis, you are right, it works also for decreasing, it is my mistake. So I will implement this function correctly. Once again, thank you and sorry for my post that was really not so interesting.
08-06-2014 08:25 AM
@arienai wrote:
Sorry Denis, you are right, it works also for decreasing, it is my mistake. So I will implement this function correctly. Once again, thank you and sorry for my post that was really not so interesting.
LabVIEW actually has a wonderful help system that actually works. I'm not being facetious when I say you should really try it out, if you haven't already. ctrl+h gives you context help so that when you mouse over something "of interest," you get a brief, yet useful description. For most things that is good enough, but for some things that need a better explanation, you will see a "detailed help" link which brings you to the LabVIEW help. Unlike most help systems, this one actually contains a treasure trove of useful information and between reading the context help and the detailed help, you should know everything you ever wanted to know about that thing you just moused over. 😉
08-06-2014 06:03 PM
Dear Billiko, of course I already read the help, as usual. Basically, I don't post anything there before reading help menu. But when I don't undestand something, I am happy to read some constructive answer from experts or not, because in the lab, noboby can help me on those issues.
I am using a sub vi that is the ramp up and down, a combinaison of ramp up function in serie with a ramp down. The output that I monitor with this sub vi is doing the job well and I can "see" a triangular signal of 1 period.
I have another sub vi containing the command to set and read a DC voltage supplied on the Agilent SMU (typically "DV channel,voltage, range, ...").
This sub vi works well when I manually input a DC voltage, and increases or decreases the voltage as well.
But when I put in serie the ramp sub vi + Agilent sub vi, with the output of ramp --> input of Agilent, the DC voltage IS NOT changed.
If you know any contextual help menu that can really help me to understand this issue, I will really appreciate to read it.
actual : {ramp up + ramp down}-output --> {agilent vi} {} represents sub vi - this does not work.
I know that a loop (for i=1...n) blocks the program inside the loop until it finished. But here, there is NO loop in the ramp function but a WHILE. So it should do the job.
Now I am going to create a new sub vi embedding the agilent command INSIDE the WHILE of ramp function itself.
next : {ramp up - output --> Agilent} + {ramp down - output --> Agilent}
Next I will create a 3 button function that allows to switch UP, Standby, swithch DOWN (manual mode), and a loop that allows to automate the triangular signal for N periods.
I could use the triangle function directly, but the parameters are really NOT convenient at all and can lead to mistakes for users.
08-07-2014 06:55 PM
Hi arienai,
Just so I understand, you have a sub VI that can set the DC voltage on your device but another sub VI is unable to ramp it? What behavior does it actually exhibit, rather than ramping?
Thanks,
08-07-2014 08:14 PM
Dear sassyaspy,
thanks for your interest in my program. In fact, I fixed the problem yesterday evening. I simply copied the content of sub-vi ramp, and pasted it in the main program. Now it works.
RAMP function is based on a FOR loop (not a WHILE loop as I mentioned in my previous message), and therefore once I enter in this FOR loop, there is no output displayed in the main program. So the solution to copy-paste allows me to directly insert the DC supply voltage sub-vi INSIDE the RAMP loop, thence it works.
Yours,
08-07-2014 11:33 PM
03-29-2016 07:39 AM
hello friends,
I am generating a PWM of 140 Hz constant and variable duty cycle between 5% to 95%
at initial condition I am giving the frequency at 140 Hz and duty cycle 5% till 0.5 sec, after that I need to increase the PWM signalat ramp rate of 45% per sec till it reaches to 95%
then hold time for 0.5 sec and again decreases the PWM signal at above ramp rate till it reaches 5%. . test is over
please share any examples or similar code if any one has....
03-29-2016 08:51 AM
Hi chintamani,
usually you should use a state machine when you want to handle certain states in your software (hold, ramp)…
Your state machine would be controlled by an array constant with your parameters (time, ramp rate).
Please start on your own and ask for specific problems you have in creating such a state machine!
03-29-2016 09:28 AM
your question is good
07-13-2017 08:27 AM
Hello Tim, I was looking for an example of a ramp up/down program and found yours. Genius! I just have one question: How can I modify the VI so that the output goes up/down in steps of .0008 instead of 1?