Giter Site home page Giter Site logo

mcsusbnet_examples's Introduction

README for McsUsbNet_Examples

This repository contains the McsUsbNet.dll for accessing MCS devices directly, as well as documentation and examples.

It does not contain any support for reading and writing specific MCS file formats like the MSRD file format of Multi Channel Experimenter, the MCD file format of MC_Rack or the STM file format of MC_Stimulus II.

Repository Structure

  • 32-Bit and 64-Bit binaries of the McsUsbNet.dll can be found in the \McsUsbNet\x86 and \McsUsbNet\x64 folders, respectively.

Please note that you need to have .NET Framework 4.7.2 and Microsoft Visual C++ Redistributable for Visual Studio 2019 installed to interact with the dll.

Please note as well: If you download this repository as a .zip archive, GitHub doesn't include the McsUsbNet submodule. Please download the McsUsbNet repository as well and copy its contents into the McsUsbNet_Examples/McsUsbNet folder.

  • Documentation for the McsUsbNet API is located in the \McsUsbNet\docu folder.

Please note : The dll comes with an xml file McsUsbNet.xml, that allows, for example in Visual Studio, to have a code completion. We regard this a part of the documentation and you should use a tool that allows for code completion at least in parallel to you actual target development system.

  • Usage examples for the McsUsbNet.dll in C#, Python and Matlab are located in the \Examples\CSharp, \Examples\Python and \Examples\Matlab folders, respectively.

Example Code

C#

All example projects require .NET 4.7.2 or later.

Folder Purpose
\Examples\CSharp\MEA_Recording Data acquisition from MEA devices
\Examples\CSharp\MEA2100_Stimulation Stimulation for the MEA2100 device platform
\Examples\CSharp\STG_Stimulation Stimulation for STG devices

Python

All examples require .NET 4.7.2 or later. Tested with Python 3, use pip install pythonnet

File Purpose
\Examples\Python\Recording.py Data acquisition from MEA devices
\Examples\Python\Stimulation.py Stimulation for STG devices
\Examples\Python\DeviceList.py Enumerate MCS devices

Matlab

All examples require .NET 4.7.2 or later. Tested on Matlab 2019b.

Folder Purpose
\Examples\Matlab\MEA_Recording Data acquisition from MEA devices
\Examples\Matlab\MEA2100_Stimulation Stimulation for the MEA2100 device platform
\Examples\Matlab\STG_Stimulation Stimulation for STG devices

mcsusbnet_examples's People

Contributors

armwal avatar jesinger avatar

Stargazers

Josh Woller avatar TanveerDerik avatar  avatar Neuroengineering and Computational Neuroscience Lab avatar Michele GIUGLIANO avatar Bruno Bustos avatar

Watchers

James Cloos avatar  avatar  avatar Michele GIUGLIANO avatar  avatar Neuroengineering and Computational Neuroscience Lab avatar

Forkers

evhashemi elchey

mcsusbnet_examples's Issues

How to access streamed data

Hello,

maybe a bit of a newbie question, but I do not really find the given explanations helpful so far. I was able to run Recording.py and it returned a few lines ".NET ....".
How do I access this datastream, are there any more explanations apart from the example scripts and the 860-page "documentation" in McsUsbNet to get started with the basics?

Timing the Stimulation Code

I'm trying to send continuous stimulations on MEA 2100. For which I was running a timer to detect the execution time for each time it traverses through the code as shown below:
`

        watch.Start();
        cStgDevice.PrepareAndSendData(0, amplitude, duration, STG_DestinationEnumNet.channeldata_voltage);
        // connect all stimulation channels to the first trigger
        cStgDevice.SetupTrigger(0, new uint[] { 255 }, new uint[] { 255 }, new uint[] { 1 });

        // start the first trigger
        
        cStgDevice.SendStart(1);
        watch.Stop();`    

