LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramp function independent of Loop rate

i need to create a ramp output which is independent of the while loop execution rate.

 

please see the vi attached. will it be good if i use local variables instead of the shift register?

 

thanks. 🙂

 

Renn

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 1 of 16
(6,166 Views)

Have you checked out the ramp waveform generator in the WFM library?

 

(Some of the waveform vi's are relatively new in Labview, ((when you get to be my age EVERYTHING is relatively new!))

 

I used to always generate ramps by simply taking the increment of a loop...but the WFMs are much more elegant.  Try one, you'll like it!

 

Eric

Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
Message 2 of 16
(6,143 Views)

hi Eric

 

thanks for your reply.

 

are these in the new LV 2009? i'm now using 8.5 for an old project.

 

thanks

 

RENN

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 3 of 16
(6,124 Views)
They've been around since at least version 6i. They should be on the top level of the function palette. Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
Message 4 of 16
(6,109 Views)

As noted, they would be in the Signal Processing -> Waveform Generation palette. There's also a Signal Processing -> Signal Generation for generating arrays instead of waveforms.

 

BUT ... They are not available in the Base edition of LabVIEW. Is that what you have?

Message 5 of 16
(6,102 Views)

 thanks all for your replies.

 

i'm using lv professional development system, updated upto lv 8.5.

 

i've seen the vi's in  signal processing>signal generation subpalette. but dont get an idea on how to use them.

how the no. of samples and etc. in  Ramp pattern.vi.

 

could you please hav a look at the vi i've uploaded earlier and giv any new suggestions on how to use those vi's in libraries

for making a ramp pattern in the predetermined time?

 

RENN

Kudos always welcome for helpful posts 🙂
0 Kudos
Message 6 of 16
(6,095 Views)
The inputs to the Ramp Pattern VI are fairly self-explanatory, but the online Help provides more details. For the number of samples you can calculate that based on getting from A to B in a certain amount of time using a specific step size. In your VI you are calculating the "bar_inc.per.mS" based on Start_bar, End_bar, and bar/sec. The last I don't quite understand since it seems that "bar" is a vertical setting, not a horizontal setting, so I don't know what bar/sec actually means. What is bar/sec?
Message 7 of 16
(6,084 Views)

what i meant was Pressure increment per second. its a pre-defined value.

 

( i need to open a valve by setting voltage from 0-10).

 

in the program i find the time it takes to reach the end pressure. (end value-start value)/ pressuer increment per second=total time for the ramp.

 

(end value-start value)/ time in millisecond= pressure increament in millisecond.

 

 

 

Pressure in bar per second - is the pressure increase per second usually starts from 0 bar.

 

but i dont need steps of increase per second (since the loop executes nearly every 100ms, i need the output to be updated every 100ms. or better -pressure increment in each 10ms which runs in another parallel loop).

 

 

my application has many loops running in parallel. i doubt whether it takes much CPU time.

Message Edited by RENN on 09-09-2009 01:07 PM
Kudos always welcome for helpful posts 🙂
0 Kudos
Message 8 of 16
(6,080 Views)

you may have a glance!

0 Kudos
Message 9 of 16
(4,095 Views)

Hi sgayen,

 

you're kidding about this "best ever", aren't you?

 

- Use shift registers instead of local variables!

- NEVER hide the label of terminals in the block diagram!

- no need for sequence structure here at all!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 16
(4,091 Views)