I have a M-series DAQ board and a 7330 motion control board.
Assuming that I set up the RTSI connection correctly in MAX (adding the RTSI cable under DAQmx devices and then adding the PCI-6221 DAQmx board to the RTSI cable), I was wondering how I can route the Encoder phase digital signal to the DAQ to record the encoder position and analog input concurrently and deterministically.
That is to say: I NEED to know that at time X, I know the motor is at position Y and the analog input is Z. This means I can't use the encoder pulses as a sample clock for the analog input because the analog input might be changing faster than the encoder pulses that are coming in (think of a very slow move).
The way I came up with:
Use a shared sample clock like in the example in the Shared Sample Clock section of this doc (so both signals are sampled at the same time together and the sampling starts at the same point, so I record everything deterministically, even if I have to post process to count encoder pulses):
http://zone.ni.com/devzone/cda/tut/p/id/3615
I have the encoder phase routed over the RTSI bus, but how do I route the RTSI signal to the digital input that I want to sample?
I guess the other way that I thought of would be to use a counter that is clocked by the RTSI signal (encoder), but how do I deterministacally sample a counter in lock step with an analog input?
Thanks