High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

PXIe-5170r - Data Clock

Solved!
Go to solution

PXIe-5170r - Data Clock

Hello,

 

I want to get data from a 5170R (4 channels at once). My project is to get the received data (reading the inputs), send them to the host program through DMA channels. Once the DMA channel is full, I stop the the acquisition and  the host writes the data in a human readable format into a file such as: (so it can be easily used by another software)

 

channel1(t=0) channel2(t=0) channel3(t=0) channel4(t=0)
channel1(t=1) channel2(t=1) channel3(t=1) channel4(t=1)
channel1(t=2) channel2(t=2) channel3(t=2) channel4(t=2)
channel1(t=3) channel2(t=3) channel3(t=3) channel4(t=3)

(However, I am still trying to read the inputs for now.)

My problem for now is the 5170R configuration. (I tried to look at example codes, but I did not found my answer)

I used the "Data Clock" clock domain, but after compiling, I have an error as it expects an external clock (I want to use the onboard one).

I found this page which describes the clocking system:

http://zone.ni.com/reference/en-XX/help/374500C-01/oscopedevices/5170_5171_clocking/

But I don't know how to configure the nodes that are described on the page: (especially open session)

http://zone.ni.com/reference/en-XX/help/374500C-01/oscopes/idl_config_overview/

 

I would be glad if someone could help me on this problem.

Thank you

 

 

Here are my FPGA program:

lv.PNGFPGA

And here is my host:lv2.PNGHost

 

0 Kudos
Message 1 of 5
(1,078 Views)
Solution
Accepted by topic author Drinausaur
06-05-2018 09:20 PM

Re: PXIe-5170r - Data Clock

Hello,

 

Your code is missing some Instruction Framework and FIFO Register Bus code that is necessary for device configuration.

highly recommend that you start writing your application using one of our Oscilloscope Sample Projects as a starting point.

In LabVIEW, go to File->Create Project.  Then, you should see "Oscilloscopes" as a category on the left.  I suggest that you start with the Stream To Host example.  Run the example and you should see some data from your device.  Then, simply modify the host code to store the data into the format you need.

0 Kudos
Message 2 of 5
(1,054 Views)

Re: PXIe-5170r - Data Clock

Thank you for your answer.

I modified the example code to get my data in the desired format. However, there is still a (small ?) issue:

When reading the output file, the signal are not synchronized (I checked the signals with a regular oscilloscope and they are synchronized) .Maybe all channels do not start to acquire the data simultaneously ?

Do you know a solution to this problem ?  (I attached my .vi file and the output file)

Here is the result I get when I plot the file using an external script:

5170.jpgThe orange, blue and green signals should be synchronized

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

Re: PXIe-5170r - Data Clock

Hi, 

 

Could you let me know what project you modified? Also, in your code I see you're using the Fetch Binary 16 bit function. I was wondering why you chose that one over the regular fetch function. With the regular fetch function, you can fetch from all channels with 1 VI. That seems to be a better fit for what you're trying to do.

 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(1,014 Views)

Re: PXIe-5170r - Data Clock

I simply did not know that function. It is indeed more convenient to use the fetch function you mentioned.

 

I modified the example that is located here:

Hardware Input and Output >> Modular Instruments >> NI-SCOPE (High speed Digitizers) >> Continuous acquisition >> niScope EX Stream to disk 

However, I now face a new problem which is acquisition speed. I need to sample my signals at 40 MHz minimum. However, the computer (PXIe-8840) is not fast enough when writing into / reading from the queue. Therefore, after a period of time, the application fails, and I can have my file. However, I do not have enough points (it crashes too early).

Thus, I tried to make some changes to my program:

  • I write the binary data in my file (The human readable format was too slow)
  • I scaled my data down from int16 to int8
  • I disabled every dynamic displays

Do you know any way to speed up the process/collect more data (before failure) ? Like if I can increase the size of the queue, increase the amount of memory Labview can use on my PC, or even processing time ?

 

A strange thing is the fact that if I increase the number of points to fetch, I can get more data before it fails, but if this number is too high, it will be shuffled (Or some parts are missing, I do not know). For example, below is the result I get when using a number too high. The input signal was a triangle signal (I checked and the problem lies within the file I get from the program).

Do you know what is happening ?

shuffled data.jpg

I attached my program.

 

Thank You!

0 Kudos
Message 5 of 5
(991 Views)