Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Open collector and NI 9361

I have problem with open-collector measurement.
I use Windows 10, NI-DAQmx 19.6, Visual Studio 2013 C++, cDAQ-9178 and NI-9361.

The NI 9361 provides a 5 V pull-up, but it seems to be always zero.

 

DAQmxCreateTask("", &taskHandle);

int32 start = 0;

DAQmxCreateCICountEdgesChan(taskHandle, "Dev1/ctr0", "", DAQmx_Val_Rising, start , DAQmx_Val_CountUp);
DAQmxSetCICountEdgesTermCfg(taskHandle, "Dev1/ctr0", DAQmx_Val_RSE);
DAQmxSetCICountEdgesCountDirLogicLvlBehavior(taskHandle, "Dev1/ctr0", DAQmx_Val_LogicLevelPullUp);

printf("End of program, press Enter key to quit\n");
getchar();

DAQmxStopTask(taskHandle);
DAQmxClearTask(taskHandle);

 

While this sample is running and I measure counter 0 voltage between PFI0 (pin 9, DI+) and COM (pin 36), it is zero.
What is wrong ?

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

Did you find this code somewhere or did you write yourself?

You have the task created and settings set but there doesn't seem to be a command to start the task.

0 Kudos
Message 2 of 4
(1,739 Views)

Thank you for your response , before printf("End of program...") I have DAQmxStartTask(taskHandle);

(sorry, my mistake).

 

This is one of sample codes, which i have modified.

DAQmxGetCICountEdgesCountDirLogicLvlBehavior - function returns DAQmx_Val_LogicLevelPullUp, which is correct, but 5 V is missing.

 

Zardas

 

 

 

 

0 Kudos
Message 3 of 4
(1,732 Views)

What do you have the +5V wired to? Could you share your wiring diagram?

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