class="resources"
![]() |
reset phase determines the initial phase of triangle wave. The default is TRUE. If reset phase is TRUE, the initial phase is set to phase in. If reset phase is FALSE, the initial phase is set to the value of phase out when the VI last executed. |
![]() |
samples is the number of samples of the triangle wave. The default is 128. |
![]() |
amplitude is the amplitude of triangle wave. The default is 1.0. |
![]() |
f is the frequency of triangle wave in normalized units of cycles/sample. The default is 1 cycle/128 samples, or 7.8125E-3 cycles/sample |
![]() |
phase in is the initial phase, in degrees, of triangle wave when reset phase is TRUE. phase in default is 0. |
![]() |
triangle wave is the output triangle wave. |
![]() |
phase out is the phase, in degrees, of the next sample of triangle wave. |
![]() |
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
If the sequence Y represents triangle wave, the Triangle Wave VI generates the pattern according to the following equation.
yi = a*tri(phase[i])
for i = 0, 1, 2, , n 1 and where a is amplitude and n is the number of samples.
tri(phase[i] is defined by the following equation.
,
where
p = (phase[i] modulo 360),
phase[i] = initial_phase + f*360*i,
f is the frequency in normalized units of cycles/sample,
initial_phase is phase in if reset phase is TRUE,
initial_phase is the phase out from the previous execution of this instance of the VI if reset phase is FALSE.
The Triangle Wave VI is reentrant, so you can use it to simulate a continuous acquisition from a triangle wave function generator. If the input control reset phase is FALSE, subsequent calls to a specific instance of the Triangle Wave VI produce the output triangle wave array containing the next samples of a triangle wave.
Because the Triangle Wave VI is reentrant, when reset phase is FALSE , the Triangle Wave VI uses the phase out value as its new phase in the next time the VI executes.
Refer to the Function Generator with FM VI in the labview\examples\analysis\sigxmpl.llb directory for an example of using the Triangle Wave VI.