LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between triangle wave, triangle waveform, and triangle pattern

Solved!
Go to solution

For generating a triangle waveform, I have 3 vi's that I could use. Signal Processing -> Signal Generation -> Triangle wave.vi, Signal Processing -> Signal Generation -> Triangle Pattern.vi, Programming -> Waveform -> Analog waveform -> Waveform generation -> Triangle waveform.vi.

 

What is the basic difference between these 3. I understand that all 3 have a different input set and I can use them according to what combination of input data I have. Is there any specific case for which each of them is used?

0 Kudos
Message 1 of 7
(4,815 Views)

Hit Ctrl-H to open context help.

 

Put one of each function on your block diagram and hover over them.  Information about each will come up.

 

They do similar things, but aren't identical.

 

The first you listed creates an array that consists of a triangle waveform.

The second creates an array that consists of a single pulse of triangle waveform.  It also seems to allow for "asymmetry".  The rise rate of the triangle can be different from the fall rate.

The third creates an actual waveform that contains sampling info (start time, dt between samples) of a triangle waveform.

 

The first would be better for doing math on a repeated pattern.

The second for specialized triangle shape.  It can be a buildling block of larger arrays if you wanted to repeat the generated triangle.

The third contains sampling data which would allow a more direct connection to DAQ functions.

 

Which is the best to use all depends on what you are trying to do.  But all can be made to work.

0 Kudos
Message 2 of 7
(4,811 Views)

Hi varunkumar,

  To generate a traiangle wavefrom,you can use any of the VIs.These Vis differ each other in terms of the output and functionality implement by them.For more details you can do control-h(context help) on each functions.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 3 of 7
(4,806 Views)

so, does this mean that I can not use triangle wave and triangle pattern to generate an actual waveform. Why I am asking is because I tried checking the waveform on an oscilloscope. The waveform generated by triangle waveform.vi is visible on the oscilloscope but not the one generated by triangle pattern and triangle wave.

 

the attached vi CreateWaveformTest.vi does show up correctly on the oscilloscope. 

 

The other vi, createparttern test.vi shows up correct in the waveform graph but I am not abe to see it on the oscilloscope. comes up as a straight line

 

Download All
0 Kudos
Message 4 of 7
(4,786 Views)
Oh! I attached the wrong vi by mistake which is broken. attaching the new one in a minute
0 Kudos
Message 5 of 7
(4,783 Views)
here are the correct vi's
Download All
0 Kudos
Message 6 of 7
(4,782 Views)
Solution
Accepted by topic author VarunKumar

You should really get to understand DAQ a little better and the difference between data types. When you create a waveform data type, the data type includes timing information. For DAQ, the most important is the dt or time between samples. You have configured the DAQ Assistant to use this information in generating the waveform. When you create the 1D array, obviously this cannot contain timing information and when you convert to dynamic data, all that you will get is a default dt of 1.

 

As mentioned, you can use either function but if you create the 1D array, you will need to modify the data to add the dt that you want.

 

Look inside the Basic Function Generator. It uses the lower level Triangle Wave function that you have already mentioned. See how the timing information is add to the 1D array output.

Message Edited by Dennis Knutson on 01-21-2010 11:33 AM
0 Kudos
Message 7 of 7
(4,778 Views)