Welcome, Guest
You have to register before you can post on our site.

Search Forums

(Advanced Search)

Forum Statistics
» Members: 27
» Latest member: jerrko14567
» Forum threads: 223
» Forum posts: 795

Full Statistics

Online Users
There are currently 8 online users.
» 0 Member(s) | 8 Guest(s)

Latest Threads
Display visual stimulus i...
Forum: Software
Last Post: trose_neuro
02-20-2020, 10:13 AM
» Replies: 2
» Views: 57
if statement
Forum: Software
Last Post: Ilja
02-19-2020, 09:57 PM
» Replies: 3
» Views: 67
Increasing max number of ...
Forum: Software
Last Post: Josh
02-19-2020, 04:11 PM
» Replies: 1
» Views: 34
Fusion PCB Ordering Proce...
Forum: Hardware
Last Post: Max
02-19-2020, 11:45 AM
» Replies: 4
» Views: 130
Consecutive triggering of...
Forum: Software
Last Post: Josh
02-18-2020, 08:03 PM
» Replies: 1
» Views: 34
DC Barrel Jack PCB cutout
Forum: Hardware
Last Post: Josh
02-18-2020, 07:59 PM
» Replies: 1
» Views: 39
System Reboot
Forum: Software
Last Post: Josh
02-18-2020, 07:47 PM
» Replies: 1
» Views: 30
Calibrate valvemodules
Forum: Software
Last Post: Josh
02-16-2020, 02:30 AM
» Replies: 1
» Views: 34
Continuous Pulse train wi...
Forum: Software
Last Post: Josh
02-13-2020, 03:44 AM
» Replies: 3
» Views: 72
acknowledgement byte afte...
Forum: Software
Last Post: JoanaNeto
02-11-2020, 07:26 PM
» Replies: 0
» Views: 27

  Behavior Ports Output Not Working
Posted by: OA2381 - 02-05-2020, 07:43 PM - Forum: Software - Replies (3)

I'm having difficulty triggering the valve Output from the Bpod console. The behavior ports register the POK and VLV inputs from the console and from the external connections but it doesn't open the valves at all. I've tried troubleshooting, updating firmware, resetting all connections but nothing seems to work.

  Unaccounted for delay between 'trials'
Posted by: munchausend - 02-04-2020, 01:44 PM - Forum: Hardware - Replies (1)

Hi Josh,

I have a very simple protocol with just 2 states (see at the bottom), but I seem to be getting a delay of ~0.48s between trials that I can't account for.

e.g. after running 500 trials, I get the data and run the code below:

for trial = 2:SessionData.nTrials
report.delays(trial) = SessionData.TrialStartTimestamp(1,trial) - SessionData.TrialEndTimestamp(1,trial-1);

In this case, report.delays(1) will be 0, but report.delays(2) ~0.45 and then increasing steadily with each (trial) reaching ~0.57s

This issue is apparent if I look at the overall task time as well, e.g. if I check the overall task time and compare it with what I would expect from just summing the trial times. 

report.totalTaskTimeBpod = SessionData.TrialEndTimestamp(1,max(SessionData.nTrials)) - SessionData.TrialStartTimestamp(1,1); 
report.totalTaskTimeBpodExpected = (SessionData.TrialEndTimestamp(1,1) - SessionData.TrialStartTimestamp(1,1)) * SessionData.nTrials;
report.timeDiff  = report.totalTaskTimeBpod - report.totalTaskTimeBpodExpected;
%Difference betwen expected and actual time - Ideally zero  

The difference between the two ends up at ~0.48s [>>>report.timeDiff / SessionData.nTrials]

Is this normal/common? Is this just time taken up by the PC/Matlab to save files etc. or something I'm missing about the state machine/data file structure?

Thank you in advance for your help.
Best wishes,

    sma = NewStateMatrix();
    sma = AddState(sma, 'Name', 'presentStimulus',...
        'Timer', stimDuration,...
        'StateChangeCondition', {'Tup', 'InterTrialInterval'},...
        'OutputActions', {'BNCState',3});
    sma = AddState(sma, 'Name', 'InterTrialInterval',...
        'Timer', ITI,...
        'StateChangeConditions', {'Tup', 'exit'},...
        'OutputActions', {});
    RawEvents = RunStateMatrix;
    if ~isempty(fieldnames(RawEvents))
        %Compute trial events from raw
        BpodSystem.Data                         = AddTrialEvents(BpodSystem.Data, RawEvents);
        %Adds the settings used for the current trial to the Data struct
        BpodSystem.Data.TrialSettings(trial)    = S;
        %Adds the trial type of the current trial to the Data struct
        BpodSystem.Data.TrialTypes(trial)       = TrialTypes(trial);
        %Save the data (see function code for details)


  Matlab 2019a running on Windows 10 Enterprise
  Bpod r0.5
  System: Intel® Core™ i7-8700 CPU @ 3.20GHz, 16GB RAM

  AudioPlayer unexpected behavior
