取消
显示结果 
搜索替代 
您的意思是: 

Help Needed: Generating Adjustable Trapezoidal Waveforms in LabVIEW

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.

0 项奖励
1 条消息(共 7 条)
1,911 次查看
0 项奖励
2 条消息(共 7 条)
1,886 次查看

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
3 条消息(共 7 条)
1,820 次查看

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.

.

 

0 项奖励
4 条消息(共 7 条)
1,781 次查看

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:

  1. ramp up from lower to higher level
  2. ramp from higher level to higher level (yes, ramps can have the same start and end level!)
  3. ramp down from higher to lower level
  4. ramp from lower to lower level

All you need is a loop to create those ramps (given start, end and duration) and append them into a larger waveform:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
5 条消息(共 7 条)
1,777 次查看

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,

下载全部
0 项奖励
6 条消息(共 7 条)
1,646 次查看

Hi Vincent,

 

you just kudoed my previous message so I guess you use my suggestion to solve your problem!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
7 条消息(共 7 条)
1,640 次查看