LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zero crossing, "Triggering" and XY-Graphs

I'm trying to measure the electrical hysteresis of a sample.  The way in which I do this is by measuring two voltages within a circuit, sending them to my DAQ, and then plotting them in an XY-Graph to view the shape of the curve.  I can somewhat see the hysteresis, but II need to measure the "zero-crossings"; that is to say, the value of one function, when the other is 0, and vice versa.  So when V1 = 0, I want to know what V2 is, and when V2 = 0, I want to know what V1 is.  Seems simple enough, and I have included my VI.

 

First I tried the ZeroCrossingPtbyPt, along witha Relay, which never seemed to trigger properly.

 

Second, I tried using Trigger and Gate, but that seems to give inflated values.

 

This VI can be tested by removing the DAQ assitant and replacing it with two "Generate Signal"(s),  with the same frequency, different amplitudes, and a small phase difference, and this will produce a similar effect without the real signals.

 

Next, I am sending the raw voltage signals into a Waveform Graph.  However, it is impossible to get the traces to stay "still" on the graph.  In other words, if this were a real oscilloscope, there would be a "triggering" problem, and if the trigger were set to the proper value, the oscilloscope would be able to track the waveform without it jittering left to right in time.  Any ideas on this?  I've tried to change just about everything in the Waveform Graph with no difference.  Do I need to send in some other signal to get the graph to follow the waveform properly?  This is really important because it will tell me if my sample rate is good enough to capture the signal (a sine wave at 1 kHz).

 

 Finally, the hysteresis curve on the XY Graph seems to cover many cycles (periods) of the waveform, but I want it to cover only 1 cycle at a time, so it isn't so sketchy-looking.  It's very boxy as well.  So in short, the number of points it is plotting is fine, but it is not plotting them quickly enough, since I'd like all of the points it plots to be over a single period of the waveform.

 

Please help!  Thanks in advance.

 

0 Kudos
Message 1 of 4
(3,467 Views)

What you you mean Trigger and Gate gives inflated values?

 

I tried your suggestion of two generate signals and everything looked normal. What are you expecting to see?

Vince M
Applications Engineer
0 Kudos
Message 2 of 4
(3,426 Views)
I measure values that are higher than what I see using the XY graph.  For E-Field, I measure that P crosses 0 when E is over 300, when according to my XY graph, it's barely more than 100.  For P-Field, I measure that E crosses 0 when P is 4, but the XY graph shows it happening closer to 2.
0 Kudos
Message 3 of 4
(3,423 Views)

As it turns out, the issue was that I was not collecting enough samples at a high enough sample rate from the DAQ.  This is why it worked with "Generate Signals" and did not work with the DAQ Assistant.  Because there were not enough samples, the apparent zero crossing was occuring either too early or too late, leading to an incorrect value.  Therefore, the best solution when it comes to finding zero crossings is make sure your # of samples, and sample rate are high enough to get an accurate measurement.

 

As a result, this is why my XY Graph was showing blocky hysteresis loops, rather than nice smooth curve hysteresis loops.  The data being sent to it was not quick enough, and therefore the XY- Graph connected the dots between the points that it was sent, yielding a truncated loop, which appeared blocky or sketchy.

 

On the issue of triggering, this can apparently be set within the DAQ Assistant in the "Triggering" tab; the key is chosing the correct channel to trigger from, and a reasonable trigger level.  This was my problem, and this is why my Graph appeared to jitter.  It was not the graph itself, but the DAQ Assistant that did not tell it the proper triggering timing.

 

So, in short, I solved my own problems, but I leave this as a record for those who encounter similar problems in the future.

 

Thanks.

0 Kudos
Message 4 of 4
(3,379 Views)