LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring voltage vs time

Hey All,

     I am LabVIEW newbie.  I am trying to record a piezoelectric linear motor with a laser infrometer.  It has an output of 0V - 10V.  I am using an Agilent 34401a to measure the voltage through GPIB and using a DAQmx to control the driver to the motor.  The idea is to sweep the drive frequency to the piezoelectric driver and record the velocity/load curve.  (But that is for a later, concerning getting COM input to record the frequency.)

     I need about a 1ms resolution to properly record the velocity.  I am having trouble graphing the voltage vs time of the output.  All I see currently is a "dot" that represents the position (voltage) of the motor.  It DOES move with respect to the motor position.

     I am using LabVIEW 2012 SP1 (Version 12.0.1F5).  Attached is my VI for controlling the system.

 

     Any help would be appreciated!  Please let me know if you require any additional information.

 

Sincerely,

Nicholas

 

0 Kudos
Message 1 of 14
(4,465 Views)

First, let's take a step back.  What device are you using for the DIO?  I ask because you can likely use the same device for your voltage measurements.  This would also gain you the ability to get waveform data types from DAQmx Read (the waveform data type includes time and sample rate).  And if your graph is purely for visual, change it to a chart.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 14
(4,443 Views)

Unfortunately, I am using the USB-6525 for my DAQmx which only accepts digital I/O.

 

Additionally, the graph is for a simple visual representation.  BUT it also need to be output as a CSV file for further processing.

 

-Nicholas

Message 3 of 14
(4,429 Views)

It is much more helpful to us if you attach an actual VI (or, if this is part of a Project, the Zip file that you get when you Compress the Folder that contains the Project) rather than a picture of the Block Diagram.  We can't probe or edit or test a "picture".

 

You have two parallel processing streams (good), the Acquisition stream and the Actuation Control stream.  There is no synchronization between the two -- indeed, I expect the Control stream to start "doing its thing" before the Acquisition main loop starts running.  Is this what you intend?  Note you can synchronize these by clever use of the Error Line (merge the two lines before entering the "Do simultaneously" parts of the two Streams, and use the common Error output to both Loops).

 

Bob Schor

Message 4 of 14
(4,409 Views)

Sorry about not incluvding a VI, I thought a picture would be more helpful, but BOTH is even more helpful! (LPM5 - Load Curve.VI)

 

I WOULD like synchronization between both the loops.  Something like:

     Start the measurement, wait 100ms, have the control loop signal a motion, wait 100ms for the motion to record (it only takes around 10ms to move), then signal in the other direction while the motion records, and stop the measurement after another 100ms when the motion is done taking place.

 

What is the way to do this without using the error streams?

 

Also,  I need to measure faster than the Agilent "read multiple points" allows.  I have read the example VI "Agilent 34401 Acquire and Chart - Triggered " about sending multiple triggers to the Agilent and reading data points very fast, but I have no easy way to graph them then.  The data output is an array of double but I have no way to corrolate that with the time the data point was taken at.  Any ideas on this issue? (Picture and VI attached "LPM5 - Load Curve - Triggered Attempt.vi")

0 Kudos
Message 5 of 14
(4,400 Views)

I'm sorry, I didn't look more carefully at your hardware that you are trying to interface with LabVIEW.  You seem to be having issues with the Agilent multimeter and LabVIEW -- might I suggest that you investigate purchasing something like the NI USB-6002 (much less expensive than the Agilent, interfaces via USB with LabVIEW, 16-bit A/D.  This also has Digital I/O, so it might be able to do both your tasks.

 

More important, it can operate in Continuous multi-sampling mode, meaning that it can take continuous samples of 4 differential samples at 1KHz (actually, even higher) and stream it into LabVIEW without missing a point for as long as you like.

 

The A/D converter in the 6002 is 16-bits, which is not the 6-1/2 digits of precision of the Agilent.

 

Bob Schor 

Message 6 of 14
(4,379 Views)

Double click on the Build X-Y graph and make sure you do not have "Clear Data on Each Call" checked.

CLA
0 Kudos
Message 7 of 14
(4,372 Views)

The real problem with the XY Graph is the OP is using the same X value for all samples, the clock value before starting the loop.  What needs done is getting the actual time the samples were taken.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 14
(4,369 Views)

Would you recommend getting them from DAQmx by changing to waveform retrieval?

CLA
0 Kudos
Message 9 of 14
(4,364 Views)

That is exactly what two of us recommended.  But if stuck with the DMM, then the best we could do is read a sample at a time and use the time when the command was sent out.  Not exact or fast, but might just do the job.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 14
(4,361 Views)