LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquiring and generating signals

Solved!
Go to solution

Hi all !

 

I am new to labview and I need some help. I am trying to simultaneously acquire and generate data from two devices. I have successfully achieved synchronous acquisition but the problem I am having is that every time I run the program it is not cosistent. Can someone help me in this and take a look at my code ?

Rajnikant Singh
Iowa State University (Research Assistant)

Download All
0 Kudos
Message 1 of 54
(4,962 Views)

Hi raj_iastate,

 

I have a few follow up questions for you. What hardware are you using? What are the DAQ devices that you are using? Are you using a PXI platform? How are you sharing a clock and start trigger between your devices?

 

Additionally, how tight of synchronization do you need for your application?

 

Leah

0 Kudos
Message 2 of 54
(4,889 Views)

Hmmm... Exactly what do you mean by "not consistant"? 

 

At first glance, your code looks really good.  That is excactly how I'd program it.  So I am confused what the problem is.

 

http://www.medicollector.com
0 Kudos
Message 3 of 54
(4,864 Views)

thanks for the reply!

 

DAQ device : PXIE - 1073 and two SCB connector blocks. My goal is to simultaneously acquire from two devices, which I did achieve, but my issue is that I am losing samples while acquiring, which if you would see in second pic. Meaning I am expecting an continuous sine wave ( which is the measurement of current passing through the magnetic material ) from one device and measured voltage ( returned from magnetic material showing barkhausen effect ) from other device. But I am getting some jumps and falls in both the readings. So I am confused what am I missing in my code.

 

 

 

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 4 of 54
(4,844 Views)

thanks for the reply!

 

DAQ device : PXIE - 1073 and two SCB connector blocks. My goal is to simultaneously acquire from two devices, which I did achieve, but my issue is that I am losing samples while acquiring, which if you would see in second pic. Meaning I am expecting an continuous sine wave ( which is the measurement of current passing through the magnetic material ) from one device and measured voltage ( returned from magnetic material showing barkhausen effect ) from other device. But I am getting some jumps and falls in both the readings. So I am confused what am I missing in my code.

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 5 of 54
(4,843 Views)

If you want a continuous waveform, why do you set the timing to finite samples? Your code does a single acquisition. I hope you're not using the run continuous button.

 

You also have not mentioned the frequency of the signal you are trying to capture. Is your sample rate high enough.

0 Kudos
Message 6 of 54
(4,833 Views)

When you say that your problem is that you are getting "some jumps and falls in both the readings" .... Do you mean that you expect the signal to be a smooth and perfect sine wave?

 

If so, then perhaps the problem is in your physical wiring.  Can you send a wiring diagram?  Perhaps you have a floating ground or something.

 

It looks like you are using the default "terminal configurations" for both input and output.  I don't know what kind of PXI DAQ card you are using (you only provided the chassis model number) so we don't know what terminal configuration is being used (it depends on the card).

http://www.medicollector.com
0 Kudos
Message 7 of 54
(4,818 Views)

in the front panel image ( attached with original post ) , the top graph shows the shows the sine wave I am passing through a resistor which should be smooth unchanging signal but when I run the program again and again it shows random jumps  which I am unable to understand. Also the bottom graph shows the voltage signal picked up by the sensor ( coil wrapped around magnetic core ), which also I should be consistent instead of showing random jumps in the signal. I am also attaching a circuit diagram of the setup, please take a look at it.  Can you tell me how to look at what kind of PXI DAQ card

I have  ? I am working at my university lab and I just started programming labview, sorry if my questions sound too dumb.

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 8 of 54
(4,795 Views)

OK.  Still a couple issues here:

1.  You mention how you are using two cards in a PXI chassis (Dev1 and Dev2).  But in the code you uploaded, you are using only one of cards (Dev1).  I am confused here.

 

2.  To determine which cards you are using, look at the front of your chassis.  You will see multiple cards in the slots.  Each card has a model number as seen below.  Upload a pic if you still can't figure it out.  Or look at Measurement and Automation Explorer (MAX).

Capture.PNG

 

3.  Sorry, but your circuit diagram is really confusing.  You should be showing exactly which pins are connected where.  Each line on your diagram should be one wire.  Your diagram looks more like a flow chart than a circuit schematic (see here).  I mention this because I am fairly ceratin that your poblem is related to the wiring and terminal configurations.  And not the software.  Also read this page about polarity and terminal configurations (see here).   

 

 

 

 

http://www.medicollector.com
0 Kudos
Message 9 of 54
(4,786 Views)

Sorry.  Ignore Bullet #1 above.  You do properly specify Dev1 and Dev2.  But I am still thinking your problem is related to grounding and terminal configs.

http://www.medicollector.com
0 Kudos
Message 10 of 54
(4,784 Views)