Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

sequece of operation related with FIFO

I have one more question related to FIFO & onboard memory of 6534.The main confusionis related to the size of transfer.So please help me for that.
Let's see the input first.
1.)What will be the exact sequence while acquiring. Please explain briefly with the size.
Let's consider that we have to acquire 100 samples of 8 bit right.
a.)Now 6534 will start acquisition.
b.)it will get the first sample & store it to 6534 onboard memory right?
c.)will it pass the first sample to FIFO at the same time or later.If later when?
d.)if later, from onboard memory samples will be transferred to FIFO as a block of data?
Thus clear that how samples reach upto FIFO?

2.) Now how samples from FIFO will reach up to PC buffer? When FIFO sample
s will comeout of it?
3.)Similarly what will be sequence in output operation?
4.)in 6534 manual it is written that bydefault DMA is being used and at any time there may be upto 31 bytes stored in FIFO.But we can acquire each sample by interrupts.How can we use this by interrupt. Please explain me this briefly.
Thus mainly i am confused with the sequence and size.Please clear it.
0 Kudos
Message 1 of 4
(3,671 Views)
Hi Vishal,

The exact input sequence will be that your data gets latched on the input and transferred to the onboard FIFO (32MB). The MITE, which is the chip that handles communication with the PCI bus, packs the data from the FIFO (32MB) and gets it ready for transport on the PCI bus. The MITE uses algorithms based on current amount of data in the FIFO, the sampling rate etc. to pack the data efficiently for transport. This algorithm is not documented and is proprietary. The data is then read into the PC Memory from the PCI bus using DMA (or interrupts). This memory is your PC RAM and is limited to the size of the buffer you declared in your program. Once again, you won't have access to how or how quickly data is transferred from the MITE to the PC Memory (as it is proprietary).

When you perform a Read in your application environment (LabVIEW/C++...) it directly reads the data from the buffer. Once it reads the data from the buffer, those locations are available for the DMA to copy data to (circular buffer in continuous mode).

You can change whether your device uses DMA or interrupts using Set DAQ Device Info functions. This function can be read in the NI-DAQ C Function Reference (or LabVIEW help).

For output operations, if the buffer size is greater than the onboard FIFO (32MB) or if the output is set for continuous, you would use a circular buffer in PC Memory (RAM). Data would be transferred by the MITE on the 6534 from PC Memory to the onboard FIFO (32MB). As data is transferred from the PC Memory, those memory locations are now available for LabVIEW or your other programming software to write more data to the PC memory. Similarly, as data is output from the onboard FIFO of the 6534, the MITE can use those memory locations to transfer more data from the PC memory.

Errors, -10845 and -10846 describe what happens when you overrun any of the buffers (PC Memory or onboard FIFO). You can get their description in the NI-DAQ C Reference Manual as well.

Ron
0 Kudos
Message 2 of 4
(3,671 Views)
Hye ron, thank you for your excellent answer
Now one more thing i want to ask you is in 6534 two FIFO are there right? one for input path & one for output path. If our output data size is less than 32 MB, 6534preload onboard memory and then output the data to the port right? If my data size is larger than 32 MB, what will happen? Will it still preload the onboard memory first?
2.) What is need of so much larger memory for input path? because we are unable to preload the memory while doing input operation right? Then same work we can get from lesser memory.Am i right?
3.) In manual of 6534 in each mode, whereever the note is there about DMA & Interrupts, they are telling that at any tije, there will be 31 bytes may be there in FIFO at any time. Are they ta
lking about the 32MB FIFO?
4.) Before this in one question related to sequence in input operation,you have answered me,as shown below.
My question was:
In finite input operation(pattern I/O) is it possible to preload the memory and then i read it?Because i think that the PC memory will be loaded automatically when 6534 acquires the data and then when we use DIO read vi the pc buffer data will be transferred to application buffer.If this is true,i do not want this.Is it possible?
Your answer was:
"Yes, your data will automatically be loaded into the card's onboard memory. It will however be transferred as quickly as possible to the DMA FIFO on the card and then transferred to the PC memory buffer through DMA. It is not going to wait until the whole onboard memory is filled before it transfers. It will transfer throughout the acquisition process.
So as per your answer onboard memory & FIFO are different?
0 Kudos
Message 3 of 4
(3,671 Views)
Hi Vishal,

I few things to keep in mind about data transfers to and from the 6534:
--The two 32MB FIFOs are broken up into groups, not necessarily into input and output. The 6534 has two timing groups, 0 and 1, and each group has its own 32MB buffer. You can set up each group to perform input or output independently.

--When the 6534 uses DMA transfers, it will transfer memory from the board into the PC memory in groups of 32 bytes. The section of the manual you are referring to discusses the fact that when the board has sampled less than 32 bytes (up to 31 bytes), you will not be able to read this data in software because it has not yet been transferred to the PC memory. The 6533, on the other hand, transfers data in groups of 4 bytes.


--You mentioned using interrupts for your data transfer. Be aware that by enabling interrupts instead of DMA, you will bypass the 32 MB FIFO. Each sample will be transferred individually to the PC memory.
0 Kudos
Message 4 of 4
(3,671 Views)