Showing results for 
Search instead for 
Did you mean: 

How to input 1d waveform array into lock in amplifier

Go to solution

I have a LabView application that I need to modify to include a lock in amplifier.  The application uses a DAQ card to repeatedly capture a 0.1s sample of two signals (one signal, one reference) during a laboratory test.  Previously the measurement was being made by the basic RMS module to record the VRMS of the signal, and the reference ignored.  However, the measurements I am now performing are at a much lower S:N and so I'd like to use a simple LIA from the NI kit. 


I am happy (I think) with the setup of the LIA but I'm struggling to understand the input data requirement.  It has to be a 2D array, with the reference signal identifited.  However, the output from the part of the utility that captures the waveform is a 1D array of waveform.  Could someone advise me on how to convert from the 1D array of waveform to a 2D array suitable for input to the LIA?


As you might have guessed I'm a newbie to LabView, I'm trying to modify an application designed and assembled by a former colleague, so I'd appreciate simple suggestions!  Smiley Happy



0 Kudos
Message 1 of 11

Couldn't work out how to edit my original post.  I should have said that I am reading the waveforms from a TDMS file.  I have modified the code to create a 1D waveform array for the signal and reference, one for each.  What I am unsure of is how to now input these into the LIA.


0 Kudos
Message 2 of 11
Accepted by topic author Ringding

Do you have separate 1D waveform arrays for each signal or do you have a single 1D waveform array where the signals are separate elements in the array? If it's the first, you would do something like the code below. If you have a single array, then the code would be similar - you would just use a single Index Array function. You may or may not need to transpose the 2D array. I don't know what the lock in subVI expects - channel data by row or column.


Message Edited by Dennis Knutson on 03-27-2009 10:18 AM
Message 3 of 11

I have a separate 1D waveform array for each signal.  I'll check the arrangement, by row of column.


Thanks for the reply.  I'll go try it now!


0 Kudos
Message 4 of 11

This was interesting. I have worked with this setup a lot. I have recently designed a high precision skin conductance unit using Labview and a 24 bit sound card. Anyway I am busy right now, but I will come back to you later. Could you send me your application. It does not matter if it is a draft.

For this application you do not any toolkit at all, as long as you are not running Labview basic. You need filter functions

Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 11

I tried that but fell at the first hurdle.  I've attached the error message that I got.  It refers to the issue being due to connecting the type Waveform (DBL) to a 1D array of double.  Apologies if I'm missing something simple here, software is not my strong point.


I'm a bit confused as to why the LIA (or its subVI's) require a 2D array.  I would have thought, from experience with hardware LIA (5210's etc) that the VI's would want a waveform to process.


Each entry in the TDMS file is a 0.1s capture of an ~800Hz sine wave, along with the reference signal from the chopper that generated the modulation.  I'm a bit confused as to how this data gets represented in a 2D array for the LIA.  I assume that the waveform is broken into an array of amplitude versus time for each sample and that each sample is then indexed in the 2D array?


Anyway, all help greatly appreciated.



Message Edited by Ringding on 03-27-2009 12:25 PM
0 Kudos
Message 6 of 11

The lab is shut down for the weekend now so I can't get in to take a copy of the application.  I'll send a copy on Monday.



0 Kudos
Message 7 of 11

I had a colleague volunteer to come give me a hand so I opened up the lab again.  He found a method of taking the waveform information and putting it into a 2D array where each element is an increment in time. 


I'll post up an image of how he did it on Monday in case it is of use for anyone else.


I do now have a query with regards to the settings for the Lock in amplifier but I'll start a new thread for that.



Message 8 of 11
0 Kudos
Message 9 of 11
Which is what I told you to do. The difference being that you said you had a 1D waveform array and that was not true. You had a waveform - not a waveform array.
0 Kudos
Message 10 of 11