LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronized 4 arbitrary AO waveforms

Good day,

 

I have a vi that generates four predefined conventional waveforms (sine, triangular, rectangular,..) using "Basic Function Generator VI" 
and syncs them. My question is how could I only replace the basic function generators with four arbitrary function generators. More specifically, I am interested in something like rectangular waveforms with all control over the phase shift, duty-cycle, frequency, etc. except with definable rising and falling time-a trapezoidal waveform-so to say.   

 

I am a beginner in Labview. Any suggestion is greatly appreciated.

 

Thanks,

 

0 Kudos
Message 1 of 4
(1,425 Views)

Well, the built-in square wave generator does all those things except the rise & fall time.

 

I'd picture making your own little wrapper function that calls the square wave generator to start with.  Then it would manipulate the output a bit to turn the vertical transitions into your desired rise & fall time.

 

One way to do this is to pass all the data through a moving average (a.k.a. "boxcar") filter.  If the first vertical edges is very near the beginning the data, (closer than the moving average filter), it'll take a little more work to get things right.

   One thing you can do is rotate the array before the moving average then rotate it back the same amount.  But you need to do some figuring on the relationships among phase, duty cycle, etc. so you know when to rotate and how much.   You also want to think through the way you define phase relative to a sloping transition.  And keep in mind that this, like most any filter, will cause a phase shift toward +time.

 

Experiment & try things.  Send both the original square wave and your modified signal to the same graph as you tinker.  That'll help you see when you're understanding and getting on the right track.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 4
(1,402 Views)

Thank you Kevin for your interesting idea. I get the theory of what you proposed but I guess you overlooked the part that I am very new in Labview and having little experience in programming in general as well. Nevertheless, I will discuss it with colleagues who are more advanced and see if I can implement it.

 

Thanks,

 

Reza

0 Kudos
Message 3 of 4
(1,373 Views)

No, I didn't overlook that you're new.  It's just that I don't have the time to try to walk you step-by-step through all the things you're going to end up needing to learn.  That's why I only gave you general thoughts.  A lot of things are going to come up as you start exploring array handling and algorithms.  I can't really anticipate exactly which ones, so that's why I mostly stuck to suggesting a high-level strategy.

 

Good luck though.  The main thing I'll emphasize is that plotting both the before & after data together on the same graph is going to be a really important tool as you experiment and learn about array manipulations (such as rotation) and algorithms.  It's really quick feedback to show you the effect of whatever thing you just changed.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(1,356 Views)