Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Line Reserved

Hello Steven,


thank you for your reply.The information about the task state model was informative, but it didn't solve my problem.


I have 2 6229 cards in my setup. An example of what I want to do is create a task which sends out a waveform to an AO channel on Dev1. When the task is finished I abort and dispose it.

After that I want to create 2 tasks (1 dev1, and 1 on dev2), The first task uses the clocksignal of dev2 via rtsi. I accomplish this by calling:


DaqSystem.Local.ConnectTerminals(clockSource, rtsiClockChannel);


This is where I get the triggerline reserved exception.


I found out I can solve this by first calling:


DaqSystem.Local.DisconnectTerminals(terminal1, terminal2); // terminal1, terminal2 are string variables with channel names.


Now I have to keep track of terminal1, and terminal2.


My question was how to use DaqSystem.Local.DisconnectAll(var1, var2), because I can't find any documentation for it.


So I found out another solution, but I'm still qurious how/where I can find information on DaqMx methods. Is the DaqSystem.Local.DisconnectAll() method documented somewhere?




0 Kudos
Message 11 of 13
(1,075 Views)

The .NET help should be installed locally to your computer, you can find it by navigating to Start » All Programs » National Instruments » NI-DAQ » Text-Based Code Support

 

 

Here's a screenshot from the help for the particular method you were asking about:

 

        2010-12-06_125615.png

 

 

This particular method is actually only used on some of the switch modules that work under DAQmx and doesn't apply to your 6229.

 

 

My advice is to actually avoid using ConnectTerminals unless you absolutely need it.  This function is not tied to a specific task, so the connections will persist until you either explicitly unroute them (using DisconnectTerminals) or you reset the device (Device.Reset). 

 

I recommend directly setting the sample clock so the connection is tied to your task, and the resource will be unreserved along with the task.  Using Task.Timing.ConfigureSampleClock, you can set the clock source for the slave task (on Dev1) to be "/Dev2/ai/SampleClock".  If you have the RTSI cable configured in MAX, the driver will simply choose one of the available RTSI lines to use for the clock signal.  If you don't have the cable configured in MAX or if you want to explicitly send the clock signal to a specific RTSI line, you can export the clock signal from the master task using Task.ExportSignals, then specify to use that RTSI line as the sample clock source on the slave task.

 

 

Best Regards,

John Passiak
Message 12 of 13
(1,064 Views)

Ah, I didn't know it is possible to configure a triggerline from another device in a task. Great that the RTSI is than taken care of automatically! I will try this.

 

thank you,

 

Frank

0 Kudos
Message 13 of 13
(1,055 Views)