Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

200077 error when using DAQmxCfgDigEdgeStartTrig

Hello!

I am using a 6052E card with DAQmx.

When I add the DAQmxCfgDigEdgeStartTrig function to my code to start data collection on a start trigger, I get the error:

-200077
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Here is the code block that I am using this function in:

	char startTrigger[256]="Dev1/PFI0";
	int startEdge=0;//rising edge

	DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
	DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0, Dev1/ai1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
	DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandle, startTrigger, startEdge));
	DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,NULL,nFrequency,DAQmx_Val_Rising,DAQmx_Val_ContSamps, (m_nBufferSize*2)));
	
	DAQmxErrChk (DAQmxStartTask(taskHandle));

Any ideas what I may be doing wrong?

 

Thanks!

0 Kudos
Message 1 of 5
(4,543 Views)

Hi Senkyoshi,

 

Do you have any other configurartion for the task that you haven't displayed?

 

Also, can try adding a leading forward slash to your stratTrigger string: "/Dev1/PFI0"

 

 

Regards,

 

Kyle S.

Applications Engineer

National Instruments

http://www.ni.com/support

0 Kudos
Message 2 of 5
(4,528 Views)

Thanks for the reply ks30,

 

I do not have any other configuration for the task.

Also, adding a leading forward slash did not change the outcome. Still recieveing the same error.

 

-senkyoshi

0 Kudos
Message 3 of 5
(4,523 Views)

Hi Senkyoshi,

 

Can you set your startEdge value to DAQmx_Val_Rising instead of 0? 

 

I replicated your issue by doing the opposite so that should resolve it for you.

 

Kyle S.

Applications Engineer

National Instruments

http://www.ni.com/support

0 Kudos
Message 4 of 5
(4,494 Views)

So I found the answer to my problem.

I changed "Dev1/PFI0" for start trigger to just "PFI0".

Strange that this would solve the issue.

 

from:

char startTrigger[256]="Dev1/PFI0";

 to:

char startTrigger[256]="PFI0";

 

0 Kudos
Message 5 of 5
(4,414 Views)