01-08-2014 04:41 PM
No, I should send 2 samples because there is a strobe function that works on the falling edge of P0.30.
Let's say I want to send the data I posted in the previous post all at once or Line by line ( line 0 to line 7). Could you please let me know how can I send it to DAQ. I have also attached my vi in the previous posts
Thanks
01-08-2014 05:03 PM
01-09-2014 12:26 AM
I think you misunerstood me when I was saying line by line
Let me describe it better. by line I mean I want to send this line of binary data to DAQ lines
P0.16 P0.17 P0.18 P0.19 P0.20 P0.21 P0.22 P0.23 P0.24 P0.25 P0.26 P0.27 P0.29 P0.30 P0.31
Line 0 00 00 00 00 00 00 00 00 00 00 00 00 00 11 10
After sending this line I would like to send the second line which is
Line1 11 00 00 00 00 00 00 00 00 00 00 00 00 11 10
and finally Line 7 11 11 11 00 11 00 00 00 00 00 00 00 00 11 10
The red color bit will update the FPGA
Now 1 option is send the data line by line to DAQ lines and the other option is to write the whole data all at once and see of it is working, Using the VI I posted before I can send the data line by line and it is working. The sampling rate is 10 MS/s and I would like to write the data in us time ( 1 us) . However,using that implemnetaion it takes about 10ms to send the whole package.
Now could you please help me to implement it in better and correct way ( both line by line and all at once)? How should I config the write DAQmx? should it be N channel N sample or 1 channel N sample? I tried to play with the shipped example ( as you pointed ) but it is not working
01-09-2014 08:36 AM
You still make no sense to me. The first line - presumably a single write, has a value of 11 for a single digital line (P0.30) and 10 for a different single digital line (P0.31). Your definition of 'line' is incorrect. Those values would be 2 DAQmx Writes. Please use a normal definition. Use your engineering notebook (or quad ruled paper) and define the logic state of each pin for a single update to the DAQ card. Then each row of your data can be easily understood.
01-09-2014 01:27 PM
Ok I can write everything all at once , and hardware wise it is working properly but it is still takes about 8ms to write the data. My sampling rate is 10MHz and I am using NI PXIe 6368, number of samples is also 16 so I expect to write everything in fraction in uS time not 8ms. I would greatly apprecaite if you coudl take a look at my code. I really don't understand why it is so slow
Thanks
01-09-2014 01:36 PM
How are you calculating that time? Is it for the entire VI to execute or just the DAQmx Write? The entire VI includes creating/configurating the task and then a stop and clear. These functions are time consuming and I believe you have already been told that.
01-09-2014 01:47 PM
This code will switch a MUX through FPGA. The switching time should be in us ( max 10 us) . The same code has been implemented in c# and it works properly and can switch this mux 10 times in 10 us with the same ampling rate (10 MHz)
Do you mean it is limitaion of LabVIEW in comparison with c#?
How can I make it faster? which one of the DAQ functions takes more time to execute?
Thanks,
01-09-2014 01:57 PM
You still have not answered my questions. If you take a scope and measure the actual burst of digital I/O as opposed to the execution time of the entire VI, what time do you measure? My guess it's going to be exactly what you expect. As long as this time is correct, do you care about the setup and shutdown time of the DAQmx functions?
And no, it will not matter what programming language you are using to configure the DAQmx driver.
01-09-2014 02:09 PM
Oh, I see. Thanks Dennis