From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating SPI using PCIe-6535B

Solved!
Go to solution

Thanks.

 

I still don't understand the calculations which leads you to the conclusion that capture should be OK.

 

The board has a 2048 element buffer. I need to sample a SPI signal 96 bits long. Lets say I oversample x4. Thats 5 SPI events.

SPI events repeat every 100uS.

The Windows task must therefore run at least every 500uS.

 

I downloaded LatencyMon.exe and typical interrupt to process latency on my i5 are 250uS. Maximum is >>, frequently around 23mS.

 

I conclude then that for this to work the process of extracting data from DAQ to PC must be hardware driven, Windows will not keep up.

What am I missing?

Is the buffer bigger or does the DAQ have a very much bigger buffer through DMA to PC memory?

If so how big?

 

0 Kudos
Message 11 of 14
(3,103 Views)
Solution
Accepted by topic author PeterRQ

Hi PeterRQ,

 

The issue here is really down to how reliably we can operate at a given speed.  A PC running Windows can still run our code as fast as a Real-Time operating system.  The difference between the two is that a Real-Time operating system can meet these timing requirements with greater certainty.

 

Given that you are now looking to oversample, limiting the necessary execution time to 500 us, you may indeed be better off with a real-time system.  However, you could still meet these timing requirements on a Windows machine.  The difference between the two is that with a Real-Time operating system, you know you can meet these timing requirements again and again.

 

You have already experienced yourself the large uncertainty of execution times with a Windows operating system, looking at the large difference in execution times of 250 us and 23 ms.

 

Depending on your overall application, it may be that you could only ever work on a real-time operating system.  You could certainly benefit from talking to your local sales representatives regarding your application and the potential for a real-time system.  If you call in on 01635 523 545 and ask to speak to our sales representatives, they will be able to provide you with a more rounded solution to your problem.

 

Let me know if this helps.

 

Marshall B
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 12 of 14
(3,099 Views)

Thanks.

As discussed; how the sampling is implemented has a big effect on the reliability of the sampling process.

I understand now that we only have a 2048 element buffer and as such Windows would not be suitable.

 

The application is production test & so we need the process to be 100% reliable.

0 Kudos
Message 13 of 14
(3,093 Views)

Dear all

 

I am using NI PCI 6251 with SPI to control and read data in ADS1218 (ADC 24 bit). I made a program that writes commands to ADC and reads data corresponding to a voltage. I am able to write into the ADC and I am also able to read the correct digital waveform from it by mean of an oscilloscope but the digital waveform I acquired from labview program misses sometimes of the first bit or sometimes of the first two bits obtaining a wrong voltage value. Probably there is some syncronization mistake but i do not understand where.
Please someone help me

 

thank you

 

emanuele 

0 Kudos
Message 14 of 14
(3,041 Views)