Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if statement
Hi Ilja,

Pulse Pal's trigger channels can be configured to interpret incoming TTL signals in a few ways, described here.
Unfortunately there isn't an option to have the incoming signal stop ongoing stimulation in all cases. The closest thing is 'toggle mode'.
If you put channels 1 and 2 into 'toggle mode', either channel will start stimulation if stimulation is off, and end stimulation if it is ongoing.
However, this solution has the caveat that after an incoming pulse to ch1 starts stimulation, a subsequent pulse on ch1 can stop it before ch2 has a chance to - and in that case, the next incoming pulse on ch2 would start it again.

To make the trigger channels have a universal 'stop' mode, you'd have to modify the firmware. You'd have to add an 'if' statement after line 667, where if triggerMode[y] == 3, KillChannel = 1. Then you'd have to modify the MATLAB or Python-side software to send triggerMode = 3 if you set the channel to 'stop' mode.

I hope this helps,

Messages In This Thread
if statement - by Ilja - 02-13-2020, 10:23 PM
RE: if statement - by Josh - 02-16-2020, 02:11 AM
RE: if statement - by Ilja - 02-18-2020, 11:42 PM
RE: if statement - by Ilja - 02-19-2020, 09:57 PM
RE: if statement - by Ilja - 02-27-2020, 06:25 PM

Forum Jump: