LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital waveform write to DAQ

Hi,

 

I should write a Digital waveform to DAQ. It has 4200 lines ( number of samples ) but each line contains 16 elements . Below you can see example of 1st 20 lines and elements. DAQ sampling rate is 10Mhz and number of samples is 4200. So I thought it will take about 4200/10M (s) to write to DAQ however it takes about 10ms to write data. Could you please let me know why it takes that amount of time and also how can I make the write faster?

How about if I convert it boolean array and then write to DAQ?

 

Thanks 

 

0 Kudos
Message 1 of 17
(3,372 Views)
Nothing is attached.
0 Kudos
Message 2 of 17
(3,358 Views)

Sorry attached is the sample digital waveform for first 20 lines. I also use PXIe 6368

0 Kudos
Message 3 of 17
(3,347 Views)

How are you timing your data acquisition?

 

It would help to see your code

0 Kudos
Message 4 of 17
(3,342 Views)

This is the VI

 

I write a 4200 ( each line 16 elemnts ( number of DAQ lines ) line digital waveform to 16 DAQ line, port0 to port 16

usually it should takes less than 1s to write the data but when I measure the time it takes about 10ms

Is theer anyway that I can amke it faster

 

 

0 Kudos
Message 5 of 17
(3,319 Views)

Hi tintin_99,

I work for National Instruments and I had a look at your question. I would like to have some clarification ona few points:
1. What is the method that you are using to measure the time it takes to write data?
2. How exactly is your digital waveform being generated?
3. What is the output behaviour you are expecting?

I just need to better understand what is it that you are trying to achieve, so I can atleast simulate your setup.
Hope to hear from you soon.




Applications Engineer
National Instruments UK & Ireland

0 Kudos
Message 6 of 17
(3,286 Views)

Hi Marius

 

Thank you for your help

 

1. I add 2 Get Time/Data in Seconds VI before and after the SubVI then subtract 2 numbers to see what was the time difference and I measure 10s for 4200 number of samples at 10MHz

2. There is a realy complicated logioc behind that but finally it is a digital waveform with 4200 rows and 16 columns to write data to 16 DAQ lines 

3. DAQ lines flush this digital waveform to a FPGA . Everyuthing is working properly I just would like to make the communication faster. 

 

I really don't know why it takes 10s to write this data. I have 4200 samples @10MHz so the data shoudl be written in a fraction of 1ms. I even tried to move the DAQ create and DAQ timing VIs out of the SubVI and then just pass the task using a global variable but I still see it takes 7ms to write the data 

0 Kudos
Message 7 of 17
(3,258 Views)

Any help is really apprecaited

0 Kudos
Message 8 of 17
(3,229 Views)

Hi tintin,

I apologise for not being able to respond yesterday, but I got busy around the end of my shift. 
Had a playaround with the code on my machine. The writing function itself takes around 2ms and the set up another 1ms by using the same benchmarking method with a Flat Sequence and two Get Date/Time functions. Although I did run it on a Windows machine, which has low determinism due to all of the other processes running in the background.

My suggestion would be to try and run your code on the card itself as a Real-Time target and to use a timed loop to ensure a deterministic execution at the desired rate. 
Something like this

I am affraid that is the best answer I can give you. I hope this helps.

Applications Engineer
National Instruments UK & Ireland

0 Kudos
Message 9 of 17
(3,191 Views)

Also, had another look for improving the data transfer and you could try using DMA as a means of improving the write speed to the FPGA you mentioned.

Applications Engineer
National Instruments UK & Ireland

0 Kudos
Message 10 of 17
(3,181 Views)