My input duration are in the order of milli-seconds, hence I have to provide such N trains for my signal. But to my surprise the stopwatch returned that it is taking ~(10-15)milli-seconds to complete one such stimulation cycle. If this is the case it defeats the purpose of the signal. Am I calculating the timing from the wrong points or if not how should I go about this?

Python does not support SetElectrodeMode

I'm using a MEA2100 to conduct my experiments. I have been trying to replicate the MATLAB example of stimulation on the python script. However when I try to access "SetElectrodeMode" inbound method the script crashes. Is there a possible resolution to this? If not is there an exact replication of the MATLAB code on python?
One more thing to add, when I run the record example from the repository it works as desired. But when I run the original stimulation code shared from this repository I'm unable to see any artifacts or any sort of distinction that the electrodes have been stimulated.

C# MEA demo app throws 'Operation not supported' on StartDacq.

Hello,

We have been using a USB-ME64 device in our lab for years and have been generally very pleased with it. Recently we started a new project for which we need to do closed loop experiments in which we vary the parameters of a stimulus according to some features in the recorded data in real time. Our goal is then to write a C#/.NET app to implement this.

I'm having issues running the C# demo on my machine - it recognizes the MEA-USB64 device with no issues, but when I click 'Start' and the handler calls StartDacq(), the device throws an 'Operation not supported' exception (Status: 3760128005). I tried running the MC_Rack software (which, I suspect, also uses McsUsbNet) on this same machine and it works with no issues. Here I would add that our MC_Rack setup is configured for 32 analog channels, while the demo seems to use all 64. I've tried passing '32' to device.SetNumberOfChannels instead of 64, but it doesn't solve the issue.

Is there something I'm missing/doing wrong?

setup hardware filtering on MEA2100 using matlab

Hi this not a bug, but more of question. I am trying to get control over the built in filters of the MEA2100 device. I am not sure which function class to use and what route to take to activate butterworth filtering:
CMeaFeedbackFunctionNet Class e.g. FeedbackSetMkFilter()
or
device.ButterworthFilterHighPassNet (numCoefSets, order, sampleRate, cutoffFrequency, scale)?
or
filterDevice=CFilterConfigurationNet()?

the CHM documentation does give a lot of hints there. Or maybe I don't understand how to interpret the documentation.

kind regards
Gerco

Getting accurate data from the MEA2100 device in Python

Hello,

We intend to use the MEA2100 system to record from and stimulate cultured neuron cells. We have managed to successfully set up the device (with noise testing and signal acquisition with the provided generator), and now we intend to use Python to write our own codes for the device. We tried using the Python examples provided by your company on GitHub, and while the code runs without any issues, we were unable to gain the proper signals from it. We are currently trying to read the sinusoidal signals generated using the signal generator provided along with the system. When we use the MEA data experimenter, we can clearly see the sinusoidal signals as seen in the picture below:

image

When we try to do it using MATLAB, we run into some issues regarding communication with the device, but we can still obtain the sinusoidal signal as intended.

Unfortunately, when we try using the Python code provided as an example, we do not get any intelligible signal from the device. We are getting something like this:

image

image

We would have been worried if there were some issues with the device or our computer, but both the experimenter and even MATLAB can read the sinusoidal signal. However, we would like to perform some additional data processing which is much more convenient in Python, so we would like to write our codes in Python if possible.

We also tried to reduce the number of channels in the block to 1 by changing the number of electrodes to 1 and disabling the checksum channel reading to see where the issue was, but it did not solve the problem. We also tried to implement the MATLAB code for data acquisition (run_mea.m) in Python since it could read the sinusoidal signal (we disabled the OnChannelData handler to do it), but again we did not get any sinusoidal signal. I have added the full code in the comments for your reference.

