TiTou,
Sorry for the delay in posting... I've been meaning to test this out with hardware before I suggested it. The only way the DAQmx driver exposes the functionality to do what you want is to use an angular encoder task (or a linear encoder, i guess) with Z index enabled. If you preload the value of the initial angle and set the Z index value intelligently, you can put the count register within a certain number of binary values of the terminal count. Use the CI.Count DAQmx Channel property node to verify the value of the count register - the Counter Read will return scaled data. Then, you'll need to set the internal output of the counter to pulse on the terminal count. You can then feed this signal back (either internally or externally) to the Z index input of the counter. This way, the counter will begin counting (with quadrature inputs) until it reaches the terminal count. Upon the terminal count pulse, you will reset the value of the count register and begin the process again. It is the counter output signal that you will use as your trigger. Of course, if your counter starts counting down instead of up, it will be a long time before you get that pulse. This will also depend on the details of your encoder (as to how to set your Z index phase). You also wont be able to get valid values from your counter read - you'll have to use another counter if you want to do that. Anyway, please let us know your results! Also, let me know if you have any questions about the process.
Regards,
Message Edited by Voltage Viper [DE] on 03-21-2006 05:03 PM
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments