Discussion:
How to plot input voltage against output voltage on an XY chart
(too old to reply)
WHJIII
2008-07-25 21:10:07 UTC
Permalink
I have a PXI-6221 multifunction DAQ and want to output a DC voltage between -3V and + 3V to my DUT and read the output of the DUT which is also a DC voltage between -3V and +3V. To test this I have connected Ao0 to Ai0 and figure I should get a straight line on an XY chart.
 
This seems like it should be pretty simple but I cannot seem to get the XY graph to plot the data correctly. Can anyone help?
 
Walt Johnson
KLA-Tencor
(408)875-7958
Dennis Knutson
2008-07-25 22:10:10 UTC
Permalink
How is the plot 'incorrect'? You've explained how you've connected the hardware but you have not explained how you have written the program. At the very least, attach an image of your block diagram. Even better would be the actual VI. If you go to the block diagram and Context Help is turned on, when your mouse is over the XY Graph indicator, it will show you how to wire data to it. My guess is that you don't have an a correct x and y array.
WHJIII
2008-07-27 00:40:06 UTC
Permalink
I have attached the vi. I seem to be able to get the voltage displayed on the XY graph with the data type being correct but the timing is off so I need to get the read Voltage synced with the drive voltage. Since the output is wired directly to the input they should produce the same value.


Generate read and display Voltage.vi:
http://forums.ni.com/attachments/ni/250/41872/1/Generate read and display Voltage.vi
Dennis Knutson
2008-07-27 02:10:06 UTC
Permalink
You can look at the regular waveform graphs and tell that the timing is off. You are passing a waveform array from the signal generator. Some finite time later the analog output task starts and at some point in time It might be before or after the analog out task), the analog in task starts. You have no synchronization between the analog out starting and the analog in starting. You are also getting just the last acquisition out of your analog in task. I'm not sure what the final goal is since at this point you are wrapping the output back to the input but if you need synchronization, you can look at the shipping examples for this.
tsunami
2008-07-27 02:10:07 UTC
Permalink
WALT, I think I can help you with that.  Tomorrow I'll send you my VI.  The critical issue is you need to synch your input to output or your phase plot is USELESS.  I developed a pretty nifty VI that facilitates synchronization but it is a bit involved.
 
BTW: if you know anyone with intimate knowledge of DAQ buffer errors I could use some help.  I posted a problem today as well.
 
I'll be in touch, jeff ***@unl.edu
tsunami
2008-07-29 22:40:06 UTC
Permalink
Attached is the VI that synchronizes the incoming signal with an outgoing signal & generates a phase plot.  The VI is a bit involved because the user interface has to be interactive so both the WRITE & READ tasks stop if the user makes a change & retriggers once the change is completed.  The data is passed to the 3rd loop via QUEUING to ply the XY plot.  QUEUING is tricky because if either the WRITE or READ loops iterate at different rates then the QUEUE builds up & the computer will get bogged down so there are case structures to be sure the loops iterate in unison.  I also included a more basic VI that I used for practice in triggering signals & synchronization.  It does not construct a phase plot so no QUEUEING elements are involved & timing of loop iteration is not an issue.
 
GOOD LUCK


Integrated Servo Control rev5.vi:
http://forums.ni.com/attachments/ni/250/41955/1/Integrated Servo Control rev5.vi


Function Generator rev4.vi:
http://forums.ni.com/attachments/ni/250/41955/2/Function Generator rev4.vi
WHJIII
2008-07-29 23:10:11 UTC
Permalink
Thanks but it seems that I cannot run the vis under LabView 8.2. Are there any features that require an upgrade?
tsunami
2008-07-29 23:40:07 UTC
Permalink
WHOOPS, you do need this subVI called "WAVEFORM BUFFER GENERATION".  I did create those VI's in 8.2 so you should be OK


Waveform Buffer Generation.vi:
http://forums.ni.com/attachments/ni/250/41958/1/Waveform Buffer Generation.vi
WHJIII
2008-07-29 23:40:07 UTC
Permalink
I'm reinstalling the 8.21 upgrade as it did not show in the version screen. I'll let you know if that is it.
Loading...