Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I trigger Analog Output and Digital Outout Tasks Starts off of a Counter Start?

Solved!
Go to solution

Hi,

 

I am trying to sychronize the start of an analog output task, a digital output task and a counter task. I want the counter's start to serve as the master trigger and the analog and digital tasks to sync to its start. 

 

I am assuming I need something like:

 

analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("???", DigitalEdgeStartTriggerEdge.Rising);

digitalOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("???", DigitalEdgeStartTriggerEdge.Rising);

 

analogOutputTask.Start(); // slave 1

digitalOutputTask.Start(); // slave 2

counterTask.Start();n // master

 

Where ??? is a string specifying the counter task's start trigger source. However, I cannot seem to find what this string is. Any suggestions?

 

Thanks!

 

-Jon

 

 

0 Kudos
Message 1 of 3
(3,730 Views)

Hi Jon,

 

I believe that the string that you are looking for is going to be something like this:

 

/Dev1/ci/StartTrigger

 

Instead of using Dev1, you should use the actual alias name of your device in the Measurement and Automation Explorer. 

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.
0 Kudos
Message 2 of 3
(3,695 Views)
Solution
Accepted by topic author neuronerd

Just, FYI, the solution to this problem as well as some other ones is encapsulated in a short .NET example I created. It is located on the NI website:

 

http://decibel.ni.com/content/docs/DOC-15500

 

This project shows how to synchronize all your analog/digital outputs across tasks and boards in terms of start timing and clock synchronization.

 

-Jon

0 Kudos
Message 3 of 3
(3,562 Views)