using triggers to start/stop the display (not the saving)

Post Reply
mandres
Posts: 4
Joined: Thu Aug 18, 2011 11:14 am
Location: University of Gent

using triggers to start/stop the display (not the saving)

Post by mandres » Thu Aug 18, 2011 12:51 pm

Hi

I have recently started using BioSemi to record TMS-induced motor-evoked potentials (MEPs) in hand muscles. We define TMS intensity as a function of the motor threshold, minimum intensity to observe a MEP > 50 microV in 5 out of 10 trials. Fast and efficient calibration thus requires on-line visual inspection of EMG activity within a short time period (MEPs in hand muscles are typically observed 20-30 ms after TMS over the motor cortex).

This could be facilitated if ActiView could display a short time interval locked to the TMS pulse without refreshing the trace on the screen.

Concretely, I was wondering if/how it is possible to start the bipolar display in response to one trigger code and stop it a few msec later with another trigger code, so that the MEP remains on the screen until the next trial.

Please note that my question is not related to the start/stop of the "saving" pause button. I refer to the operation performed manually with the start-stop buttons in the left upper corner of the ActiView interface.

Best
Michael

Coen
Site Admin
Posts: 969
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen » Mon Aug 22, 2011 3:28 pm

Displaying a (variable) amount of data after a trigger is basically implemented in ActiView already in the Event Related Average tab page. However, in the current software, all sweeps are averaged. Adapting the (open-source) LabVIEW code to display individual sweeps would involves merely deleting the parts of code that add the successive sweeps (to just display the most recent sweep).

Best regards, Coen (BioSemi)

mandres
Posts: 4
Joined: Thu Aug 18, 2011 11:14 am
Location: University of Gent

Post by mandres » Tue Aug 30, 2011 12:56 pm

Coen,

Can you just check the following steps as I am not familiar with the structure and labels of the ActiView software ?

I have identified the subvi Avg-Sweep.vi as the critical part of the source code. I guess that I have to remove the "+" that relates the content of the "Average Buffer" to the content of the "Average Total" in the lower Case Structure (and also the "x", "+1", "/" related to the number of valid sweeps). While doing so, the content of the "Average Buffer" is passed directly to the "Average Total Out" (provided the sweep is valid).

Is it sufficient ? I am a bit puzzled by the very first wire branch between the "Average Total" and the "Average Buffer" loop (with a select function) - does it matter ?

Is there any "Compile" command to execute afterwards or just "Save" ?

Thanks
Michael

Coen
Site Admin
Posts: 969
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen » Thu Sep 01, 2011 4:13 pm

The above is correct, just directly pass the "average buffer" directly to the "average result" when the sweep is ready (lower case is true). This is sufficient. You can just leave the "valid sweeps" counter in place.

The select function in the first wire branch is part of the initialization of the buffers after a sweeps start, just leave it in place.

I also recommend to disable the on-line artifact rejection. The TMS pulse will probably trigger the rejection even on the most relaxed settings (resulting in zero valid sweeps). Just wire the yellow Case (yes or no reject) in the lower green Case to a solid False.

LabVIEW compiles automatically if you RUN or SAVE the VI (provided the run arrow is unbroken to indicate that there are no errors left).

Best regards, Coen (BioSemi)

mandres
Posts: 4
Joined: Thu Aug 18, 2011 11:14 am
Location: University of Gent

Is ActiView really open source ?

Post by mandres » Tue Sep 13, 2011 3:14 pm

Dear Coen,

In order to modify the "Avg-sweep" subroutine, I downloaded the original package from your website "Actiview605-all", and opened the vi using a full version of Labview (v10) after placing the files in the Labview data folder.

I was able to open and modify the subvi "Avg-sweep" but it was not possible to open the main vi "ActiView605-lores" under the Labview environment. Labview actually opens this vi as an executable without any access to the block diagram (I don't even see the Labview menus).

My intuition is that it could be related to the dependencies because at some point, we changed the location of the ActiView package so that Labview could not find the pathway to certain function libraries and it was then possible to open the vi "ActiView605-lores" (but not to compile and build an executable because all function libraries were not accessible).

Is there anything in the ActiView source code that prevents it to be modified ? Any dependencies ? Any option to activate while loading the vi ? Could you check this with the package provided on your website ?

Best
Michael

Coen
Site Admin
Posts: 969
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen » Tue Sep 13, 2011 4:41 pm

Go to the "About ActiView" tabpage and left-click on the central red square to stop the VI from running (or hit CTRL+. , control and dot keys). The LabVIEW menus should then appear, and CTRL+E shows the full diagram.

Best regards, Coen (BioSemi)

Post Reply