It is to be noted that the computer we are using for this has Windows 10 (64-bit) with a .NET version of 7.0.302. We tried installing an instance of version 4.7.2, but the OS did not let us do it as there is a higher version already installed. The documentation also says that higher versions would work so we did not try doing anything further. We also thought about whether our computer is properly interpreting the “clr_array_to_numpy.py” script, but it seems unlikely to have any issues.

We greatly look forward to your response.

FIFO queue seems not to be supplemented in 5.1.24 vs 3.2.45

The code below runs in 3.2 but not 5.1
it seems that if quesize is set to 100000 and blocksize to 25000, after the 3rd attempt to read the buffer only ~24851 samples per channel ar left and not refilled as wif the FIFO queu stopped being refilled.
( I added loop and FR for bug tracking reasons)
device.SetSelectedChannels(channelsinblock, queuesize, blocksize, Mcs.Usb.SampleSizeNet.SampleSize16Unsigned, channelsinblock);
cleanupObj = onCleanup(@()mea_cleanup(device));
device.StartDacq()
.....
while(1) % endless loop

for i = 0 :channels-1                              
    
    number = device.ChannelBlock_AvailFrames(i); %Checks the amount of sample ( frames)available in the buffer of channel i

    if (number >= blocksize) && (framesready(i+1)==0)
        framesready(i+1)=1;
        [frames, ~] = device.ChannelBlock_ReadFramesUI16(i, blocksize); %Read frame of samples
        data(i+1,:)=double(frames);
    end
    if framesready==ones(channels,1); % if not all channels have an amount of frames >= blocksize repeat the cycle
        %loop
        %figure;imshow(FR);
        return
    end
    
end
FR=[FR framesready];
loop=loop+1;
if loop>1000
    loop
    figure;imshow(FR);
    number
    return
end

end
end

Get timestamp of the stimulation for the multiwell system

Hello,

We managed to read from the multiwell as well using matlab scripts based on the examples provided. Reading works, grounding works stimulation probably works (need to check with scope). However retrieving the timestamps using the additional digital channels fails: ('McsUsbNet, Version=5.1.32.0, Culture=neutral, PublicKeyToken=null')

for the MEA2100 using the approach below:

Devices.dacq.EnableDigitalIn(Mcs.Usb.DigitalDatastreamEnableEnumNet.DigitalIn , 0);
Devices.dacq.EnableDigitalIn( Mcs.Usb.DigitalDatastreamEnableEnumNet.DigitalOut , 0);
Devices.dacq.EnableDigitalIn( Mcs.Usb.DigitalDatastreamEnableEnumNet.Hs2SidebandLow , 0);
Devices.dacq.EnableDigitalIn(Mcs.Usb.DigitalDatastreamEnableEnumNet.Hs2SidebandHigh , 0);
Devices.dacq.EnableChecksum(true, 0);
[analogchannels, digitalchannels, checksumchannels, timestampchannels, channelsinblock] = Devices.dacq.GetChannelLayout(0);
System.ChannelsAvailable=channelsinblock/2;
Devices.dacq.SetSelectedChannels(System.ChannelsAvailable, System.queuesize, System.blocksize, Mcs.Usb.SampleSizeNet.SampleSize32Signed, channelsinblock);
Devices.dacq.ChannelBlock_SetCommonThreshold(System.blocksize);
Devices.dacq.ChannelBlock_SetCheckChecksum(uint32(checksumchannels),uint32(timestampchannels));

And then load the stimulations with:

Devices.stg.PrepareAndSendData(HeadStage, NET.convertArray(amplitude, 'System.Int32'), NET.convertArray(duration, 'System.UInt64'), Mcs.Usb.STG_DestinationEnumNet.channeldata_voltage);
SidebandData = Devices.stg.Stimulus.CreateSideband(StimulusActive, sideband, duration, Bit0Time, Bit3Time, Bit4Time);
Devices.stg.PrepareAndSendData(HeadStage, SidebandData.Sideband, SidebandData.Duration, Mcs.Usb.STG_DestinationEnumNet.syncoutdata);

