LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i produce a stimulus at a particular time (eg 30 ms in the window)

Hi,
I would like to record EMG from two muscles (mastiod and upper sternum) before and after a stimulus (tone pip produced by a  head  phone). For this reason, I have created a program with two time loops (plz see the attachment). In the second time loop, I want to produce a tone after 30 ms (duration 6-10 ms) of the ongoing voluntary EMG ( so the second time loop will be used to see the tone pip at a particular time only)  and In the first time loop, I want to see the ongoing voluntary EMG activity and  to monitor the effect of the tone after the stimulus .
 
I can hear the tone in my program and can change the frequency of the tone but could not get the tone at 30 ms (at a particular time in the window). I made offset 30 ms in the second time loop but could not get the stimulus at 30 ms.
 
Is there any way to get the tone pip stimulus after 30 ms of the ongoing EMG?
 
please see the attached program.
 
Thanks in advance for your kind help
regards
 
Milly
0 Kudos
Message 1 of 2
(2,478 Views)
Hi Milly,

If I understand your question correctly, you would like to synchronize your tone application with your analog input application at a specific amount of time.  First, your program will run both loops "simultaneously", however, I do not see any condition set in your DAQ acquisition stating that 30ms has passed and allow for the tone measurement to happen.  Keep in mind the trigger that you are going to send, if you are not using LV real time, will have millisecond resolution.  I would suggest you add conditions that time your loops- specifically a VI called "Time Elapsed".  This VI will allow you to find out how much time has elapsed and send a boolean that could be used to send the other loop as a trigger.

I hope this helps,

Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,452 Views)