Hello,
I'm confused about setting up a trigger on the NI-6221. I have a very simple application. I want to capture digital waveforms on the receipt of a trigger.
I'm getting an error when trying to configure the trigger...
Specified property is not supported by the device or is not applicable to the task
Property: DAQmx_StartTrig_Type
Status Code: -200452
The manual clearly says that I should be able to set up and perform digital acquisition from a digital trigger, so I'm not sure why I'm getting that error.
Thanks for the help!
C++ Code is below:
if ((status = DAQmxCreateTask("", &rdTaskHandle)) != 0)
{
DAQmxGetExtendedErrorInfo(errBuff, 2048);
MessageBoxA(HVQCK::HVQCK_hDlg, errBuff, "DAQmx Error, Create Task",0);
return status;
}
sprintf_s(lines, "%s/port0/line1", HVQCK_DEV);
if ((status = DAQmxCreateDIChan(rdTaskHandle, lines, "", DAQmx_Val_ChanForAllLines)) != 0)
{
DAQmxGetExtendedErrorInfo(errBuff, 2048);
MessageBoxA(HVQCK::HVQCK_hDlg, errBuff, "DAQmx Error, Create DI Channel",0);
return status;
}
sprintf_s(clkTerminal, "%s/di/SampleClock", HVQCK_DEV);
if ((status = DAQmxCfgSampClkTiming(rdTaskHandle, clkTerminal, sampFreq, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, pts)) != 0)
{
DAQmxGetExtendedErrorInfo(errBuff, 2048);
MessageBoxA(HVQCK::HVQCK_hDlg, errBuff, "DAQmx Error, Burst HandShake", 0);
return status;
}
sprintf_s(trigTerminal, "%s/PFI1", HVQCK_DEV);
if ((status = DAQmxCfgDigEdgeStartTrig(rdTaskHandle, trigTerminal, DAQmx_Val_Falling)) != 0)
{
DAQmxGetExtendedErrorInfo(errBuff, 2048);
MessageBoxA(HVQCK::HVQCK_hDlg, errBuff, "DAQmx Error, Config Trigger", 0);
return status;
}