gives 5 digital channels. However for the multiwell, using Hs2SidebandLow/high results in digital channels to be zero. leaving these out results in 2 channels, but no timestamp trigger. It seems that Hs1/Hs2 is not available? Switching to head stage 1 does not make difference.
What am I doing wrong here?

Error using run_mea

Hello,
I used the example (Matlab_MEA Recording) and get run. But the bellow error happens:
“Error using run_mea (line 38)
Message: The namespace for the type ‘SampleSize’ does not exist. MATLAB requires all .NET types to be within a namespace. "
How can I solve the error in coding?
Thank you for your help.

IMG_ERROR

CStg200xDownloadBasicNet is there a way to get an event/timestamp out upon each stimulation data point?

I have a script to program stg1 to do a stimulation pattern:
e.g. durations = [200,200, 1000000, 200, 200, 2000000, 200, 200, 1500000,, etc] and
eg. amplitudes = [-20000, +20000, 0, -20000, +20000, 0, -20000, +20000, 0,,etc] zero being interstimulus intervals

Now I want to create a timestamp for my recording (in matlab) on each stimulation (200, 200) based on the time the actual stimulation was given by the CStg. Is it possible read from the device wheter or not a stimulation was given. or do I have to assume that the stimulation actual will be given (or derive from the stimulus artifact)?

kind regards,

Gerco

