Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

NI6602 Problem with connect terms between a counter internal output and its gate input

 

Hello,

 

I'm using a NI6602, nidaqmx on linux. In my application I'm using ctr0 to read from an encoder. In order to reset the position when I get a counter output pulse (due to overflow of the register (cross from 1...1 to 0)) I want to connect ctr0InternalOutput to Ctr0Gate. If I do it with a wire it just works perfectly.

But since the functionality is supposed to be there I want to avoid external wires.

 

ctr0InternalOutput is exported to RTSI0 (I have used it to count pulses with another counter (connecting RTSI0 as source) and it works).

I would expect that connecting RTSI0 to the counter gate with connectterms it would work but it does not.

PFI38 is Ctr0Gate in NI6602. As I mentioned above I have Ctr0InternalOutput already connected with ConnectTerms to RTSI0.

I make a DisconnectTerms of all those lines before starting connections.

 

DAQmxErrChk(nidaqmx.DAQmxConnectTerms("/Dev1/RTSI0", "/Dev1/Ctr0Gate", DAQmx_Val_DoNotInvertPolarity))#Software allows this but it does not work without cable.

DAQmxErrChk(nidaqmx.DAQmxConnectTerms("/Dev1/Ctr0InternalOutput", "/Dev1/Ctr0Gate", DAQmx_Val_DoNotInvertPolarity))#Hardware does not support it
DAQmxErrChk(nidaqmx.DAQmxConnectTerms("/Dev1/Ctr0InternalOutput", "/Dev1/PFI38", DAQmx_Val_DoNotInvertPolarity))#Hardware does not support it (2)
DAQmxErrChk(nidaqmx.DAQmxConnectTerms("/Dev1/RTSI0", "/Dev1/PFI38", DAQmx_Val_DoNotInvertPolarity))#Hardware does not support it (3)        

 

I also tried with Export signal, with the same (lack of) success,...

 

DAQmxErrChk(nidaqmx.DAQmxExportSignal(self.positionTask, DAQmx_Val_CounterOutputEvent, "/Dev1/PFI38"))#Hardware does not support it (4)
DAQmxErrChk(nidaqmx.DAQmxExportSignal(self.positionTask, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0Gate"))#Hardware does not support it (5)
DAQmxErrChk(nidaqmx.DAQmxExportSignal(self.positionTask, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0Gate"))#Hardware does not support it (5)

Thank you very much for your time

 

0 Kudos
Message 1 of 1
(5,413 Views)