# Pulse Train (G Dataflow)

Generates an array that concatenates a series of pulses according to a specific prototype pulse. This node constructs the pulse train using a specific interpolation method.

## interpolation method

Interpolation method used to construct the pulse train.

When the sampling of the pulse train is not exactly in time with the prototype pulse sampling, this node uses the specified interpolation method to get the pulse train samples.

Name Value Description
nearest 0 Uses the nearest interpolation method.
linear 1 Uses the linear interpolation method.
spline 2 Uses the spline interpolation method.
cubic Hermite 3 Uses the cubic Hermite interpolation method.
Lagrange 4 Uses the barycentric Lagrange interpolation algorithm.

Default: linear

## amplitude

Amplitudes of each duplication of the prototype pulse in the output pulse train.

## delay

Delay of each duplication of the prototype pulse in the output pulse train.

## prototype specification

Prototype pulse of the output pulse train.

### prototype pulse

Prototype pulse, which starts at zero in the time axis.

### dt of prototype pulse

Sampling interval of the prototype pulse.

Default: 0.1

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## dt

Sampling interval of output pulse train.

Default: 0.1

## samples

Number of samples in the signal.

samples must be greater than 0. Otherwise, this node returns an error.

Default: 1000

## t0

Timestamp of the output signal. If this input is unwired, this node uses the current time as the timestamp of the output signal.

This input is available only if you configure this node to return a waveform.

## pulse train

Pulse train of samples.

This output can return a waveform or an array of double-precision, floating-point numbers.

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Algorithm for Generating the Pulse Train

If the sequence Y represents pulse train, this node generates the pattern according to the following equation:

${y}_{i}=\underset{m=0}{\overset{M-1}{\sum }}{A}_{m}*f\left(i*\mathrm{\Delta }t-{D}_{m}\right)$

where

• f is prototype pulse
• Δt is dt of prototype pulse
• Am is the mth element of amplitude
• Dm is the mth element of delay, whose size must be equal to the size of amplitude

If Di - Dj is less than the width of the prototype pulse for any i, j between 0 to M - 1, overlap occurs.

The following figures show a prototype pulse and its pulse train.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application