12-18-2020 01:15 PM
Greetings:
I am new to LabWindows CVI.
I have a PCIe-6353 card connected to a BNC-2110
I have a device that creates pulses of a few usec in width. I would like to create a function in LabWindows CVI to wait until the pulse occurs and than continue once detected.
Any ideas on how to create task to do this?
Thanks.
12-21-2020 04:00 AM
Hello,
I believe this card is supported by niDAQmx. You should be able to find callback functions in the library to do what you want.
02-08-2021 06:07 PM
Greetings:
I was able to get started based upon the niDAQmx card and BNC 2110 connected the the card.
TaskHandle triggerMeasurement = 0;
#define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else
.
.
.
DAQmxClearTask(triggerMeasurement);
DAQmxErrChk(DAQmxCreateTask("",&triggerMeasurement));
DAQmxErrChk (DAQmxCreateDIChan(triggerMeasurement,"/Dev2/Port1/Line1","",DAQmx_Val_ChanForAllLines));
DAQmxErrChk(DAQmxCfgDigEdgeStartTrig(triggerMeasurement, "/Dev2/PFI1", DAQmx_Val_Rising));
What function can I call to know when the trigger has been detected?
Thanks.
02-10-2021 03:16 AM - edited 02-10-2021 03:18 AM
You could try examining change detection events in DAQmx: this paradigma triggers a function when a digital input changes its state.
Look into the examples that are installed in your system: you should find a useful sample in <CVIsamplesFldr>\DAQmx\Events\Signal\Change Detection\Read Dig Chan-Change Detection Event . You can also search for it in the examples finder (Help >> Find Examples... menu function inside CVI IDE: browse the tree to Hardware Input and Output/DAQmx/Digital Measurements)