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

Search Forums

(Advanced Search)

Forum Statistics
» Members: 27
» Latest member: NG
» Forum threads: 185
» Forum posts: 678

Full Statistics

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

Latest Threads
PsychToolbox Asio support...
Forum: Software
Last Post: trose_neuro
07-17-2019, 06:34 AM
» Replies: 5
» Views: 1,043
Error using trial manager...
Forum: Software
Last Post: Noa
07-16-2019, 10:03 AM
» Replies: 4
» Views: 497
RJ45 Ethernet jack Ports ...
Forum: Hardware
Last Post: rozmar
07-03-2019, 04:28 AM
» Replies: 5
» Views: 3,996
Pulse Pal only recognized...
Forum: Software
Last Post: MJJ
06-24-2019, 11:25 AM
» Replies: 2
» Views: 318
Unused ports stuck in ON ...
Forum: Hardware
Last Post: Josh
06-21-2019, 01:30 PM
» Replies: 1
» Views: 537
Setup Question: Rotary En...
Forum: Hardware
Last Post: Josh
06-16-2019, 07:54 AM
» Replies: 1
» Views: 597
Bpod does not turn on
Forum: Hardware
Last Post: Josh
06-16-2019, 07:51 AM
» Replies: 1
» Views: 348
Send input action from so...
Forum: Software
Last Post: Josh
06-16-2019, 07:48 AM
» Replies: 1
» Views: 227
Playing different wavefor...
Forum: Software
Last Post: Alex
05-28-2019, 03:09 PM
» Replies: 8
» Views: 714
Test curve for water
Forum: Software
Last Post: Sarah
05-27-2019, 11:39 PM
» Replies: 2
» Views: 265

  having an issue when I install sound card
Posted by: Kyuhyun - 11-04-2018, 09:35 PM - Forum: Software - Replies (4)

Hi Josh, 

We had to reinstall the windows and all setting to some PC because it had hard drive malfunction. So I reinstalled windows and bpod system again. 
But for some reason, I can't use sound system. I installed correctly sound card, and driver psychtoolbox as well. 
Here I attach the error message. Can you tell me how to fix this? 

Error: no compatible sound subsystem detected. On Windows, ensure ASIO drivers are installed.
PTB-ERROR: Desired audio parameters for device -1 unsupported by audio device. PortAudio reports this error: Invalid number of channels 
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel allocation, or audio sample format.
error:                PsychError_system
general description:  Error reported by a system call
specific description: Failed to open PortAudio audio device due to unsupported combination of audio parameters.
module name:          PsychPortAudio
subfunction call:     Open
file name:            COMMON\PSYCHPORTAUDIO\PsychPortAudio.c
function name:        PSYCHPORTAUDIOOpen
line number:          2441
Error using PsychPortAudio
See error message printed above.

Error in PsychToolboxSoundServer (line 86)
            BpodSystem.PluginObjects.SoundServer.MasterOutput =
            BpodSystem.SystemSettings.SoundDeviceID, 9, 4, SF, 6
            , 32);

Error in ToneClouds4BPod (line 181)

Error in run (line 91)
evalin('caller', strcat(script, ';'));

Error in NewLaunchManager>LaunchProtocol (line 706)
Error while evaluating DestroyedObject Callback.

  Rounding of numbers (e.g. Phase1Duration)
Posted by: cskoven - 10-30-2018, 04:11 PM - Forum: Software - Replies (1)

Dear Josh (et al.),

Posted this as an issue on GitHub before realizing you might prefer people to write here in the forum instead

I'm playing a bit around with my PulsePal (Gen 2; FW: 2.0.1).

When setting the Phase1Duration manually (by joystick) to 300µs (=0.00030s) and the PulseInterval to 333ms (=0.33300s) in order to obtain 3Hz stimulation, in a burst of 16s - I, instead of the desired 3*16=48 pulses, get 49 pulses. That makes sense, - as there's still room for another pulse.
So I went for the python interface to circumvent this, by writing a loop with a "total number of pulses per burst".

But that introduces some new problems in regards of rounding.
Regardless if I set "myPulsePal.phase1Duration[1] = 0.00030" or "myPulsePal.programOutputChannelParam('phase1Duration', 1, 0.00030)" - the PulsePal reads the Phase1Duration as "0.00025s". And measuring the pulse width on an oscilloscope, the width does seem to be closer to 250µs.

I've also tried approaches with the "decimal.Decimal" module in python. E.g.
Decimal('300')/Decimal('1000000') => with and without either or both float(Phase1Duration) and round(Phase1Duration,6)...

Same result. The Phase1Duration still reads "0.00025s".

If I put the following:
myPulsePal.programOutputChannelParam('phase1Duration', 1, 0.000301) -> that is, 301µs, the PulsePal reads "0.00030s", and the width (measured with an oscilloscope) does appear closer to 300µs.

According to your paper regarding the PulsePal (Sanders and Kepecs, 2014) you restricted the shortest configurable pulse duration to 100µs, which is also seen in that it is not possible to adjust the last precision point in the float (by joystick). But then it shouldn't be a problem with 300µs pulses? So I guess it is something about rounding...

When I get the python script to print the values that I assign to the Phase1Duration or InterPhaseInterval (etc.), it does seem to be the right values.

So... I'm probably missing a simple mistake that I make? Or there might be a bug in how these values a registered / assigned on the Arduino (the cycle/clock frequency...?)

Hope to hear from you how you would suggest I go forward / circumvent this problem :)

Christian Skoven

  Issue with GlobalCounterReset
Posted by: Marike - 09-30-2018, 08:17 PM - Forum: Software - No Replies

I have been trying to work with global counters and ran into an issue where resetting the counter caused an "Index exceeds array bounds" error message.

