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!
Solved! Go to Solution.
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.
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.
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!
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
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.
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.
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.