My Matlab program to program the Cstg:

        function stimulate_electrode_repeatedly( devicelist, electrode, channelorder, stimtype, amplitude, duration)
        electrode=find(channelorder==electrode)-1;% MCS=0:59, matlab=1:60
        if devicelist.Count == 0
             Msgbox('No MEA USB Device connected!', 'Error Connecting To Device', 'error');
        end
        %for electrode = 0 : 60
        %electrode =1
        cStgDevice=Mcs.Usb.CStg200xDownloadNet(); 
                   
        % Connect to the stimulator of the device. The lock mask allows multiple connections to the same device
        status = cStgDevice.Connect(devicelist.GetUsbListEntry(0),1); % ,1) is the lockmask
        if status == 0

            % Make sure that the stimulation is stopped
            cStgDevice.SendStop(uint32(1));
            

            % ElectrodeMode: emManual: electrode is permanently selected
            % for stimulation or emAutomatic for automatic
            cStgDevice.SetElectrodeMode(electrode, Mcs.Usb.ElectrodeModeEnumNet.emManual);

            % ElectrodeDacMux: DAC to use for stimulation
            % cStgDevice.SetElectrodeDacMux(electrode,0,0);% required to reset the dacmux in between stimulations

            %cStgDevice.SetElectrodeDacMux(electrode-5,0, Mcs.Usb.ElectrodeDacMuxEnumNet.Stg1);% (electrode, index=0, dac)
            cStgDevice.SetElectrodeDacMux(electrode,0, Mcs.Usb.ElectrodeDacMuxEnumNet.Stg1)

            % 0 = Ground
            % 1 = Stg1
            % 2 = Stg2
            % 3 = Stg3

            % ElectrodeEnable: enable electrode for stimulation
            cStgDevice.SetElectrodeEnable(electrode, 0, true);

            % BlankingEnable: false: do not blank the ADC signal while stimulation is running
            cStgDevice.SetBlankingEnable(electrode, true);

            % AmplifierProtectionSwitch: false: Keep ADC connected to electrode even while stimulation is running
            cStgDevice.SetEnableAmplifierProtectionSwitch(electrode, true);

            
            if stimtype=='nA'
                % use current stimulation
                cStgDevice.SetCurrentMode();
            else
                % use voltage stimulation
                cStgDevice.SetVoltageMode();
                disp('uV');
            end

            % send stimulus data to device
            % Prepare and send data to a given channel on the STG. Previous data sent to that channel is erased first. 
            % Each datapoint is represented by an signed 32bit integer value. When using voltage stimulation, the values are in multiple of 1 uV, thus the possible range is += 2000 V. When using current stimulation, the values are in multiple of 1 nA, this the possible range is += 2000 mA. 
            % The duration is given as a list of 64 bit integers. Durations are given in units of µs. The STG has a resolution of 20 µs. 
            % Blocks of data which should repeat can be defined by prepending such a block with an entry in the arrays where both amplitude and duration is zero. The end of such an block is marked by an entry where the duration is set to zero and the amplitude beeing set to the number of times the block should run. Blocks can be nested. 
            % 
            % Parameters:
            % channel The channel number to send data to. 
            % amplitude A list of amplitudes in units of µV and nA in voltage and current mode, respectively. 
            % duration A list of durations in units of µs. 
            % destType specifies wheather the data is for syncout, current or voltage stimulation. 
            if stimtype =='nA'
               cStgDevice.PrepareAndSendData(0, NET.convertArray(amplitude', 'System.Int32'), NET.convertArray(duration, 'System.UInt64'), Mcs.Usb.STG_DestinationEnumNet.channeldata_current); 

            else
                cStgDevice.PrepareAndSendData(0, NET.convertArray(amplitude', 'System.Int32'), NET.convertArray(duration, 'System.UInt64'), Mcs.Usb.STG_DestinationEnumNet.channeldata_voltage);
            end
           


            % connect all stimulation channels to the first trigger and repeat the
            % pulse 1 times
            cStgDevice.SetupTrigger(0, NET.convertArray(255, 'System.UInt32'), NET.convertArray(255, 'System.UInt32'), NET.convertArray(2, 'System.UInt32'));
           

            % very important to use the Net.convertArray functiosn, since Matlab Uint32 itself does not translate correctly apparantly
            % start the first trigger
            cStgDevice.SendStart(uint32(2));
            
            cStgDevice.Disconnect(); % ,1)
            disp(['electrode ' num2str(electrode+1) ' (' num2str(channelorder(electrode+1)) ') will be stimulated!']);

        else
            disp ('connection failed');
            disp (dec2hex(status));
            disp (Mcs.Usb.CMcsUsbNet.GetErrorText(status));
        end

Stop recording after a few seconds

When I use the Matlab example to read MEA data, it will stop recording after a few seconds. When I check the variable "number" in "run_mea.m", it decreases after a few seconds and equals zero. Therefore, the program stops reading new data from MEA.

MATLAB

I am trying to program an STG2008 with MATLAB. MC_Stimulus_II can connect with it. After closing MC_Stimulus_II, I try connecting to it with MATLAB by running "init_stg.m" and then "run_stg.m"; however, it always results in a "Found 0 STGs."

running Recording and stimulation module

Hi,
I am running my labVIEW program which provide a closed-loop control (programmed to provide recording and stimulation to implanted channels). The recording device is a USB-ME64-System and the stimulation device is a STG 4008 (manufactured by Multi Channel Systems). In my closed-loop program, when the recorded-signal amplitude exceeds the threshold value, the stimulation pulses will be trigger.
After running the recording module and stimulation module in two separate labVIEW programs, both modules are working fine. However, when these two modules run in a labVIEW program, the error 1172 occurs. The error related to disconnect node for stg200×downloadnet.
Thank you for your help

Uploading IMG_2560.jpg…

How to use python to control MEA2100_256 to achieve electrical stimulation of custom electrodes for brain organoids

Hello,
Now I am trying to use python to control the MEA2100_256 to achieve electrical stimulation of brain organoids.maybe a bit of a newbie question, but I do not really find the given explanations helpful so far. I still don't understand something in the code after reading the manual and samples.

in the electrodes that define the DAC device. SetElectrodeDacMux(electrode,0, Mcs.Usb.ElectrodeDacMuxEnumNet.Stg1); Does this 0 mean the index of the list mode? I don't see the creation of list mode in the example. Hope for a detailed explanation

Also, can tell me more specific input about device.SetupTrigger(0, channelmap, syncoutmap, repeat). For example, in channelmap, the array we input is a one-dimensional array of 0 and 1. Does 1 represent the electrode corresponding to the stimulus? Again entering 255 means connect all stimulation channels to the first trigger and repeat. Then I hope to realize how to use python to control the MEA2100_256 to stimulate only the electrodes I want to stimulate.

Possible Expansion of STG channels?

I'm using a MEA1200 which has 3 independent stimulus generators (Stg1, Stg2, Stg3) to configure the patterns for each of them.
As in the stimulus generators can be extended ( say can we add a new Stg4 or more )?

I'm using python and the latest McsUsbNet-5.1.6.DLL to run my script. Thanks in advance.

How to stimulate using ElectrodeModeEnumNet.emAutomatic on internal stimulator of MEA2100 IFB-Lite

Hi,
When I try to stimulate using a MATLAB script based on the example provided by MCS, its works. MEA2100 MCS-IFB-Lite. However if I a want to use automatic stimulation in stead of dedicated electrode stimulation(to reduce artefacts when switching back to reading mode of the electrode, using SetElectrodeMode(electrode, Mcs.Usb.ElectrodeModeEnumNet.emAutomatic) it does not stimulate. (checked with oscilloscope).

I can let it stimulate by:

  1. stop my matlab script (see below)
  2. switch to MC-Rack program a stimulation on stg1
  3. stimulate once
  4. stop mc-rack
  5. run the matlabscript without rebooting the IFB
    So Mcs.Usb.ElectrodeModeEnumNet.emAutomatic does work.

After further studying the McsUsbNet. documentation I suspect it has to do with programming the sidebandsignal using something like,
SidebandData=CstimulusFunctionNet.CreateSideband(StimulusActive, Syncout, duration, Bit0Time,Bit3Time, Bit4time),
however this instruction is not part of CStg200xDownloadNet(). so i don't know how to access it.

Can anybody help me on the right track?

Kind regards,

Gerco

function stimEventTime=stimulate_electrode( devicelist, electrode, channelorder, stimtype, amplitude, duration)

electrode=find(channelorder==electrode)-1;% MCS=0:59, matlab=1:60
if devicelist.Count == 0

    Msgbox('No MEA USB Device connected!', 'Error Connecting To Device', 'error');
end

cStgDevice=Mcs.Usb.CStg200xDownloadNet();

% Connect to the stimulator of the device. The lock mask allows multiple connections to the same device
status = cStgDevice.Connect(devicelist.GetUsbListEntry(0),1); % ,1) is the lockmask
if status == 0

    % Make sure that the stimulation is stopped
    cStgDevice.SendStop(uint32(1));

    % ElectrodeMode: emManual: electrode is permanently selected
    % for stimulation or emAutomatic for automatic
    %                 cStgDevice.SetElectrodeMode(electrode,  Mcs.Usb.ElectrodeModeEnumNet.emManual);
    cStgDevice.SetElectrodeMode(electrode, Mcs.Usb.ElectrodeModeEnumNet.emAutomatic);

    % ElectrodeDacMux: DAC to use for stimulation
    % cStgDevice.SetElectrodeDacMux(electrode,listmodeindex,0);% required to reset the dacmux in between stimulations

    cStgDevice.SetElectrodeDacMux(electrode,0, Mcs.Usb.ElectrodeDacMuxEnumNet.Stg1);% (electrode, index=0, dac)


    % 0 = Ground
    % 1 = Stg1
    % 2 = Stg2
    % 3 = Stg3

    % ElectrodeEnable: enable electrode for stimulation
    % cStgDevice.SetElectrodeEnable(electrode, listmodeindex, enable);
    cStgDevice.SetElectrodeEnable(electrode, 0, true);

    % for i=0:59%find(channelorder==32)-1
    %     if  i==14 % the ground electrode itself ||i==electrode
    %     % BlankingEnable: false: do not blank the ADC signal while stimulation is running
    %     cStgDevice.SetBlankingEnable(i, false);
    %     % AmplifierProtectionSwitch: false: Keep ADC connected to electrode even while stimulation is running
    %     cStgDevice.SetEnableAmplifierProtectionSwitch(i, false);
    %     else
    %        cStgDevice.SetBlankingEnable(i, true);
    %        cStgDevice.SetEnableAmplifierProtectionSwitch(i, true);
    %     end
    % end
    % cStgDevice.SetBlankingEnable(electrode, true );
    % cStgDevice.SetEnableAmplifierProtectionSwitch(electrode, true);
    %

    if stimtype=='nA';
        % use current stimulation
        cStgDevice.SetCurrentMode();

    else
        % use voltage stimulation
        cStgDevice.SetVoltageMode();

    end
   
    if stimtype=='nA'
        cStgDevice.PrepareAndSendData(0, NET.convertArray(amplitude, 'System.Int32'), NET.convertArray(duration, 'System.UInt64'), Mcs.Usb.STG_DestinationEnumNet.channeldata_current);
    else
        cStgDevice.PrepareAndSendData(0, NET.convertArray(amplitude, 'System.Int32'), NET.convertArray(duration, 'System.UInt64'), Mcs.Usb.STG_DestinationEnumNet.channeldata_voltage);
    end

    % connect all stimulation channels to the first trigger and repeat the
    % pulse 1 times
    
    cStgDevice.SendStart(uint32(1));
    
    %% bring electrode back in activated state
    % A hack to bring back the electrode to reading mode
    % cStgDevice.SetElectrodeMode(electrode, Mcs.Usb.ElectrodeModeEnumNet.emAutomatic);
    % cStgDevice.SetElectrodeDacMux(electrode,0, Mcs.Usb.ElectrodeDacMuxEnumNet.Stg1);% (electrode, index=0, dac)
    % cStgDevice.SetElectrodeEnable(electrode, 0, true);
    % cStgDevice.SetBlankingEnable(electrode, true);
    % cStgDevice.SetEnableAmplifierProtectionSwitch(electrode, true);
    % amplitude =int32([0, 0]); % nA or uV
    % duration = uint64([0, 0]); % ??s
    % cStgDevice.SetVoltageMode();
    % cStgDevice.PrepareAndSendData(0, NET.convertArray(amplitude, 'System.Int32'), NET.convertArray(duration, 'System.UInt64'), Mcs.Usb.STG_DestinationEnumNet.channeldata_voltage);
    % cStgDevice.SetupTrigger(0, NET.convertArray(255, 'System.UInt32'), NET.convertArray(255, 'System.UInt32'), NET.convertArray(1, 'System.UInt32'));
    % cStgDevice.SendStart(uint32(1));

    %% end session and disconnect
    % TriggerInputs = cStgDevice.GetNumberOfTriggerInputs();
    stimEventTime=datetime;
    cStgDevice.Disconnect(); % ,1)

else
    disp ('connection failed');
    disp (dec2hex(status));
    disp (Mcs.Usb.CMcsUsbNet.GetErrorText(status));
end

end

About setting up the stimulation prior to placing cells using the signal generator

Hello,

I tried running both the data acquisition codes the stimulation codes provided as an example. I managed to read the data from the MEA2100 device using signal generator, but I soon ran into an issue while providing the stimulation. I believe the device ran into some conflict while configuring the pins as output pins (for stimulation) while they were receiving signals from the signal generator. Is there a way to provide the stimulation to the device while it has the signal generator equipped? I would like to write a code that receives neuron signals and then provides stimulation accordingly (basically a feedback loop). Is there a way to do this using the signal generator? Or can it only be done using the MEA wells?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.