Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

niDMM_ConfigureMeasCompleteDest

Hi,

I am using a NI USB-4065 on Windows 8 with Visual C++. I am trying to set up a single acquisition triggered system, but the MC line doesn't seem to trigger after

a measurement. 

ViBoolean idQuery = VI_TRUE;
ViBoolean reset = VI_TRUE;
ViBoolean stop = VI_FALSE;
ViStatus status;
ViChar resourceName[256] = "Dev1";
ViInt32 measurementType = NIDMM_VAL_2_WIRE_RES;
ViReal64 powerlineFreq = NIDMM_VAL_50_HERTZ;
ViReal64 range = 100e3;
ViReal64 resolution = 3.5;
ViReal64 reading = 0.000;
ViInt32   ptsAvailable = 0;

ViChar errMsg[200];

status = niDMM_init(resourceName, idQuery, reset, &vi);
if (status < 0)
	return FALSE;
status = niDMM_ConfigurePowerLineFrequency(vi, powerlineFreq);
if (status < 0)
	return FALSE;
status = niDMM_ConfigureMeasurementDigits(vi, measurementType, range, resolution);
if (status < 0)
	return FALSE;

status = niDMM_ConfigureTrigger(vi, NIDMM_VAL_AUX_TRIG1, 0.0);
if (status < 0)
	return FALSE;
status = niDMM_ConfigureTriggerSlope(vi, NIDMM_VAL_POSITIVE);
if (status < 0)
	return FALSE;

status = niDMM_ConfigureMeasCompleteSlope(vi, NIDMM_VAL_NEGATIVE);
if (status < 0)
	return FALSE;

status = niDMM_Initiate(vi);
if (status < 0)
	return FALSE;

ptsAvailable = 0;

while (!stop)
{
	status = niDMM_Read(vi, NIDMM_VAL_TIME_LIMIT_AUTO, &reading);
	if (status == 0)
		AddReading(reading);
	else
	{
		niDMM_GetErrorMessage(vi, status, 200, errMsg);
	}
}

I am triggering using pin 3 of the AUX connector which triggers ok and I get a correct reading. I have added a 10k pull up to 5v on pin 6 (MC) line, but it never seems to go low.

Can anyone help?

Much appreciated.

 

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