Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Using External Trigger NI 5782, 7972R

Hello,

 

I'm trying to use the TRIG channel of my Adapter Module to trigger the data aquisition for some duration t. How can I implement this in a SCTL, because apparently I can't stop a SCTL loop?

 

Thanks a lot

0 Kudos
Message 1 of 5
(3,048 Views)

I would appreciate any help from you guys!

0 Kudos
Message 2 of 5
(3,033 Views)

I'm trying to use the TRIG channel of my Adapter Module to trigger the data aquisition for some duration

You evaluate the trigger input every cycle to see if the trigger condition has been met. 

 

On the 5782 example, open the Ai Trigger Type control and modify the type def to include a trigger_input value then modify the case structure to include a case for it. Then drop the 'Trigger Input' from the 5782 clip input the analog input loop and wire it up to the case structure you modified. Now your stream control will gate the start of its acquisitions until it sees a High value on the trigger input. 

trigger_input.JPG

 

 


 


How can I implement this in a SCTL, because apparently I can't stop a SCTL loop?

Its a high throughput fpga device, you don't want those loops to ever stop. You evaluate the status of a signal each cycle. See the chapter "High-Performance Programming With the Single-Cycle Timed Loop" in the LabVIEW High-Performance FPGA Developer's Guide for more information.

LabVIEW High-Performance FPGA Developer's Guide: https://www.ni.com/en/support/documentation/supplemental/13/the-ni-labview-high-performance-fpga-dev...

0 Kudos
Message 3 of 5
(3,005 Views)

Hey David-A, thank you for the reponses in both my posts. So since my first post I already achieved some stuff.

 

grafik.png

Whenever my trigger is true, there will be some data aquisition. Also after it goes from true to false the loop counter goes to zero and as long as it is smaller than the time I want to aquire data (in ticks - 4 or 8ns for one tick) the data aquisition case is still on true.

 

0 Kudos
Message 4 of 5
(2,995 Views)

Get ride of the big case structure. Its not a good idea to put controls, indicators, and io nodes inside of a case structure inside a single cycle timed loop. When that case is not selected those items become disabled and can do unexpected things when other parts of your design try to interact with them while they are disabled.

 

Instead, connect the output of the OR primitive to the 'data valid' of the Data Stream Control.vi.

0 Kudos
Message 5 of 5
(2,973 Views)