Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

C# ConfigureWaveformAcquisition Measureing AC volts

Hello

 

I want to measure a AC voltage waveform with a 4070 multimeter.

Therfore i have written the following code :

 

 NationalInstruments.AnalogWaveform<double> analogWaveform;

 

DMMHandle.ConfigureWaveformAcquisition(DmmMeasurementFunction.WaveformVoltage,10.0,1000.0,4000);
 analogWaveform = DMMHandle.WaveformAcquisition.ReadWaveform(4000, NationalInstruments.PrecisionTimeSpan.MaxValue);

 

This works fine when i measure a DC signal, but not with a AC signal

I can only select DmmMeasurementFunction.WaveformVoltage  and DmmMeasurementFunction.WaveformCurrent. When i select AC volt i get an error.

So how can i execuut a AC WaveFormAcquisition ?

 

Thanks in advance

 

Tonnie

0 Kudos
Message 1 of 5
(6,009 Views)

Hello Tonnie,

 

I am not too familiar with C#. But I would refer to how this measurement is written in LabWindows CVI.

 

With the software you can find an example for DMM measure AC Volts.

 

This example utilizes functions:

niDMM_init                                                                
niDMM_ConfigureMeasurementDigits                                          
niDMM_ConfigureACBandwidth                                                
niDMM_Read                                                                
niDMM_Close

 

With these functions you are able to perform the complete measurement.

 

To avoid pasting the whole example code here I would suggest you could download LabWindows/CVI evaluation version and check out the example.

 

This link may also be helpful:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2jLCAQ&l=en-US

 

In the wrapper code example at the end it seems to have an example for configuring a measurement for the scope and for AC signal acquisition.

 

Good luck with finding the right solution!

 

Best regards,

Jarmo Levo

Applications engineer

National Instruments

 

0 Kudos
Message 2 of 5
(5,995 Views)

Tonnie,

 

What error are you receiving?

 

Posting the code used in the entire DMM session would also be helpful.

Tobias
Principal Software Engineer
Driver Software
National Instruments
0 Kudos
Message 3 of 5
(5,982 Views)

Waveform mode on NI DMMs only works in Voltage or Current mode.  Waveform mode allows the user to select the sampling rate directly up to 1.8 MS/s, essentially getting Oscilloscope-like behavior out of a DMM.   If you would like to look at the shape of an AC voltage signal, taking an acquisition with Waveform Voltage mode will allow you to see the AC signal.  If you would like to take an rms measurement of an AC signal you will need to configure the device for a .   Instead of using ConfigureWaveformAcquisition use ConfigureMeasurementDigits and program the device for AC Volts.  Similarly you will need to use sampleDmmSession.Measurement.Read(); rather than the ReadWaveform method you were using previously.   

Let me know if you run into any other trouble.

Regards,

Jared R.
Precision DC Product Support Engineer
National Instruments
0 Kudos
Message 4 of 5
(5,979 Views)

Hello

 

Reading a AC signal works now but the second point is starting a waveform Aqcuisition after a External trigger via the Aux input of the DMM.

 

Now this AC signal is fed to a rectifier and out of that rectifier comes a puls of 200VDC with a pulswidth 40 msec.

I have connected a TTL level trigger signal to the Aux input of the DMM. In other  measuremens i use this trigger signal also and the triggersignal works fine

Now i want to use this triggersignal also in a the following waveform measurement.

Within a timespan of max 10 seconds the DMM is trigger via the Aux input . After 10 seconds a error may occur

But when i run the code below the error comes after 2 seconds.

Errormessage:

ModularInstruments.NIDmm: The operation did not complete within the maximum time allowed. Timeout : 2000mS Error Code :-1074126845

 

How can i change the "max. time allowed"  that the DMM waits for a trigger to max. 10 seconds ?

Is this the right way of measureing the signal as i described ?

 

 

private NationalInstruments.AnalogWaveform<double> GetWaveForm ()
        {
            try
            {
                NationalInstruments.AnalogWaveform<double> analogWaveform;
                NIDmm DMMHandle = new NIDmm("PXI1Slot5", false, true);

                DMMHandle.ConfigureWaveformAcquisition(DmmMeasurementFunction.WaveformVoltage, 300.0, 100000.0, 500);
                DMMHandle.Trigger.Configure(DmmTriggerSource.External, NationalInstruments.PrecisionTimeSpan.FromSeconds(0.0));
                DMMHandle.Measurement.Initiate();
                analogWaveform = DMMHandle.WaveformAcquisition.ReadWaveform(1000, NationalInstruments.PrecisionTimeSpan.FromMilliseconds(10000));
                return analogWaveform;
            }
            catch (Exception)
            {
                throw;
            }
        }

 

When

0 Kudos
Message 5 of 5
(5,974 Views)