Sjdibb wrote[quote='Sjdibb' pid='524' dateline='1525483027']
Hi Dymphie,
If you have an output channel you're not already using, you can configure a 1ms TTL pulse by setting:
Phase1Duration to 1ms
Phase1Voltage to 5V (or 3.3V if the smartbox input is not 5V tolerant)
PulseTrainDuration to 1ms
Each time that output channel is triggered, it will then deliver a single TTL pulse to the smartbox.
I hope this helps!
-Josh
Hi Josh,
are the ProgramPulsePalParams that you mentioned placed in the same Matlab script? I assume they are. Below is my script and the way it is now, it does run my 10 ramp pulses but no TTL pulse is elicited in the second output channel.
%Parameters for pulse:
Ramp_duration = 0.02;%sec
Hold_duration = 0.01;%sec
Inter_stimulus_duration = 0.5;%sec
Sampling_frequency = 2000;%Hz
Total_Duration_all_pulses = 5.5;%sec will give 5.5sec/0.55(duration of one pulse+Inter_stimulus_duraton)= 10 pulses; 11sec will give 11/0.55 = 20 pulses
Maximal_amplitude_Volts = 0.6;
%**************************************************************************
MyPulse = [0:Maximal_amplitude_Volts/(Sampling_frequency*Ramp_duration):Maximal_amplitude_Volts ones(1,Sampling_frequencyHold_duration)*Maximal_amplitude_Volts Maximal_amplitude_Volts:-Maximal_amplitude_Volts/(Sampling_frequencyRamp_duration):0 zeros(1,Sampling_frequency*Inter_stimulus_duration)];%20ms(40 ticks),10ms (20 ticks), 20ms (40 ticks),500 ms (1000 ticks)
% Sampling rate of 2 kHz
SendCustomWaveform(1,1/Sampling_frequency,MyPulse);%2 kHz
%Actual Ramp pulse
ProgramPulsePalParam(1,'CustomTrainID',1);
ProgramPulsePalParam(1,'PulseTrainDuration',Total_Duration_all_pulses);%Last parameter in seconds
ProgramPulsePalParam(1,'CustomTrainLoop',1);%Last parameter whether to loop or not 1 means yes loop
TriggerPulsePal('1');
%TTL on Output channel 2
ProgramPulsePalParam(2,'Phase1Duration',0.001);
ProgramPulsePalParam(2,'Phase1Voltage',5);
ProgramPulsePalParam(2,'PulseTrainDuration',0.001);
Regards,
Dymphie