LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Square wave generator with Amplitude increase over time

Solved!
Go to solution

Hi there,

 

Im very new in Labview and trying to built a square wave genarator for digital output in Labview 2018.

 

The specifications of the square wave pattern are:

 

Frequenzy: 50/s

Pulsduration: 100µs

 

Starting from 0,4mV the amplitude should raise by 0,05mV every second up to 6,4mV. The baseline has to stay at 0,4mV.

I wrote a programm (attached) wich works fine except one detail: the baseline/offset seems to decrease over time but it should stay at 0,4mV.

 

Does anybody see my misstake?

kind regards

Stephan

0 Kudos
Message 1 of 4
(2,440 Views)
Solution
Accepted by topic author Whistmaster

Amplitude gives the peak to midpoint value, offset gives the midpoint. To have a fixed base, you need to increase the offset by the same amount you increase the amplitude by 🙂

mod.png

Edit: Here's a snippet showing what I mean. I disabled the output since I don't have hardware connected.


GCentral
0 Kudos
Message 2 of 4
(2,424 Views)

It's a Very Good Thing that your program was not connected to a "real device".  Once you start your program running, you cannot easily stop it until 2 minutes pass.  If it were controlling a piece of machinery, a lot of damage could be caused in those two minutes!

 

"Starting at 0.4 mV, the amplitude should ..."  What is your starting amplitude?

Do you know how the Express VI you chose to use defines Amplitude and Offset?  What do you mean by "baseline"?

 

Bob Schor

0 Kudos
Message 3 of 4
(2,420 Views)

#facepalm

 

thank you for your help! its working now...

 

 

@bob_shore: its connected to an NI box and then to a DS5 digitimer. there is a switch to stop it immediately.

0 Kudos
Message 4 of 4
(2,414 Views)