I learning to program an application to acquire a digital signal coming from an incremental encoder. I want to acquire this signal at a certain rate that I will decide (board PCI-6534). My question is: which case does my acquisition correspond to?, handshaking or pattern I/O? Which is the difference between these two modes? Thank you very much in advance,
I'm no digital expert, but I believe you want pattern I/O. True handshaking (one example) is where your instrument tells your program it has a data value to be read. Your program reads it and lets your instrument know it has been read. Until then your instrument will wait to send the next value. The idea is each side waits for a signal from the other side before continuing. This communication takes place over handshaking lines.
With pattern I/O, you set up a digital input or output to be clocked in or out at a specified rate. In this case you expect the other end to keep up with your rate. If the other end doesn't keep up, you may read "bad" data, or write data that gets skipped by the other side.
You will want to use pattern I/O. With pattern I/O the transfer of data is controlled by a clock signal. At every rising or falling edge (user configurable) data is transferred. If the 6534 cannot keep up with the transfer, an error occurs and transfer is stopped. You can choose the clock source to be external or internal. I believe you will want the clock source to be internal and then you will have the ability to control the frequency of the clock.
Handshaking is an operation where there is digital communication controlled by handshaking signals and there is irregular intervals between data transfer.