I have a PCI-7340 motion control card and a PCI-6220 DAQ card with an RTSI bus between them. I am trying to acquire encoder data from the motion control card and analog data from the 6220 simultaneously, so that the analog data is syncronous with the encoder data. I have seen the example vi "RTSI with DAQmx (encoder-external scan clock).vi" in the examples directory, and I see how to use the Select Signal function to send the encoder phase to the RTSI0 line. So I can acquire the analog data in a way that is triggered to the encoder phase, but how do I acquire the actual encoder position also at the same instant?
The example vi says "By routing an encoder phase signal, A or B, over the RTSI bus, the motion controller provides an external scan clock to the DAQ device. The external scan clock is directly correlated to encoder position." But since I don't get encoder position as an output of this vi, I don't see how this correlation works! If I move 80,000 encoder counts I am not getting 80,000 DAQ points or even anything predictable. I get some number of samples that changes each time and dramatically changes with move velocity. None of the numbers seem to mean anything, and they are all thrown off by the untimed while loop in the vi that is polling for one sample at a time from the DAQ card. It seems like this "correlation" is meaningless to me. Am I wrong?
What I am trying to create is two equal-length arrays of data, one containing encoder counts and the other containing analog data, so that at any index the encoder data was acquired simultaneous to the analog input data. But I don't see any way of triggering the "Read Encoder Position" function or getting any sort of time-correlated data from the motion control card. But an NI apps engineer told me when I asked for a hardware recommendation for this application that synchronized data was an easy thing using an RTSI bus and that it was done all the time with these two boards.
Does anyone know the answer?
-Devin
I got 99 problems but 8.6 ain't one.