Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure routed PFI as output on PCIe-6536B using NIDAQmx C interface

Solved!
Go to solution

I have an NI PCIe-6536B, which I am interacting with using the NIDAQmx C API and NI MAX.

PFI5 takes input to the NI card. I want to route that signal to PFI1 and drive that signal out from the NI card. Whatever PFI5 reads, I want PFI1 to drive.

Now, when I call

 

DAQmxConnectTerms("/Dev1/PFI5", "/Dev1/PFI1", DAQmx_Val_DoNotInvertPolarity);

PFI1 still does not react to stimulus on PFI5.

 

 

I am guessing that I need to configure PFI1 as an output. How do I do that?

I tried creating and starting a digital output task for /port4/line1 which is apparently another name for PFI1. But when I then called DAQmxConnectTerms as above, I got:

 

Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
Source Device: Dev1
Source Terminal: PFI5
Destination Device: Dev1
Destination Terminal: PFI1

Required Resources in Use by
Task Name: task
Source Device: Dev1
Source Terminal: Software
Destination Device: Dev1
Destination Terminal: PFI1

Status Code: -89137

How do I configure PFI1 as an output?

 

0 Kudos
Message 1 of 2
(2,563 Views)
Solution
Accepted by topic author alexander.mollberg

I think I solved it on my own. PFI does not need to be configured as an output, it will become an output automatically, I guess when I run the DAQmxConnectTerms command.

 

The reason why I didn't get any stimulus out on it was because the physical pin was accidentally connected with another pin that was driving the same net. When I got rid of the conflict then I got signal out on PFI1 when PFI5 received signals as expected.

0 Kudos
Message 2 of 2
(2,530 Views)