Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Line Reserved

I'm trying to route a signal from a PXI-6251 PFI line to the Gate of a counter (PCI-6602) for pulse width and period measurements.  When I add in the connect terminals VI, I get error code -89126: Trigger line requested could not be reserved because it is already in use.  The documentation for the PXI-6602 says I can route directly from the RTSI bus to the gate of a counter.  I'm not sure why this conflict is happening.
 
Attached is a VI showing my setup and jpg of the error I'm seeing.  No error shows up until it hits the DAQmx Read VI. 
Download All
0 Kudos
Message 1 of 13
(6,484 Views)

SirMutt,

The recommended way of making your connection would be to allow the driver to automatically configure the route for you.  You can accomplish this by making the following changes to your code.

 

Also, I tested your original code with a PCI-6221 and a PCI-6602 and got it working after making the following change.

You were previously trying to connect the RTSI0 Line from the 6251 to the CTR Gate on the 6602, when in fact you should be connecting the RTSI0 Line from the 6602 to the CTR Gate on the 6602.  

 

Either way is an acceptable, but the first the recommended method.  Have a great weekend.

 

Ryan N



Message Edited by Ryan N. on 02-15-2008 03:19 PM
Ryan N
National Instruments
Application Engineer
ni.com/support
Download All
0 Kudos
Message 2 of 13
(6,464 Views)

I originally tried to go directly from the 6251 to the 6251 (which is actually a 6289 which is a loaner due to my 6251 being out for repairs) without specifying the RTSI line at all.  That didn't work.  I then went to my config with same error.  I also tried your config, same error.  There is never an error with the connect VIs, only when the measurement tries to get executed with the DAQMX VI.  seems like if the connection wasn't being made, the connection VI should flag a problem. 

So, the error persists even after the change you recommended.  Any other thoughts???

0 Kudos
Message 3 of 13
(6,448 Views)
oops, I meant to say from the 6251 to the 6602...
0 Kudos
Message 4 of 13
(6,447 Views)
Just wondering if there was ever a solution to this problem.  I am noticing the exact same behavior between a PCI 6602 and a PCI 6259 connected by a RTSI cable.
0 Kudos
Message 5 of 13
(6,213 Views)

joeonni,

This can be accomplished by using property nodes to tell DAQmx to use the RTSI0 as the counter source. 

I started by exporting an arbitrary signal out of my DAQ card and into my 6602 card.


In this case I exported my Analog Input Sample clock.

Next I modified the Count Digital Events.vi example to specify the input terminal of the counter to be RTSI0 (on the 6602).


I then ran my program and everything worked as expected.  Also, make sure the Counter(s) control is set to a specified counter.  I set mine to Dev6/ctr0.
 

NOTE: Since I exported my Analog Input Sample clock I had to have an Analog Input task running to start the clock.  In your case this can be any digital TTL signal. 

I hope this helps!



Message Edited by Ryan N. on 04-28-2008 06:57 PM
Ryan N
National Instruments
Application Engineer
ni.com/support
Download All
Message 6 of 13
(6,206 Views)
The solution was as described above.  I used a property terminal and called out my 6251 PFI line.  I didn't use any connect VIs at all, but rather told the counter to use the 6251 PFI directly.  I don't recall what the issue was that caused the connect and disconnect VIs not to work, but this solution fixed my problem so I didn't dwell on why something didn't work that should have.
0 Kudos
Message 7 of 13
(6,181 Views)
The property node worked for me also.  That's great, thanks for the quick responses!
0 Kudos
Message 8 of 13
(6,174 Views)

Hello,

 

I'm working with DaqMx in C# and I have exactly the same error. However, the problem occurs because in my program I change the terminals connections during execution of the software.

 

If I restart my computer it works fine, but this is not what I want to do every time I change connections 🙂 I found the following method:

 

   "DaqSystem.Local.DisconnectAll"

 

but I don't know what parameter string I must use. I can't find information in the helpfile, ni fora, or google. Can anyone post an example of how to call this method?

 

thank you in advance,

 

Frank

0 Kudos
Message 9 of 13
(4,479 Views)

Hi Frank,

 

Could you clarify a few things with your setup? Which cards are you exporting the signal to and from? When you say you are changing the terminal connections during the execution, are you running a DAQmx task? You need to abort the task to be able to change the routing. If myTask was your task, you would first stop your task using:

 

myTask.Control(TaskAction.Stop);

 

then abort it using:

 

myTask.Control(TaskAction.Abort);

 

At this point, do your configuration changes then start the task up again.

 

You can get more information about the Task State Model by going to:

Start » All Programs » NI-DAQmx Help » Key NI-DAQmx Concepts » Tasks » Task State Model

Steven K.
National Instruments
Software Engineer
0 Kudos
Message 10 of 13
(4,453 Views)