LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Loop Structure and NI-SYNC

Hello,

 

I'm playing around with the Timed Loop Structure. Is there a way to get it working with the NI-SYNC?

The goal would be to be able to get two Timed Loop synchronized by NI-SYNC and to start both loops also by an external HW-Trigger.

 

On the internet I only find some pages about doing this with DAQmx VIs.

 

greetings

Christian

0 Kudos
Message 1 of 7
(2,653 Views)

Just to understand further

 

What is the purpose of the two timed loop? What is the requirement of the time synchronization in your application?

 

0 Kudos
Message 2 of 7
(2,643 Views)

If possible the current idea would be:

to have two Timed Loop Structures which aquire data from two different devices simultaneously by a Software - or Hardware - Trigger.

one device is acquiring SlowControl, the other device is an RFSA.

 

more details:

- the acquiring methods must be seperated because for slow control every element must be read explicitly in contast to rfsa which gives you always whole frames which 2^N samples.

- we want to acquire the slow control at least once per frame but possible even more often and we want to set the moment of acquiring these information freely.

- these two data streams will be than saved in one file (TDMS).

- We are using two buffers (Queues) for those two datastreams.

- the buffer for Slow Control holds for every bufferelement six values

- the buffer for RFSA holds for every bufferelement a whole data_frame + some additional frame_information (timestamp, gain, etc.)

 

at this is moment it's  working perfectly but those two datastreams are not synchronized yet. For this it was planned to use NI-Sync and I'm looking for a way to do it. After what I've learned my idea was to use the TimedLoopStructure for both and get the synchronization.

 

I hope this makes it understandable. The whole plan is but quite complex.

 

 

 

0 Kudos
Message 3 of 7
(2,631 Views)

Hi Christain,

 

Thanks for your information.

 

My understandind from your description is that your application needs to synchronize data from two different devices (One is slower one and another is faster one)

 

I am not sure of any method to link NI-SYNC with Timed Loop. 

 

What I would suggest is to have a single external clock generator connected as an external clock input to the slower and faster device, if it has a provision.

 

Or connect the software or hardware trigger (Generated digital pulse using software) and connect the trigger output signal as an "Trigger Input" to both the devices, which intern has an onboard clock synchronized with this external trigger signal to start the acquisition.

 

If the external device's does not have either "External Clock Input" or Trigger Input provision, you will never be able to synchronize the data and at the best you can reduce the latency.

 

What is SlowControl and RFSA? Please share a sample code if you can?

0 Kudos
Message 4 of 7
(2,623 Views)

Hi,

in both cases there are NI ModInst.

RFSA

SlowControl

 

for RFSA I have a series of special VIs to configure it, initialize it and acquire data from it.

to get the slowcontrol data from Ni6602 i set up Ni DAQmx Tasks.

 

After sending StartSignal to RFSA I use FetchIQ to get everytime a Frame with the data with timestamps and other nice information.

To get the data from the tasks I use this VI.

 

this works quite fine, now I want to use Ni Sync to get a synchronized way to read data from the devices by those to Vis. I thought that I could maybe use the TimedLoop Structure to accomplish that but if this is not possible...

 

for the other points:

maybe I made the problem not completely clear. There are no external devies everything is an ModInst with a NI-Rack.

The single parts working already seperately. Now Im looking for a way to synchonize theam and integrate and Hardware Trigger which is obviously not easy at least I dont find an easy way or nobody can tell me one.

 

I could send you the whole programs but it's rather complex with differenc libs, classes etc. This program can actualy more than I've pointed out so far because those things are working and besides the current problem. I've give you the desciption of the FetchIQ Vi and Im sure you know the DAQmx Read. And as  I said the real problem is to get those things working in a synced way by using NI-Sync or another way.

0 Kudos
Message 5 of 7
(2,614 Views)

So you want to acquire synchronized data from NI RF and NI Counter Card. There are two options I am aware of.

 

  1. You can route the PXI Reference Clock (10MHz or 100MHz) as a reference clock to back plane and use them  as a reference clock to synchronize with the PLL (Phase Lock Loop) on the individual NI Modules clokc
  2. Use PXI Star Trigger to Start the Task in both the Card

http://www.ni.com/white-paper/13345/en/

http://www.ni.com/white-paper/3675/en/

 

These should help you understand the technology, having said I will check if I get some example program to help you.

0 Kudos
Message 6 of 7
(2,588 Views)

 

thank you very much, I'll have a  closer look to these papers.

I'm sorry for answering this late but I was busy.

For additional examples I'd be relly gratefull.

 

greetings

Christian

0 Kudos
Message 7 of 7
(2,523 Views)