I've just received my PulsePal v2 and uploaded firmware v2.0.1 to use the PulsePal as a waveform generator. I have a quick turnaround and was wondering if anyone had sample MATLAB code I could re-purpose. I would like to have an incoming TTL pulse to TriggerCh1 to then trigger OutputCh1 to generate a 5V square pulse that lasts for 2s and then linearly ramps down to 0V over 200ms. Apologies to not have any initial code to share, any help or direction is much appreciated!
-Scott
Thank you for the quick and helpful response, Josh! Everything worked perfect, and was easy to adapt for my initial experiments.
I have a related question: the duration of my square waveform with 200ms ramp down will eventually need to depend on a TTL into triggerCh1 to generate a square step on to output ch1, and ideally a second TTL pulse to triggerCh1 that toggles output ch1 to ramp down linearly from 5V. In other words, I would need a single square waveform that ramps down but the waveform duration depends on the time between TTL pulses to the same trigger channel.
I was unsure if the customWaveform function has the ability to toggle a signal in this manner or if I should be looking elsewhere. Any direction or alternate suggestions would be greatly appreciated. Thank you so much for your help!