Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion articles/getting-started/onix-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ The data acquisition process is started when ContextTask passes through
<xref:OpenEphys.Onix1.StartAcquisition>. StartAcquisition allows the user to set parameters that are
related to data acquisition such as ReadSize and WriteSize. Setting the ReadSize property for a
particular workflow is a balancing act of minimizing latency of data data transfers from the ONIX
system and avoiding data accumulation in the ONIX system's hardware buffer.
system and avoiding data accumulation in the ONIX system's hardware buffer. To learn about the
process of tuning ReadSize, check out the <xref:tune-readsize> tutorial.

::: workflow
![/workflows/getting-started/start-acquisition.bonsai workflow](../../workflows/getting-started/start-acquisition.bonsai)
Expand Down
1 change: 1 addition & 0 deletions articles/tutorials/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
items:
- href: ephys-processing-listening.md
- href: ephys-socket.md
- href: tune-readsize.md
288 changes: 288 additions & 0 deletions articles/tutorials/tune-readsize.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions template/partials/hardware/configuration.tmpl.partial
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@
{{{blockReadSize}}} bytes, meaning data collection will wait until {{{blockReadSize}}} bytes of
data have been produced by the hardware. At {{{dataRate}}} MB/s the hardware will produce
{{{blockReadSize}}} bytes every ~{{{timeUntilFullBuffer}}}. This is a hard bound on the latency of
the system. If lower latencies were required, the hardware would need to produce data more quickly
or the ReadSize property value would need to be reduced.
the system. If lower latencies are required, the hardware would need to produce data more quickly
or the ReadSize property value would need to be reduced. To learn about the process of tuning ReadSize,
check out the
<a class="xref" href="~/articles/tutorials/tune-readsize.html">Tune ReadSize</a> tutorial.
</p>

