Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter to RTSI / NI6143

Solved!
Go to solution

Hi there,

 

i want to connect the physical channel cnt0 to the rtsi port0. I tried to edit one of the examples by using the function DAQmxConnectTerms but just the error -89137 appeared:

 

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

Required Resources in Use by
Source Device: Dev1
Source Terminal: Ctr1InternalOutput
Destination Device: Dev1
Destination Terminal: Ctr0Source

Status Code: -89137

 

 

I need to use the signal on rtsi0 with another pci-card which is compatible to TTL. Is this generally possible?

 

Here is the essential Sourcecode:

//ErrChk is just the normal error-check-function 


 ErrChk (DAQmxCreateTask("",&taskHandle));
 ErrChk (DAQmxCreateCOPulseChanFreq(taskHandle,"Dev1/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0.0,1.00,0.50));
 ErrChk (DAQmxCfgImplicitTiming(taskHandle,DAQmx_Val_ContSamps,1000));

 ErrChk (DAQmxRegisterDoneEvent(taskHandle,0,DoneCallback,NULL));

 

 ErrChk (DAQmxConnectTerms ("/Dev1/Ctr0Source","/Dev1/RTSI0",DAQmx_Val_DoNotInvertPolarity));

 

//the error shows up at the function StartTask
 DAQmxErrChk (DAQmxStartTask(taskHandle));

 

 

How can i avoid this error?

Is the RTSI using its own protocol?

What are the switching-voltage-level of the RTSI-Bus?

 

Thank you,

Christian

0 Kudos
Message 1 of 10
(5,973 Views)

Hi Christian,

 

 

Did you check in MAX if this route is possible?

 

 

Christian

Message 2 of 10
(5,962 Views)

Hey Christian,

 

thanks for your fast response.

Yes i did check it. In fact there are two other sources to get a connection from ctr0 like Ctr0InternalOutput and Ctr0Gate. I tried both, none of them worked.

 

If there is another way to put a softwarecontrolable clock (range 1-200khz) on the rtsi-bus, please let me know.

 

Thanks in advance,

Christian

0 Kudos
Message 3 of 10
(5,958 Views)

Hi Christian,

 

So either you allready connected the RTSI0 line for another Task, Application or Terminal or DAQmx itself was using it for some signal rounting. The easiest way would be to disconnect the RTSI cable per software in MAX, and connect it again (under the RTSI Settings of the Device select None).

In case DAQmx is using it, you can reserve special RTSI Lines via the cable properties (in MAX too) so that DAQmx is not using it.

 

Another way would be to use "DAQmx Export Signal".

 

 

Christian

Message 4 of 10
(5,949 Views)

Hi Christian,

 

thanks again for you response. It seems to work after I removed the RTSIcable from the DAQmx devices and know I got to wait until the cable gets delivered to measure if the signal is really there.

 

Do you know something about the switching-voltage-levels? Is it TTL compatible?

 

Christian

0 Kudos
Message 5 of 10
(5,916 Views)
Hi,

What do you mean by "switching voltage level" ?

Christian
0 Kudos
Message 6 of 10
(5,914 Views)

Sorry for the inconvenience.

I mean the high- and low-level voltages of the signal which comes on the RTSI physical line

for an logical "0" or "1" if i would measure it with an oscilloscope.

 

Christian

0 Kudos
Message 7 of 10
(5,911 Views)
It should be TTL as far as I know.
0 Kudos
Message 8 of 10
(5,907 Views)

Thank you very much for your help.

 

Christian

 

0 Kudos
Message 9 of 10
(5,904 Views)
Solution
Accepted by topic author WND

Hi there,

 

here is the essential code i´m using now:

 

 

DAQmxErrChk (DAQmxConnectTerms("/Dev1/Ctr0InternalOutput","/Dev1/RTSI0",DAQmx_Val_DoNotInvertPolarity));

//Once you´ve executed this function the connection between CTR0 and RTSI0 stays and is saved global, but where?

//is there a way to see the connected Terms?

 


DAQmxErrChk (DAQmxDisconnectTerms("/Dev1/Ctr0InternalOutput","/Dev1/RTSI0"));

//this function disconnect them and before you´ve called this function it stays connected

 

 

 

I measured the high- and low-level voltages of the physical line:

 

high: 3.4V

low: about 0V

 

Result: It is TTL compatible  🙂

 

 

Kind Regards,

Christian

0 Kudos
Message 10 of 10
(5,888 Views)