LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital and Analog Signal Mixing

Hello,
 
I am trying to sum a digital signal with an analog signal using LabVIEW. Both signals are sampling continuously at a 1kHz rate with a buffer size of 100 samples (defaulted values for the Express VI), and I am displaying them to the screen in real time and writing them to a file for later manipulation. The hardware associated with this problem is a PCI 6251 board and a BNC 2110 connector block. I am having multiple problems.
 
1. To start, I can not sum the two signals together when I use the digital signal configured as a counter. I put it and the analog signal on the same external clock (an external waveform generator sending a 1kHz square wave), but ther is an issue at the summing block - "dt of signals is different." How can this be?
 
2. The analog signal displays a time history as long as I want. This means I can display 5 seconds of data on the screen even though my buffer holds 0.1 seconds of data. I have not found a way to force the digital signal to do the same. Is there a way to do this?
 
3. I think I can configure the counter as four separate digital signals. If I decide to use the four separate digital inputs to "create" my final digital input, can I manipulate these signals using the math functions to build my counter? Would I be able to eliminate/sidestep problems 1 and 2 if I did that?
 
Any information would be greatly appreciated. Thank you for your help!
 
Ty
0 Kudos
Message 1 of 2
(3,214 Views)
Hello Ty,

In order to sum the digital and analog signals successfully, make sure that they are both of the same datatype.  They are being sampled at the same rate, so that is not the root of your error.  In order to correct dt inconsistencies, two methods exist:
  1. Use the Scale Delta t VI located on the Functions»All Functions»Waveform palette to automatically scale the dt.

  2. Use the Resample Waveforms VI located on the Functions»All Functions»Analyze»Waveform Conditioning palette. The VI used will depend on whether a single waveform is used (Align Waveforms (Single Shot)) or if a continuously updated waveform is used (Align Waveforms (Continuous))
If you can acquire four separate digital signals, you can manipulate them however you would like, including using the signals to act as a counter.

Does this help to solve your issue?
Kameralina

0 Kudos
Message 2 of 2
(3,152 Views)