LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EMG signal Capture

Hey

 

I am using Labview 2009. I have not written or used it for 2 years.

 

Anyway, I want to capture 4 emg signals for a period of time. The signals will be conditioned.

 

I want to control the data capture with a Start/Stop control.

 

I would like to display the four signals for this period of time and calculate and display the Average Integrated values for each of the four signals captured during my trial.

 

I just need the Average Integrated EMG (in millivolts) for a given muscle contraction so the students can record it. We will have 4 muscles wired to electrodes for each trial (4 analog input channels). Participants/subjects will complete two exercises; each exercise will be performed for two repetitions under both stabe and unstable conditions. Each exercise will be completed as 2 seconds down, hold, 2 seconds up, repeat...I want to use the Start/Stop control to capture the signals during this time period of exercise.

 

Any help would be greatly appeciated!

 

Thanks

Ned

0 Kudos
Message 1 of 27
(4,958 Views)
Where exactly do you need help? A single Boolean wired to a case statement can do what you ask. Why don't you attach the code you have already written so someone can see where your problem is?

p.s. Are you using the biomedical toolkit?
0 Kudos
Message 2 of 27
(4,934 Views)

From what you have described, this job is a pretty straight-forward data logging application, and there are several examples that can get you started. 

 

You mentioned that there are 4 values you want to read. What are you using to read the conditioned voltages? What sample rate are you going to need - which is to say: What is the highest freq component in the input signals that is importent?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 27
(4,919 Views)

Hey

 

Thanks for the help.

 

I am not using the Biomedical toolkit. Do I have that with Labview 2009?

 

I have a program written to capture the 4 signals - the data is written to a LVm file. I have another simple program that will read the file, and display in a graph the captured waveform - I can switch between the four signals using a boolean control.

 

So all I need is how best to rectify the data, then integrate to get one number (average integrated emg) using Labview 2009's math/arithmetic function pallette? I have used the integration function before, I have never used the rectify function (if available) before. Can you tell me the best way to this? The data stream per channel is saved for say 30 seconds. So my second program just presents this snapshot of data for analysis in the graph, I just need a number representing average integrated emg for each of the four as I switch signals displayed using boolean controls per signal. In my code, I would like to perform the math functions within the case structure. Will this work?

 

Thanks again!

 

Ned

0 Kudos
Message 4 of 27
(4,911 Views)
The toolkit can be found at http://sine.ni.com/nips/cds/view/p/lang/en/nid/210828. Pretty sure that there is 2009 version. Doing a simple search for ' Biomedical Toolkit' is something you can do. There is also a dedicated community group.
0 Kudos
Message 5 of 27
(4,893 Views)

What do you mean by "rectify" I'm an old radio guy and rectify might mean the same thing to you as it does to me.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 27
(4,870 Views)

Mike,

 

Rectify in EMG means the same thing you think it means. A diode in hardware and absolute value in software.

 

EMG had some really wierd stuff. About 15-20 years ago I was asked to build some circuits to replace an old EMG signal conditioner. After some head-scratching reverse engineering I determined that the original circuit used a transformer coupled circuit, some vacuum tube diodes, and a filter to get what they called the rectified EMG.  The system bandwidth was dependent primarily on the transformer which behaved like a cheap audio transformer. Furthermore, the threshold effect of the diode forward voltage drop was not managed or accounted for. As a result the behavior was almost impossible to duplicate with modern circuitry.  I suspect that the first guy to publish some results on "rectified EMG" used the parts laying around his lab. The first commercial units duplicated that and it became the standard even though it actually had little to do with the behavior they were trying to measure.

 

I have been away from the field for a while and have no idea whether anyone has rationalized the behavior.

 

Lynn

0 Kudos
Message 7 of 27
(4,863 Views)

Well, given what Lynn said, to "rectify" your data it's simply a matter of taking the absolute value of the data in the array. That done, you can then integrate the result.

 

Mike...

 

(PS: to produce the equivalent of the absolute value in hardware would actually take at least two diodes and probibly four... but who's quibbeling... hee hee hee)


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 27
(4,850 Views)

Hey Thanks for all the input!

 

I have this done so far (see code). I am going to add a LP and HP filter.

 

I think I have what I need to update data after zoom. Does anyone have a quick method to this? I just have the one graph and one calculation to be made on updat after zoom.

 

Thank you for the help!

 

Ned

 

 

0 Kudos
Message 9 of 27
(4,820 Views)

Please post a typical data file (or a small subset if they are large) so we have some data to see what your program is doing.

 

Lynn

0 Kudos
Message 10 of 27
(4,799 Views)