07-26-2024 10:48 PM
Hello,
I am trying to generate two trapezoidal waveforms using LabVIEW software. Here are my requirements:
1. The amplitude of the signal should range from 0 to 10V.
2. The slope of the trapezoidal signal should be adjustable.
3. The waveforms should work for different frequencies.
4. The two waveforms should have a phase difference, and this offset should also be adjustable.
I have made some progress and have been able to generate the waveforms for certain frequencies. However, I am encountering issues when trying to adjust the waveforms for other frequencies.
Could someone please guide me on how to achieve this? Any sample VIs or detailed instructions would be greatly appreciated.
Thank you!
I have attached a LabVIEW 2017 file that i have used.
07-27-2024 12:49 AM
vi attached.
07-29-2024 08:10 AM
Offhand, I think I'd use the available signal generation functions to make triangle waves with the desired frequency and phase offset, then pass the data through a saturation function to clip the amplitude and turn the triangle into a trapezoid. A simple "In Range and Coerce" function might be enough.
-Kevin P
08-02-2024 06:54 AM
Thank you for your suggestion. I tried using the signal generation functions to create triangle waves with the desired frequency and phase offset and then passed the data through the "In Range and Coerce" function to clip the amplitude and turn the triangle into a trapezoid. However, I am not able to get the correct output.
I am a newbie to LabVIEW, I get errors related to data types and connection issues.
Could you please provide more detailed instructions or an example VI that shows how to correctly set up and connect these blocks? Any help would be greatly appreciated.
.
08-02-2024 07:18 AM - edited 08-02-2024 07:20 AM
Hi Vincent,
@Vincent_Dz wrote:
I am a newbie to LabVIEW, I get errors related to data types and connection issues.
Could you please provide more detailed instructions or an example VI that shows how to correctly set up and connect these blocks? Any help would be greatly appreciated.
Unfortunately you forgot to attach your latest version of your VI so we cannot give advice for improvements…
Basically a trapezoidal waveform consist of 4 ramps:
All you need is a loop to create those ramps (given start, end and duration) and append them into a larger waveform:
08-28-2024 03:15 AM
Thank you for the guidance. I still not able to follow.
I was able to generate the desired waveform in MATLAB, as shown in the attached images. However, I'm having difficulty replicating this in LabVIEW.
I’ve attached images showing the MATLAB implementation and the corresponding waveforms. The waveforms include 3 signals that I was able to easily generate in MATLAB. Please provide guidance on how to achieve this in LabVIEW?
Thanking you,
08-28-2024 03:54 AM