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

Search Forums

(Advanced Search)

Forum Statistics
» Members: 26
» Latest member: e-potis
» Forum threads: 150
» Forum posts: 547

Full Statistics

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

Latest Threads
Rounding of numbers (e.g....
Forum: Software
Last Post: cskoven
30 minutes ago
» Replies: 1
» Views: 229
Behavioural Port Specs
Forum: Hardware
Last Post: e-potis
Yesterday, 07:36 PM
» Replies: 0
» Views: 14
Cadia Stainless Steel Kit...
Forum: Software
Last Post: handmadesinknet
Yesterday, 05:57 AM
» Replies: 0
» Views: 8
Global Timer in emulator ...
Forum: Software
Last Post: HK
12-06-2018, 07:50 PM
» Replies: 2
» Views: 111
Start/Stop logging analog...
Forum: Software
Last Post: Josh
12-05-2018, 04:07 AM
» Replies: 1
» Views: 67
Pulsepal - LED
Forum: Hardware
Last Post: Josh
11-28-2018, 02:18 AM
» Replies: 3
» Views: 157
having an issue when I in...
Forum: Software
Last Post: Josh
11-10-2018, 02:23 PM
» Replies: 1
» Views: 198
Time stamp with another i...
Forum: Software
Last Post: Josh
10-16-2018, 12:57 AM
» Replies: 7
» Views: 2,304
ArCOMObject_Bpod/read Err...
Forum: Software
Last Post: HK
10-15-2018, 05:07 PM
» Replies: 3
» Views: 785
Transcutaneous Stimulatio...
Forum: Software
Last Post: lubur
10-02-2018, 04:52 AM
» Replies: 7
» Views: 1,058

  Behavioural Port Specs
Posted by: e-potis - Yesterday, 07:36 PM - Forum: Hardware - No Replies

Dear Sanworks,
I would like to connect an external digital signal to a behavioural port and in particular to the photo-gate in. I have look and couldn't find any information about it for Bpod R2. Could you please let me know what the voltage levels are, is the signal floating or pulled and what are the timing characteristics of the expected signals? My signal is 3.3V.

Also I couldn't find any schematics/board layouts of R2. Are you planning to release those?
 If i'm not mistaken the digital Input is pin 1 on the rj45 socket counting from the left looking at the side of the bpod. 

Thank you for your help!

  Cadia Stainless Steel Kitchen Sink with Drainboard Refurbishing Tips
Posted by: handmadesinknet - Yesterday, 05:57 AM - Forum: Software - No Replies

Stainless steel sinks were introduced to households in the mid-20th century. They are affordable and lightweight, and they are practically unbreakable. However, maintaining the new look of a stainless steel sink can present problems, especially in hard-water areas. Dissolved minerals in the water can cause streaks, spots and dull film on the Stainless Steel Sink Colander . Hard water magnifies the reactions with acids and salts in foods. You can remedy these problems and restore the finish on your stainless steel sink with some simple products.
6 Cadia Stainless Steel Kitchen Sink with Drainboard Refurbishing Tips !
[Image: CA-LL01-2.jpg]

Step 1 - Wash the entire sink interior and rim with hot, soapy water. Use a nonabrasive cleaning pad to dislodge heavy dirt residue.
Step 2 - Soak a cloth rag in pure white vinegar. Lay the rag over the bottom of the sink. The vinegar breaks down hard water residue that can cause dullness. If white residue from hard water exists around the faucet assembly, soak a second rag in vinegar and place it over this residue. Alternatively, use a commercial lime removal product.
Step 3 - Soak the sink with the vinegar for 15 to 20 minutes. Remove the rags and scrub the softened hard water spots with the cleaning pad. Soak and scrub stubborn spots a second time if they are still visible.
Step 4 - Dampen one corner of a clean rag with lighter fluid. Scrub any rust spots with the lighter fluid to remove them, then rinse with cold water. Rust sometimes occurs in deep scratches and dents.
Step 5- Wipe away any dark discolorations with a rag soaked in club soda. Dark rings occur when you set a hot pan in the sink and the heat discolors the steel.
Step 6- Apply a commercial scratch remover formulated for stainless steel to badly scratched sinks, following package instructions. Removers work by buffing away the scratch with a mild abrasive and leaving behind a polish that helps to fill and disguise deeper scratches.
Make it a habit to rinse the Cadia Handmade Sink thoroughly and wipe it dry after use. This is the best way to avoid streaks, spots, and dull film.

  Start/Stop logging analog input module in outputActions of state
Posted by: GabrielaF - 12-01-2018, 12:56 PM - Forum: Software - Replies (1)

I have an analog rotary encoder for a mouse treadmill and I would like to send its signal to the analog input module of bpod. 
To have timestamps that I can sync with bpod timestamps later, I thought I could start/stop logging data at the outputActions of one of my states.
For example:

sma = NewStateMatrix();
sma = AddState(sma, 'Name', 'baseline','Timer', 0.05,'StateChangeConditions', {'Tup', 'baseline'},'OutputActions', {'AnalogInput1, 1'});

Do you think that's possible? If so could you send me an example code? Particularly what is the code for 'start' or 'stop' I should use at the action?

  Global Timer in emulator mode
Posted by: HK - 11-23-2018, 10:48 PM - Forum: Software - Replies (2)

Is Global Timer supported in emulator mode?  On my rig, my protocol works when Bpod hardware (v0.8) is connected, but it shows error when it's in emulator mode. The error seems to be caused by the fact that obj.HardwareState.OutputType shows "UUUXBBWWWPPPPPPPPVVVVVVVVGGG" with a hardware, whereas it shows "UUUXBBWWWPPPPPPPPVVVVVVVV" without a hardware --- so, the Global Timer outputs are not recognized.

Is this a bug? Or, does the Global Timer need a hardware by nature?


  Pulsepal - LED
Posted by: hy - 11-22-2018, 03:28 AM - Forum: Hardware - Replies (3)

When I connected the Pulsepal to computer, The computer recognized the pulsepal (Arduino_ com3) but the power is off (on blue light on Pulsepal)

Also, I don't know how to control pulsepal using pulsepal program editor.

Please help me

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

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!