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 »

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: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

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 »

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: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

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 »

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: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

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)

LMarreel
Posts: 7
Joined: Wed May 04, 2022 7:11 pm

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

Post by LMarreel »

Hi Coen,

I am trying to achieve the same as described above. Has the source code changed regarding the ERP part since 2011? Or can I sent the instructions in this post to our technicians to apply on the latest ActiView version?

Best wishes
Lena

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

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

Post by Coen »

The code of the ERP section is still the same (besides some minor bug repairs).

Best regards, Coen (BioSemi)

LMarreel
Posts: 7
Joined: Wed May 04, 2022 7:11 pm

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

Post by LMarreel »

Thank you for your response. Regarding the '' remove online artifact removal by wiring it as a solid false''. How do we best go about this per your suggestion? Remove the Yellow case as a whole and just make the wiring in the False condition a fixed condition? i.e., the green line (logical OR) out put from the Absolute and relative reject for loops do not go anywhere

Alternatively would it be a better idea to change as little as possible and just make the Yellow true case = the wiring in the false case? i.e., regardless of what comes out of the blue lines for false or valid sweeps, and regardless what the green lines return (logical OR), the wiring of the false condition is executed.

Best wishes
Lena

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

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

Post by Coen »

Both the above approaches are OK, but I would just delete the wire from the OR output and connect a FALSE constant to the yellow case selector.

Best regards, Coen (BioSemi)

Post Reply