SetContinuousPlay()

Description

Sets an output channel to play its pulse train indefinitely when triggered, without needing to be retriggered.

This function was previously called SetContinuousLoop(). It was renamed for clarity, to distinguish it from loop mode.

Syntax

ConfirmBit = SetContinuousLoop(Channel, State)

Parameters

  • Channel: The output channel to set (1-4).

  • State: 0 = normal, 1 = continuous loop

Returns

ConfirmBit =

1 if loop was set successfully.

0 if an error occurred.

Example

% This code makes output channel 1 produce 1ms pulses at 10Hz indefinitely

ProgramPulsePalParam(1, 'CustomTrainID', 0); % Sets output channel 1 to use its parameterized pulse train

ProgramPulsePalParam(1, 'IsBiphasic', 0); % Sets output channel 1 to use monophasic pulses

ProgramPulsePalParam(1, 'Phase1Duration', 0.001); % Sets output channel 1 to produce 1ms pulses

ProgramPulsePalParam(1, 'InterPulseInterval', 0.099); % Sets output channel 1 to use a 99ms pulse interval

SetPulsePalLoop(1,1);