12-26-2017 01:19 AM
12-27-2017 01:51 PM
Hi AlexandrB,
To ensure there wasn't a bad install or that the example wasn't corrupted, are you able to successfully compile and run the original, unmodified streaming example?
Also, to clarify, are you only seeing error -367000 when you have the additional SCTL "SimpleExample" included in your FPGA VI? Without that loop does everything else work or are you still seeing that error?
Additionally, do you see the same error message with something like a 40MHz clock wired to your SCTL in "SimpleExample"?
01-02-2018 11:17 AM
AlexandrB:
I'm not sure about the register timeout but there is one critical issue I see in this setup. The VST Tx and Rx run in loops timed with data clock (the 120MHz ADC/DAC clocks). I understand that you have the sample rate set on the host to 5MS/sec. There is code inside the NI provided VIs that will do a sample rate change from 5MS/sec to 120MS/sec based on what you have set in your host. So on paper all is correct. The issue is that I assume you are deriving your 5MHz clock from either the 40MHz or 100MHz clock. Those two clocks (Sample clock and whichever clock you used to derived the 5MHz) are not locked together. That means the 5MHz clock is not exactly 1/24th of the 120MHz clock. This will lead to FIFO overruns OR data underflows. If you want to generate data at exactly the correct referenced 5MHz you will have to do it in a data clock timed loop. Hopefully this explanation makes sense.
Andy
02-02-2018 03:15 AM - edited 02-02-2018 03:17 AM
shalumdawg:
Thank for the answer.
02-02-2018 03:50 AM
AndyBrown:
Thanks for answer.
You're right. I form my 5MHz by dividing from 40MHz. The frequency 5MHz of reading data is from 120 MHz.
The main purpose is to synchronize two cycles - write data in my SCTL and read the data in the Input/Outpot Loop cycle.
You mean that I have to add my code to the main Input/Outpot Loop, running at 120 MHz?
02-27-2018 07:56 AM
AlexandrB:
Sorry for the delay in response. I read in another post that you had it working, great! My concern was about the clocks not being exact. So yes to be 100% correct you will need to write your code in the 120MHz loop. I don't think you can derive a clock off of this120MHz data clock. I don't know a lot about your application but one option is to run your 5MHz loop a little faster (i.e. 6MHz or 8MHz). That would prevent overflows but then you would also have to add logic to handle underflows (clocks in which no data was present).
Andy