LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a sweep signal with a taper

Here you go.  (This is a snippet - just drag this picture onto a block diagram).

Sweep Snippet 2.png

 

Sweep2.PNG

 

When changing frequencies, it's important to keep track of PHASE, not time.

Each step computes a delta THETA (phase) and adds that to the total.

That means that each step starts where the last one left off.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 11 of 18
(1,371 Views)

The "2 & pi" in the comments should be "2 * pi".

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 12 of 18
(1,368 Views)

Just think in phase steps (and live with the small error due to phase accumulation)

phase sweep.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 13 of 18
(1,365 Views)

too late  😄 

 

Edit:  and the same math!  🙂 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 14 of 18
(1,362 Views)

Tried out the build array but it didn't work out. It just ploted the arrays seperately in the graph.

 

If you wire two (or more) 1-D arrays into the BUILD ARRAY function, by default, it will create a 2-D array.

The graph will happily accept a 2-D array and plot 2 or more plots for you.

 

if you pop up on the BUILD ARRAY function and choose CONCATENATE INPUTS, then the function will do just that, making a longer 1-D array out of multiple 1-D arrays.

That's what happens in my example.

 

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 15 of 18
(1,360 Views)

live with the small error due to phase accumulation

 

 

The only error I see would be roundoff error each time you figure deltaTheta.

 

When you store that into a DBL, you lose some precision at the 16th decimal place.

 

Although, since my scheme adds indefinitely, the phase accumulator will eventually reach a value where adding 3 radians will not be noticed.

 

That won't be a problem at 50000 samples, but if left to go indefinitely, will be a problem. 

 

 

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 16 of 18
(1,356 Views)

Included a phase wrap ... and unless samplerate and max frequency meets Niquist...

If the user needs a longer hold time and uses a continous buffered generation  to avoid a memory blast ... well, still room for improvement.

Hint: the Sine wave.vi allows tracking the phase...

phase sweep with unwrap.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 17 of 18
(1,348 Views)

So happy, you've been really helpful guys! 

 

Tried it out with the equipment and everything seems to work, just have to check it out with my supervisor after the holliday. Happy easter!

 

Best regards,

 

Oscar

0 Kudos
Message 18 of 18
(1,342 Views)