LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating step waveform

Hi, I am trying to generate a step waveform from 0 to 5V out of AO channel, each step is around 0.03V, and stays for 600ms on every step, therefore there are hundreds of steps, I will have to use loop functions. I tried using insert array VI to append all the arrays from every step, but it only gives me the final step voltage of the loop for the whole time. I did find a step function VI in Math, but couldn't figure out how to use it. Does anybody have any idea or example for this kind of application? Thank you in advance!

Regards,
Jenna
0 Kudos
Message 1 of 8
(4,835 Views)
Take a WHILE loop and add a shift register.

Initialize the shift reg with 0.0 (the initial value).

Inside the loop wire the left shift register through the right side of the loop to make a tunnel.

Pop up on the tunnel and turn on auto-indexing.

Inside the loop take the left Shift reg, and add your step (0.03) to it.

Wire the result to the right-side of the shift reg.

Compare the result to your end limit. Stop the loop if sum > limit.

Use the array from the auto-indexing tunnel as your ramp function - plot it on a graph to make sure it's what you want.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 8
(4,835 Views)
Hi Jenna:

Couldn't be much simpler. Look at the attached vi.

Good luck!

Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 3 of 8
(4,835 Views)
Hi,
another way is to use the combination of "Functions->Analyze->Signal Processing->Signal Generation-Ramp pattern.vi" with "Round" function.

The example is attached.

Good luck.

Oleg Chtuko.
0 Kudos
Message 4 of 8
(4,835 Views)
This is also very good too! By the way...if you use the waveform graph to check if this is working, be SURE to turn off the linear interpolation!!!! Otherwise, all you'll see is a ramp, and you'll think the vi is broken, when it's working just fine. This drove me bananas for days on another vi i was working on!

Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 5 of 8
(4,835 Views)
Hi chula and Oleg,

Thank both of your suggestion and examples, I have got it running successful with my application now. Thanks a lot for your help!

Regards,
Jenna
0 Kudos
Message 6 of 8
(4,835 Views)
Your bill is in the mail. 🙂
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 7 of 8
(4,835 Views)
Hi Oleg,

let me add an example - with little "show...."


regards
Werner
0 Kudos
Message 8 of 8
(4,835 Views)