<p>
Expand Down
7 changes: 3 additions & 4 deletions workflows/operators/ConfigureLoadTester.bonsai
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.5"
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:onix1="clr-namespace:OpenEphys.Onix1;assembly=OpenEphys.Onix1"
xmlns="https://bonsai-rx.org/2018/workflow">
Expand All @@ -13,12 +13,11 @@
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:ConfigureLoadTester">
<onix1:DeviceName>LoadTester</onix1:DeviceName>
<onix1:DeviceAddress>0</onix1:DeviceAddress>
<onix1:Enable>true</onix1:Enable>
<onix1:Enable>false</onix1:Enable>
<onix1:ReceivedWords>0</onix1:ReceivedWords>
<onix1:TransmittedWords>0</onix1:TransmittedWords>
<onix1:FramesPerSecond>1000</onix1:FramesPerSecond>
<onix1:FramesPerSecond>0</onix1:FramesPerSecond>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
Expand Down
29 changes: 29 additions & 0 deletions workflows/operators/LoadTesterData.bonsai
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:onix1="clr-namespace:OpenEphys.Onix1;assembly=OpenEphys.Onix1"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:LoadTesterData">
<onix1:DeviceName>Load Tester</onix1:DeviceName>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>HubClock</Selector>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>HubClockDelta</Selector>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>Counter</Selector>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="0" To="2" Label="Source1" />
<Edge From="0" To="3" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
31 changes: 31 additions & 0 deletions workflows/operators/LoadTesterLoopback.bonsai
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:onix1="clr-namespace:OpenEphys.Onix1;assembly=OpenEphys.Onix1"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:LoadTesterData">
<onix1:DeviceName>Load Tester</onix1:DeviceName>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>HubClock</Selector>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:LoadTesterLoopback">
<onix1:DeviceName>Load Tester</onix1:DeviceName>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>HubClockDelta</Selector>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="0" To="3" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
103 changes: 103 additions & 0 deletions workflows/tutorials/tune-readsize/configuration.bonsai
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:onix1="clr-namespace:OpenEphys.Onix1;assembly=OpenEphys.Onix1"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:CreateContext">
<onix1:Driver>riffa</onix1:Driver>
<onix1:Index>0</onix1:Index>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:ConfigureLoadTester">
<onix1:DeviceName>Load Tester</onix1:DeviceName>
<onix1:DeviceAddress>11</onix1:DeviceAddress>
<onix1:Enable>true</onix1:Enable>
<onix1:ReceivedWords>392</onix1:ReceivedWords>
<onix1:TransmittedWords>100</onix1:TransmittedWords>
<onix1:FramesPerSecond>60000</onix1:FramesPerSecond>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:ConfigureBreakoutBoard">
<onix1:Name>BreakoutBoard</onix1:Name>
<onix1:Heartbeat>
<onix1:DeviceName>BreakoutBoard/PersistentHeartbeat</onix1:DeviceName>
<onix1:DeviceAddress>0</onix1:DeviceAddress>
<onix1:BeatsPerSecond>100</onix1:BeatsPerSecond>
</onix1:Heartbeat>
<onix1:AnalogIO>
<onix1:DeviceName>BreakoutBoard/AnalogIO</onix1:DeviceName>
<onix1:DeviceAddress>6</onix1:DeviceAddress>
<onix1:Enable>false</onix1:Enable>
<onix1:InputRange0>TenVolts</onix1:InputRange0>
<onix1:InputRange1>TenVolts</onix1:InputRange1>
<onix1:InputRange2>TenVolts</onix1:InputRange2>
<onix1:InputRange3>TenVolts</onix1:InputRange3>
<onix1:InputRange4>TenVolts</onix1:InputRange4>
<onix1:InputRange5>TenVolts</onix1:InputRange5>
<onix1:InputRange6>TenVolts</onix1:InputRange6>
<onix1:InputRange7>TenVolts</onix1:InputRange7>
<onix1:InputRange8>TenVolts</onix1:InputRange8>
<onix1:InputRange9>TenVolts</onix1:InputRange9>
<onix1:InputRange10>TenVolts</onix1:InputRange10>
<onix1:InputRange11>TenVolts</onix1:InputRange11>
<onix1:Direction0>Input</onix1:Direction0>
<onix1:Direction1>Input</onix1:Direction1>
<onix1:Direction2>Input</onix1:Direction2>
<onix1:Direction3>Input</onix1:Direction3>
<onix1:Direction4>Input</onix1:Direction4>
<onix1:Direction5>Input</onix1:Direction5>
<onix1:Direction6>Input</onix1:Direction6>
<onix1:Direction7>Input</onix1:Direction7>
<onix1:Direction8>Input</onix1:Direction8>
<onix1:Direction9>Input</onix1:Direction9>
<onix1:Direction10>Input</onix1:Direction10>
<onix1:Direction11>Input</onix1:Direction11>
</onix1:AnalogIO>
<onix1:DigitalIO>
<onix1:DeviceName>BreakoutBoard/DigitalIO</onix1:DeviceName>
<onix1:DeviceAddress>7</onix1:DeviceAddress>
<onix1:Enable>false</onix1:Enable>
<onix1:DeadTime>0</onix1:DeadTime>
<onix1:SampleRate xsi:nil="true" />
</onix1:DigitalIO>
<onix1:ClockOutput>
<onix1:DeviceName>BreakoutBoard/OutputClock</onix1:DeviceName>
<onix1:DeviceAddress>5</onix1:DeviceAddress>
<onix1:ClockGate>false</onix1:ClockGate>
<onix1:Frequency>1000000</onix1:Frequency>
<onix1:DutyCycle>50</onix1:DutyCycle>
<onix1:Delay>0</onix1:Delay>
</onix1:ClockOutput>
<onix1:HarpInput>
<onix1:DeviceName>BreakoutBoard/HarpSyncInput</onix1:DeviceName>
<onix1:DeviceAddress>12</onix1:DeviceAddress>
<onix1:Enable>false</onix1:Enable>
<onix1:Source>Breakout</onix1:Source>
</onix1:HarpInput>
<onix1:MemoryMonitor>
<onix1:DeviceName>BreakoutBoard/MemoryMonitor</onix1:DeviceName>
<onix1:DeviceAddress>10</onix1:DeviceAddress>
<onix1:Enable>true</onix1:Enable>
<onix1:SamplesPerSecond>100</onix1:SamplesPerSecond>
</onix1:MemoryMonitor>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:StartAcquisition">
<onix1:ReadSize>16384</onix1:ReadSize>
<onix1:WriteSize>16384</onix1:WriteSize>
</Combinator>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
92 changes: 92 additions & 0 deletions workflows/tutorials/tune-readsize/loadtester.bonsai
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:onix1="clr-namespace:OpenEphys.Onix1;assembly=OpenEphys.Onix1"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:scr="clr-namespace:Bonsai.Scripting.Expressions;assembly=Bonsai.Scripting.Expressions"
xmlns:dsp="clr-namespace:Bonsai.Dsp;assembly=Bonsai.Dsp"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:LoadTesterData">
<onix1:DeviceName>Load Tester</onix1:DeviceName>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>HubClock</Selector>
</Expression>
<Expression xsi:type="rx:Condition">
<Name>Every Nth</Name>
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:ElementIndex" />
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>Index</Selector>
</Expression>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Value" DisplayName="N" />
</Expression>
<Expression xsi:type="Mod">
<Operand xsi:type="IntProperty">
<Value>100</Value>
</Operand>
</Expression>
<Expression xsi:type="Equal">
<Operand xsi:type="IntProperty">
<Value>0</Value>
</Operand>
</Expression>
<Expression xsi:type="WorkflowOutput" />
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="4" Label="Source1" />
<Edge From="3" To="4" Label="Source2" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
</Edges>
</Workflow>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:LoadTesterLoopback">
<onix1:DeviceName>Load Tester</onix1:DeviceName>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>HubClockDelta</Selector>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:DistinctUntilChanged" />
</Expression>
<Expression xsi:type="scr:ExpressionTransform">
<scr:Name>ToMilliseconds</scr:Name>
<scr:Expression>it/250000.0</scr:Expression>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="dsp:Histogram1D">
<dsp:Min>0</dsp:Min>
<dsp:Max>1</dsp:Max>
<dsp:Bins>1000</dsp:Bins>
<dsp:Normalize>false</dsp:Normalize>
<dsp:Accumulate>true</dsp:Accumulate>
</Combinator>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="0" To="4" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="6" To="7" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
21 changes: 21 additions & 0 deletions workflows/tutorials/tune-readsize/memory-monitor.bonsai
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:onix1="clr-namespace:OpenEphys.Onix1;assembly=OpenEphys.Onix1"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="onix1:MemoryMonitorData">
<onix1:DeviceName>BreakoutBoard/MemoryMonitor</onix1:DeviceName>
</Combinator>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>PercentUsed</Selector>
</Expression>
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
Loading
Loading