LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with analog channel interaction....

Dear all,
I am trying to acquire simultaneously an analog signal (EMG) and a digital TTL input needed as a time marker, using an analog and a digital channel respectively. The recordings are being done using a NI-PCI-MIO-16E4. After being repeatedly unsuccessful at this task, I opted by reading the TTL (50 msec long) through an analog channel. The problem I ran into is that  the  digital  signal  seems to interact with the analog one, dropping the baseline for a 2 sec interval. I know that the problem is generated at the level of the acquisition console or the NI acquisition card but not at the level of the amplifier.
I would appreciate if anyone had any suggestions regarding this issue and how to fix it. I attach the vi file just in case you want to see what I have done.

Many thanks in advance for your help
valeria

--
Valeria Della-Maggiore, Ph. D
Department of Physiology, School of Medicine
University of Buenos Aires
Paraguay 2155, Capital Federal
Buenos Aires, C1121ABG
Argentina
phone 54 11 5 950 9500 (2132)
0 Kudos
Message 1 of 7
(3,158 Views)
What is the level of the EMG signal at the point where you are sampling it? How fast are you sampling?

The problem could be settling time for the analog front end's amplifiers. Scanning a very low-level signal with a comparatively much higher level signal can cause problems like you are describing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 2 of 7
(3,148 Views)
Hi Mike, thanks for your message.
We are acquiring electromyography with a bandwith between 10 and 1000Hz. Separatly, we trigger a stimulator that we use to generate motor evoked potentials. Every time we trigger the stimulator, it generates a TTL pulse of 5 V with a duration of 50 mseconds.  Do you have any idea how to get around this problem if, as you suggest, takes place in the sampling side of the acquisition?

many thanks
valeria
0 Kudos
Message 3 of 7
(3,130 Views)
Either amplify the EMG signal so it's amplitude is closer to the 0-5V TTL signal, attenuate the TTL signal to make it closet to the EMG level, or acquire the two on seperate DAQ cards.

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 4 of 7
(3,104 Views)
Hi Mike, thanks a lot for your suggestion. We are now making a cable with a resistance to decrease the TTL ampllitude. You wouldn´t happen to know how to record the TTL as a digital input, would you? We have managed to detect a TTL edge but we are unable to save the TTL together with the analogical signal. Specifically, it you look at the record, we get random gaps in the column corresponding to the TTL signal and we don´t know what this is due to...

thanks again Mike, I really appreciate your help!
valeria
0 Kudos
Message 5 of 7
(3,096 Views)
Make sure the cable you are building uses a voltage divider circuit. Simply putting a resistor in series won't help much - thanks to Herr Ohm and his law. Remember that voltage drop across a resistor is a function of the current flow, and given the high input impedence of the analog inputs I wouldn't expect much current to be flowing.

So low current flow = low voltage drop.

Check out this link. It has a Java applet with sliders that let you interactively play with input voltages and resistor values. True, it doesn't do anything a good pocket calculator wouldn't do for you but it is kind of neat (in a geeky sorta way).

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 7
(3,087 Views)

I'd approach this by returning to your earlier configuration where you acquire only 1 analog signal.  The change I'd recommend is to capture the digital signal in a different way.  You're probably trying to read this as a digital bit using software calls, right?  I know the E-series board won't let you perform a hardware-timed digital input task.  However, you *CAN* use an onboard counter to react to TTL edges with hardware-precision timing.

The part that may seem tricky is sync'ing the two.  I'm not near a LV pc now to post a screenshot, but I can describe an idea.  Configure a counter task to count edges.  Configure the DAQmx Timing vi such the source of the "Sample Clock" signal is your external TTL pulse.  This configuration means that each external pulse will buffer a single count value.

What count value will you buffer?  Well the simplest one would be the AISampleClock.  You can specify that with a DAQmx Channel property node, something like CounterInput-->Count Edges-->Input Terminal.

Finally, make sure you start the Counter task first.  As soon as you start the AI task, your counter will be counting samples.  When you get an external TTL pulse, you'll buffer the instantaneous count.  This count will be the most recent AI sample # taken.  It directly identifies the index into your overall array of AI voltage values.

If you're new to counters, look through your help resources and online here for tutorials.  They work a bit different than AI, AO, DI, DO tasks, and may require just a little extra time to get used to.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 7
(3,074 Views)