Attempting to fix it, I tried to run the example code from the documentation, but still ended up with the same error message.  The highlighted row is the piece of code that breaks when I attempt to use it.

Link to Documentation:

    sma = NewStateMachine();

    sma = SetGlobalCounter(sma, 1, 'BNC1High', 5);

    sma = AddState(sma, 'Name', 'State1', ... % BNC1High Events in this state are not counted because the count will be reset.
        'Timer', 1,...
        'StateChangeConditions', {'Tup', 'State2'},...
        'OutputActions', {});

    sma = AddState(sma, 'Name', 'State2', ... % This state resets the global counter.
        'Timer', 0,...
        'StateChangeConditions', {'Tup', 'State3'},...
        'OutputActions', {'GlobalCounterReset', 1});

    sma = AddState(sma, 'Name', 'State3', ...
        'Timer', 0,...
        'StateChangeConditions', {'Port1In', 'State4', 'GlobalCounter1_End', 'exit'},...
        'OutputActions', {});

    sma = AddState(sma, 'Name', 'State4', ...
        'Timer', 0,...
        'StateChangeConditions', {'Port1Out', 'State3', 'GlobalCounter1_End', 'exit'},...
        'OutputActions', {});

If anyone knows what the problem is, I would appreciate any suggestions.

  Capacity sensor for Behavioral port
Posted by: Tiffany - 09-26-2018, 02:28 PM - Forum: Hardware - Replies (1)

Hello all!

I've been considering to switch my behavioral design from an optical lickometer to a capacity sensing one (primarily because the first option has some intereferences with the infrarred cameras that I use)

Does Sanworks offer a way to adapt the Port module to be used as a capacity sensor? In case not, are you planning on developing one?

Thank you Josh!


  Save Manually delivered events
Posted by: MotorMonster - 09-24-2018, 09:49 PM - Forum: Software - Replies (1)

Hi All,

In my behavior paradigm, I gave some manual delivery using TTLs of Bpod's output, which is the port override LED button. I was wondering if Bpod will record those manual delivery timestamps. As of now, I do not see those events in 'RawEvents' structure. Is there a way to record those manual delivery events? 

Thank you very much!


  PCB dimensions
Posted by: anbu - 09-17-2018, 07:27 PM - Forum: Hardware - Replies (3)


I'm struggling to find dimensions for some PCBs, for example state machine 2.0/2.1 (hopefully is the same size as 0.5, which is listed?) and Analog Output module. When I search the wiki, only hits are for Bpod/OpenEphys sync board, State Machine 0.5, Port breakoutboard, Bpod/Neuralynx sync board, Arduino shield 0.5. Would be helpful to have the same info for all parts. (PCB dimensions, etc.).


  LoadSerialMessages input for WavePlayer
Posted by: Claudina - 09-14-2018, 07:09 PM - Forum: Software - Replies (2)

Hi Josh and users, 

I am having some trouble understanding the inputs syntax of LoadSerialMessages for WavePlayer. From what I got, in profile mode the message:

LoadSerialMessages('WavePlayer1', ['P' 16], 3)

should play the profile number 15 when the message 3 is sent. This  doesn't happen. I can played profile 15 (or whatever profile number I choose) only of I send the message 1. Am I missing something?

Thank you!

  Valve crash
Posted by: Mahyar - 09-10-2018, 10:19 AM - Forum: Hardware - Replies (2)

Hi all
I am using Bpod r.5. It has been working for almost (or even more than) a year now. I have had valves which stopped working and I replaced them. But yesterday it happened several times that the system stopped working at a "reward state". I noticed that this happens stochastic and when it happens there comes a relatively big portion of water out of the spout and the Bpod is not sending any more of state updates to the governing machine.
I am using a linux os and use octave to run Bpod:

Then I reinstalled the firmware. It worked for a while but it happened again.
Then I tested the Bpod Matlab interface trying to get out some water out of the spouts. And it got stuck several times but this time the valves stayed open and the water kept running while the Bpod interface froze and gave an error. (I'll send the error as soon as I go the setup). This happened again for all the three ports in short time afterward.
I opened all the cables and valves and reconnected them and then ran some calibration and it worked so far. Though I am afraid it might stop again in the middle of the experiments.

Do you have any idea why it happened? Should I provide extra power input? (currently I am only powering the device up with the usb).

I would appreciate to hear any comments and ideas on this.

  WavePlayer to trigger multiple waves
Posted by: Claudina - 09-07-2018, 02:33 PM - Forum: Software - Replies (2)


I would need to send 3 different sine waves (to operate a laser's AOM and scanning XY mirrors) to 3 different channels of the Bpod analog out module. I would ultimately need to trigger them simultaneously, in a specific state. Is it possible using WavePlayer? 


  Transcutaneous Stimulation
Posted by: lubur - 09-06-2018, 10:36 PM - Forum: Software - Replies (7)

I've been studying transcutaneous electrical stimulation for functional improvements after spinal cord injury and a few successful studies have used a proprietary system to stimulate the spinal cord. I would like to try to replicate parts of the studies. From the text:

Quote:"The stimulation waveform was biphasic, rectangular, 1 ms pulses at a frequency of 30 Hz, filled with a carrier frequency of 10 kHz. This permitted stimulation intensities of 80-120 milliamperes (mA) to be delivered to the skin over the cervical spinal cord without discomfort."
Reading through the paper published on pulse pal and reading through the wiki page it seems that the device should be capable of creating a similar waveform. The carrier frequency is something I have questions about as I'm not quite sure what it's used for or if it's necessary for stimulation. I also have questions about the intensity. How would I go about setting the intensity in mA?