Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

04-18-2019 01:29 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello Everyone,

I am generating 2 square waves of different frequencies and duty-cycle and when I multiply that 2 waveforms then the rising and falling time gave me peaks. Actually, I want to reduce the rise and falling time of the square wave. How I can do this kindly suggest me any solution to this.

Thanks

Solved! Go to Solution.

04-18-2019 03:51 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

04-18-2019 04:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thank you Lysandros,

I generated these square wave by using LabVIEW coding and I just want to reduce the rising and falling time of the square wave. So is this possible to do or not. And the waveform generated by using function generator function.

Thanks for considering.

04-18-2019 06:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

You're probably just seeing a visual artifact. By default, the graph draws between defined sample points to connect them.

Show the plot legend, then *in* the legend right click the plot and choose a different style of interpolation. Some of them will draw horizontal lines between known sample points with pure vertical transitions at the sample points. I sometimes choose one of these styles when showing DAQ data because it seems suitable considering the way the A/D and D/A converters work.

-Kevin P

04-18-2019 07:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thanks for the reply, I try interpolation and then I got the attached graph, but the issue remains the same, I think maybe the duty-cycle or frequency problem, maybe if I can set the appropriate duty-cycle then the alignment or the peaks removed.

Or some other issue.

Thanks for your consideration.

04-18-2019 08:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I guess I don't understand what the "issue" is then. The graphs certainly don't look the same. They visually show instantaneous-looking transitions, which is what I thought you wanted to see.

Apparently, you still have some problem related to the underlying data. To help with *that*, we would need:

1. A very clear description of what you want or expect

2. The actual data you are using to illustrate the problem

3. The code you use to manipulate the data and create these graphs

4. Further description of why you think the results you get aren't right

-Kevin P

04-18-2019 08:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Dear Kevin,

Thanks again for your interest,

Actually, first I generate 2 square wave names are TRIG and RST, then I want to reverse my RST signal then I want to multiply my TRIG and reverse RST signal and the output is my result.

I attached the timing diagram of my signals, I hope now you can understand after seeing the diagram.

And Also suggest me how I can reverse my RST signal, I do it by using rotate 1D array function, but not show the perfect results.

Thanks

04-18-2019 12:13 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@Shesha12345 wrote:Actually, first I generate 2 square wave names are TRIG and RST, then I want to reverse my RST signal then I want to multiply my TRIG and reverse RST signal and the output is my result.

I attached the timing diagram of my signals, I hope now you can understand after seeing the diagram.And Also suggest me how I can reverse my RST signal, I do it by using rotate 1D array function, but not show the perfect results.

A few things:

- You're generating your signals in a sampled (quantized) domain in software. The graphs show these subsequent points connected with lines that are just a software construct. (Right now, there's one point at -25 and the next is at 25, and the graph just connects these with a straight line. The dt is what is going to determine how vertical that line looks on the graph.) I want to be clear that no matter how your signals render on the plots, the rise/fall times are NOT an accurate indication of how these transitions will appear when you generate them on an actual analog output or function generator and scope the line. The way they appear in the analog domain will be a function of the slew rate, bandwidth, filtering, impedance, etc. of the DAC, trace, and acquisition device. It appears that your time scales are extremely long, so I imagine that your edges will "look" sharp when you scope them. If you're asking whether a certain rise/fall time is actually possible, you'd have to provide that number and the hardware you're using to know if that's possible. Basically, I wouldn't worry about how the rise/fall times appear on the graph if what you actually care about is what they'll look like when you generate them. The two are unrelated.
- You're using the term "reverse", but what you really mean based on your drawing is "invert". There is a LabVIEW function called "negate", which will multiply your signals by -1, which is what you're looking for (assuming they're all centered around 0 as they are in the graphs you shared).

04-18-2019 12:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Dear croohcifer,

Thank you so much for your suggestion, actually my 2nd problem is solved now I want actually the same invert signal after the use of " Negate" function and for rising and falling time I can understand your point and sorry for reverse and invert, I am new in LABVIEW so sorry and thank you for your help.

Thanks

Solution

Accepted by topic author Shesha12345

04-18-2019 04:19 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

[Worked on a reply & example intermittently, then noticed additional activity just before posting. I think I'm mostly addressing a different aspect of things, hopefully something below is helpful.]

[And then when trying to post, I found that my connection had timed out hours ago and I lost most of what I wrote up. I'll at least post the example and try to summarize.]

Closer to clarity, but still kinda confusing. Your msg #1 picture attachment shows waveforms that vary between +/-25 and +/-5 respectively. Your msg #7 shows something much more straightforward with digital signals that vary between (logical) 1 and 0.

You speak of *multiplying* your square waves, which works out to be the same as a logical AND when you work with signals as they are shown in msg #7. You should deal with the signals in *logical* form as much as possible. If you need to scale to +/-5 or whatever, wait and do that as a very last step.

Attached is a pretty simple example that generates a pattern like you showed in the msg #7 timing diagram. Some of the constants have a mathematical relationship to one another and in real code, some should be calculated based on the others.

The vast majority of the code has to do with (1) generating the square waves and (2) converting them into a format that lets me display them in a digital waveform graph. The actual logical combination part is pretty much trivial.

-Kevin P