sendCustomWaveform()

Description

Sends a sequence of voltages describing a train of continuous monophasic pulses, with periodic onset times. 

Syntax

sendCustomWaveform(customTrainID, pulseWidth, pulseVoltages)

Parameters

Returns

None

Example

# Set output channel 2 to play a sine wave when triggered

import math

voltages = range(0,1000)

for i in voltages:

    voltages[i] = math.sin(voltages[i]/float(10))*10 # Set 1,000 voltages to create a 20V peak-to-peak sine waveform

pulseWidth = 0.0001 # Set the sampling period for 10kHz sampling

myPulsePal.programOutputChannelParam('phase1Duration', 2, pulseWidth) # Set output channel 2 to use 100us pulses 

myPulsePal.programOutputChannelParam('customTrainID', 2, 1) # Set output channel 2 to use custom train 1

myPulsePal.sendCustomWaveform(1, pulseWidth, voltages) # Send the custom waveform