Posted by: HK - 01-29-2020, 10:27 PM - Forum: Hardware - Replies (4)


We are using an Analog Output Module with AudioPlayer to control LED waveforms.  We realized that, when we upload an updated waveform to the module, somehow the offset of the LED in the next trial shows an unexpected behavior, as if the module is still partially remembering the previous waveform. 

For example, after using it for presenting 0->5V 1-sec ramp, if I upload an updated waveform of 0->1V 1-sec ramp, the LED works as expected for 1 second, but at the end of the ramp, it suddenly gives a brief flash with 5-V intensity.  This happens only at the first trial after the waveform change, and it works without problem afterward.  However, if I switch back again to 0->5V 1-sec ramp, then in the next trial the LED gives a strange 1-V intensity flash at the end of the ramp.  

Do you have an explanation for this strange behavior?


  Invert TTL signal?
Posted by: els - 01-27-2020, 03:05 AM - Forum: Software - Replies (2)

I want to turn off an LED during one state and I would like to know if there is any way to invert the TTL:  i.e., have one of the "TTL out" always high, and then trigger a switch to low (off) during a state.  Is there any easy way in the code to invert the TTL?


  Trial Manager Error: serial port returned 0 bytes.
Posted by: EJT - 01-17-2020, 05:00 PM - Forum: Software - Replies (2)


I'm using the trial manager which is working very well most of the time, however, occasionally it throws the following error (usually after at least ~150 trials)  which causes Bpod to crash and require a reset:

Error using ArCOMObject_Bpod/read (line 348)
Error: The serial port returned 0 bytes.

Error in TrialManagerObject/startTrial (line 89)
           SMA_Confirmed =, 'uint8');

Error in Sequence (line 346)
   TrialManager.startTrial(); % Start processing the next trial's events (call with no argument since SM was already

Assembly time of the SM is consistent across trials and shorter than my minimum trial time. This error does not consistently occur every time, but does occur across multiple setups. 

I am using Gen2 BPod with a R1.0 state machine running v1.58.


  speaker stand
Posted by: Kyuhyun - 12-31-2019, 08:30 PM - Forum: Hardware - No Replies

Hi Josh, 
I hope you had a wonderful holiday!

We had 12 bpod boxes, and when we recently bought it, it didn't come with speaker stand which we received in first time. I need more speaker stands for further setup, I tried to search in GitHub, there isn't a file for 3D print. Can you share with me? Or let me know where the file is in Github. 

Thank you alway!!


  How to stop the Bpod after 1h automatically
Posted by: xiaoxiong2n - 12-17-2019, 04:45 PM - Forum: Software - Replies (2)

Hi Josh,

I would like to restrict the duration of each behavioral bock to be 1 hour. The tic/toc does not work for me because the behavioral process can be paused in the middle of one trial.

Is there any convenient way to stop the Bpod after 1h automatically?


  acknowledgement byte after a call to syncAllParams.
Posted by: cskoven - 12-10-2019, 01:27 PM - Forum: Software - Replies (1)


I'm using python to send some different parameters (Phase1Duration, InterPulseInterval and PulseTrainDuration) to the PulsePal - randomly, in a loop.
I give plenty of sleep time (~5s) after having run "myPulsePal.syncAllParams()" to "myPulsePal.triggerOutputChannels(1, 0, 0, 0)"

Just recently I got this error:

raise PulsePalError('Error: Pulse Pal did not return an acknowledgement byte after a call to syncAllParams.')
PulsePal.PulsePalError: Error: Pulse Pal did not return an acknowledgement byte after a call to syncAllParams.

From line 232, in syncAllParams - in

It's not optimal that the loop / script will be broken / stopped - after having run for 2+ hours - to then redo it.

How do you cope with this error? Do you safeguard yourselves to avoid your scripts being stopped by an error raised?

Would it be something like putting a "try" before the myPulsePal.syncAllParams() - and asking to try again, if it fails?
Or what would you do?

Hope to hear from you!

Christian Skoven

  Cannot connect Pulse Pal to Ubuntu 14.04
Posted by: Dima - 12-05-2019, 03:35 PM - Forum: Software - Replies (3)


I am trying to connect my Pulse Pal to Ubuntu 14.04, and the system does not recognize connection at all.

I am not sure from where to start my debugging given that I do not have any error message.

I can connect this Pulse Pal to Windows without any problem. Also, I can connect Arduino boards to Ubuntu computer without any problem.

Could you please guide me my first debugging steps?


  set tone frequency?
Posted by: tth - 12-05-2019, 12:24 AM - Forum: Software - Replies (1)

Hi all,

Does anyone know if there is a way to specify a specific frequency for a tone for a buzzer to play? like you can in an arduino script?