LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramp up, Hold, Ramp Down

Solved!
Go to solution

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. 

0 Kudos
Message 31 of 44
(2,228 Views)

@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.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 32 of 44
(2,206 Views)

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. 

 

0 Kudos
Message 33 of 44
(2,188 Views)

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,

0 Kudos
Message 34 of 44
(2,162 Views)

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, 

0 Kudos
Message 35 of 44
(2,151 Views)
That still sounds like Rube Goldberg code. The ramp pattern generates an array. You simply pass the array into a for loop with the instrument subVI in it.
0 Kudos
Message 36 of 44
(2,139 Views)

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....

0 Kudos
Message 37 of 44
(2,013 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 38 of 44
(2,003 Views)

your question  is good 

0 Kudos
Message 39 of 44
(1,996 Views)

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?  

0 Kudos
Message 40 of 44
(1,723 Views)