Showing results for 
Search instead for 
Did you mean: 

6561 TClk Synchroization Problem

Go to solution

I’m looking for a solution to synchronize six 6561 digitizer cards.  The Data Acquisition system monitors 72 LVDS channels, each 6561 card monitors 12 LVDS lines, channels 0-11.


I want to run the VI for up to 1-hour, using Match Pattern (or similar) to create records for any rising edge events on any LVDS channel.  Not all digital lines will see a rising edge during the test, some channels may see 10,000 or more rising edge events, on average 4 channels will see rising edge events.  Sample Rate 2MHz, record length 1-point, I'm only interested in the arrival time of each pulse relative to t0 (TOA = Time-Of-Arrival).


At present I have a function generator and TTL-to-LVDS conversion chips supplying Card0-Channel0 and Card1-Channel0 with same pulse pattern, 250uS period(4kHz) and 1uS pulse width.


Main points:

All cards must have the same t0, niTClk Synchronize documentation suggests a tolerance of 200nS is achievable.

The VI must stop after a pre-defined test time, or on press of stop/abort button.

I’ve not configured any PXI lines outside of the posted VI.

The default values on the VI show what’s current happening, note that t0 is out by 574uS.


I’ve attached the VI “Multiple Record Acquisition - two 6561 Cards - Trig Match” it’s been saved as LV2009.


My data output format will be a list of events detailing the Time-of-Arrival from t0:


Channel-1 TOA 0.0000005

Channel-3 TOA 0.0000005

Channel-1 TOA 0.0001050

Channel-4 TOA 0.0001050

Channel-23 TOA 0.0000010

Channel-71 TOA 0.0000500  etc…  .etc….


Development System:

18-slot PXI-1045 chassis

NI PXI-8106 Duo 2.16Ghz Controller, 1 GB RAM

NI PXI-6561 LVDS DAQ 16Mb/ch (6-cards)

NI PXI-6123 16Ms DAQ device (9-cards)

LabVIEW 8.5.1 Full Dev System

NI-HSDIO 1.5.3

0 Kudos
Message 1 of 45

Hi bmann2000

So from all of the information that you have supplied what specifically are you looking for help with?

Which part of your program are you having issues with?



National Instruments UK & Ireland
0 Kudos
Message 2 of 45



I'm looking to synchronize the t0 of each card, I need to know the Time-of-Arrival of pulses from each channel relative to t0.  If you look at the attached VI you will see the recorded arrival time of all 8 pulses relative to t0 is out by 574uSecs i.e. Card0 verses Card1 for each pulse.  The pulses do actually arrive at the same time as they're both from the same source via identical cables.

0 Kudos
Message 3 of 45

Hi Brian,


I have been doing some research into the NI-TClk functions that you are using and looking into how you can get the most out of the capabilities. I have found a few documents that I believe may be useful.


Using NI-TClk to Synchronize Signal Generators - I realise this is aimed at dignal generators but the principle is the same. The section of this document that particularly interested me was the 'Synchronization Performance'.



National Instruments T-Clock Technology for Timing and Synchronization of Modular Instruments - Also another interesting article that discusses some aspects of synchronization of the NI-TClk function.


Reference Example for Calibration of TClk Synchronized HSDIO Devices - You may have already seen this and it looks as though you have built your code from it but if you haven't seen it, it may be of interest.


I would be interested to hear if these help.

Kind Regards

NIUK Application Engineer
0 Kudos
Message 4 of 45

For those without LabVIEW 2009, attached are images of my code, and of the NI shipped example.

0 Kudos
Message 5 of 45

Hello bmann2000,


It looks like you are following the example for Multi-Device Syncrhonization very closely.  Based on the code you have posted, I recognize that you have added additional code for Enqueueing data for future use, as well as the code that compares t0 from the different cards. For the moment, I am going to assume that this additional code should not have an effect on the start time of both HSDIO cards.


Within your code, however, there appears to be a  "niHSDIO Configure Trigger VI".  The screenshot below displays its settings:

Trigger of Multiple Record Acquisition - two 6561 Cards.png

You are setting up an Advanced Trigger for when a specific String pattern is Matched.


From your description in the above posts, I would expect that you would actually need to set this to 'Start'->'Pattern'->'String'.  This would set up a start trigger for both cards to create a Record of data when the Pattern is seen.  If you would like to create a Multi-Record system, where you subsequently keep pulling more records on to your PC, that is where an Advanced Trigger can be used.


Furthermore, I believe that NI-TClk can use the following as Synchronous Homogenous Triggers:

  • Start Trigger
  • Reference Trigger
  • Script Trigger
  • Pause Trigger

Please try to set the Trigger to a Start Trigger option and reply with the results.  Also, let me know if I have misunderstood how you are trying to use the Advanced Trigger, or your design process in trying to use this.


Best Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 6 of 45

Hi,  I think you understand what I'm trying to create.  72 channels monitored and we create a record anytime a rising edge event is detected.  It will be a multi-record acquisition as I'm expect 100,000+ edges in short bursts over a period of 30 minutes.  Ideally records would be streamed off the card to the PXI controller, but just filling the cards would be progress for now.


I tried changing the Trigger options to Start>Pattern>String, this resulted in an error, see 20110613-01 attached.

I then tried configuring a Trigger for only card0, this time the VI ran but did not function correctly, see 20110613-02.


After each VI executed, I set the results as Default, so you will see the result when you open each VI.

Also, to confirm my hardware set-up is correct with the function generator, I've also attached a acquisition in the time-domain.

0 Kudos
Message 7 of 45

Hello bmann2000,


The attached VIs were very helpful.  I have focussed mostly on the first VI with error code -250037.  In LabVIEW, I went to 'Help'->'Explain Error' to discover the full message.

Explain Error_2011-06-14_15-40-36.png


Because of that message I was delayed, seeing as I could not spot why NI-TClk thought that all the tasks were not commited to the hardware.  After having a closer look at the code in your For Loop, I have noticed that there is in fact no VI for committing the settings that are programmed down to the HSDIO card.  There are two VI's that can peform this task.  The most commonly used VI is "niHSDIO Initiate VI".  



It contains the lower level "niHSDIO Commit VI".  Using the Initiate VI should suffice, but if you would like to commit settings without starting the acquisition task, you could trying using "Commit".  This might be needed as your scale your application up to have more cards in For Loops.



I will try and modify the code for you and add the Initialize VI's in the correct position and then attach it.  I do not always have access to the physical HSDIO hardware to test this code, so I may post it untested in a few minutes.





George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 8 of 45

Hello bmann2000,


I have modified your code and attached it.  It now contains the nhHSDIO Initiate VI.  The change is also seen in the image below. Please let me know of the results.  I have not yet been able to test this on suitable hardware.


UKSupport_20110613-01 Multiple Record Acquisition - 2 Card - Producer Consumer T_2011-06-14_16-35-34.png



George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 9 of 45

Hi George,


No need to post VIs for small changes, the images are sometimes better being version independent.

I've edited the code twice, once to use the Initiate VI and again to use the Commit VI, both result in the same -250037 error.


initiate screen dump.jpg


commit screen dump.jpg


error -250037.jpg


The other obvious question arising from the -250037 error message........ have we correctly configured a "start trigger master session"?  Although I'm not convinced we necessarily want a master session as we're looking for triggers on all 72 channels.


Is there any documentation for the niHSDIO VIs beyond that included in the Context Help ?  i.e. How do we know when we've used all the correct VIs in the correct order?

0 Kudos
Message 10 of 45