Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-6552 intermittently fails when external sampling clock is changed

I am using PXI-6552 HSDIO and a PXI-5404 (Signal generator) in PXI-1036 chassis with LabView 8.0.
To use fractural sampling frequency (e.g. 88.1MHz), I use external sampling clock that is generated by 5404 in slot 2 and given through PXI STAR lines to 6552.

It works fine when I use fixed sampling frequency,  But when I start changing it, 6552 sometimes failed to work (>1%).
I got Hardware clocking error. (Error -1074115898 occurred at niHSDIO Initiate.vi)
In my program, Frequency change and niHSDIO Initiate are in While Loop.
Using CLKIN port did not solve this problem.  But I do not see this problem when I use on-board clock.
The sampling frequency where such failure occur are in certain ranges, for example, around 55MHz and 95MHz.
I have another 6552 in different slot which also fails similarly but at  slightly different frequencies.
I tried to put Time Delay here and there but it did not help me.
Does anybody have idea how can I solve it?
 
HSDIO version is 1.4.2.4.
 
0 Kudos
Message 1 of 9
(4,893 Views)

Hi Flieger,

I'm guessing that the problem you are seeing here is that you are setting the HSDIO to work initially with a sample clock frequency equal to the initial clock frequency of the 5404 (88.1 MHz) you are then generating continuously from the HSDIO and changing the 5404 clock rate over time. The HSDIO then phase locks it's internal OCXO to this external clock to run the board. If the external clock frequency changes and goes outside of the lock range of the PLL the driver will throw an error which is what you are seeing. You will need to re-program the HSDIO sample rate to match the new clock rate as you change the clock from the 5404, although you can use the lock range so that you don't need to continuously change the HSDIO.

Hope this helps,

Nick

0 Kudos
Message 2 of 9
(4,893 Views)
Hi Nick,
 
Thank you for your suggestion.
However I have already used Configure Sample Clock in my program to set new sampling frequency.
 
I added niFgen Abort Generation before setting new frequency to 5404 to allow HSDIO to leave locked frequency bit earlier but situation did not change.
Download All
0 Kudos
Message 3 of 9
(4,885 Views)
Hi Flieger,
 
I have written a little test vi to try and replicate your issue using a 5404 and 6552 in a 1042 chassis. I am changing the clock frequency between 100 MHz and 1 MHz in 1 MHz steps continuously looping around. Within my loop I have the same code as you in your screen shot except I am not using a wait. I am trapping any errors from either the fgen or hsdio on all iterations. So far I have run this vi for over 200k loops and have not seen an error. Is it possible for you to post your vi here and I will happily look at it for you.
 
Nick
0 Kudos
Message 4 of 9
(4,874 Views)
Hi Flieger,

Nick is correct.  When you call HSDIO Initiate, the NI-HSDIO driver will setup the on board DLL's to work properly at the frequency you input using the Configure Sample Clock VI.  Once the DLL's locked, there is a small range over which the frequency may drift but it is not guaranteed and may not be deterministic.  Instead, to guarantee that the clocking will work, every time you change the frequency of the input clock, you should stop the generation, change the frequency using the Configure Sample Clock VI, and reinitiate the task.  In this fashion, the driver will attempt to relock the clocks to the frequency source.

Thanks, Ryan
0 Kudos
Message 5 of 9
(4,861 Views)

I created VI to reproduce this problem.
Three frequency changing method were tried.  Sequencial, random and hopping two predefined frequencies.
Here is the result In my case.

  • Sequencial: Almost no error, but not error free.
  • Random: about 1%
  • Hopping two freq.:  20-25%
0 Kudos
Message 6 of 9
(4,841 Views)

Hi Flieger,

I have run this vi on my system and can confirm that I see the same error that you describe. I have tried quite a number of different things to try and resolve the issue with no luck. Some of the things reduce the error rate but nothing so far has fixed the issue. I think this is something that requires your local NI branch to investigate further and maybe to escalate the issue to NI R&D. Sorry I can't be any more help but this seems to be something a bit more fundamental than can be fixed by different programming methods.

Nick

0 Kudos
Message 7 of 9
(4,829 Views)

Hi Nick,

it seems that this needs help from NI.   I will make a contact with them.
I appreciate your taking time to investigate my problem.

Thank you.

0 Kudos
Message 8 of 9
(4,769 Views)
Hi

A work-around for this problem was shown by NI team.

Set the frequency twice to 6552.

First niHSDIO Commit.vi throughs an error as we saw before.
Dump it away and set the same frequency again.
The following Commit or Initiate works without an error.

I hope this would help someone who has the same problem.

Have a good day!
0 Kudos
Message 9 of 9
(4,636 Views)