National Instruments 320571-01 用户手册

下载
页码 157
NI-DSP Analysis VI Reference 
Chapter 2
Part 3:  NI-DSP Function Reference 
2-79 NI-DSP SRM for LabVIEW for Windows
DSP Triangle Pattern
Generates an array containing a
triangle pattern.  If the Triangle
Pattern
 is represented by the
sequence Y, the pattern is generated
according to the following formula:
y
i
  =  a tri (x
i
) ,
for  i = 0, 1, 2, …, n-1 ,
where
x
i
  =  
i
t - d
w
 , and
tri(x)  =  
 

 1 - | x |        if  | x | 
 1
 
 0                 elsewhere
a is the amplitude,
d is the delay,
w is the width, and
n is the number of elements in Triangle Pattern.
amplitude is the value of the waveform at the peak.  amplitude defaults to 1.0.
delay is the distance in seconds between the beginning of the pattern and the peak.  delay shifts the peak
value within Triangle Pattern.  delay defaults to 0.0.
delta t is the duration of the pattern in seconds, or the sampling interval, and must be greater than 0.0 to
avoid undefined arguments.  If delta t is less than or equal to zero, the VI returns an error.  delta t
defaults to 1.0.
width is the distance in seconds between the peak and end of the pattern.  In other words, width sets the
width from the peak value to the first zero value in the pattern.  Thus the actual duration of the pattern is
2width (twice the value of width).  width must be greater than 0.0 to avoid undefined arguments.  If
width is less than or equal to zero, the VI returns an error.  width defaults to 1.0.
Triangle Pattern in is a DSP Handle Cluster that indicates the memory buffer on the DSP board that
will contain the output triangular pattern.
Triangle Pattern out is a DSP Handle Cluster that is identical to Triangle Pattern in, but with the
generated pattern already stored in the memory buffer on the DSP board.  The largest triangle pattern
that can be generated depends upon the amount of memory on your DSP board.
error in (no error) contains the error information from a previous VI.  If an error occurs, it is passed out
error out and no other calls are made.
error out contains the error information for this call.
You use this VI to create patterns based on an isosceles triangle.  The following figure shows how the VI parameters
relate to the generated pattern.