05-30-2008 09:08 AM
06-03-2008 12:10 PM
06-20-2008 06:24 AM
06-20-2008 08:20 AM
Something I've done is to create a "dummy" AO task which continuously generates a constant 0V. It's *real* purpose is provide a sampling clock signal that I can use in my encoder tasks. Configure and start the encoder tasks first, wiring in a sample clock source with a name somthing like "Dev1/AOSampleClock". At this point, the encoder counters are tracking position, but not yet sampling. When you start the AO task at the desired sample rate, then the clock will also buffer up your encoder values in sync with each other.
If the encoders are in motion when you start the app, be aware of the following little nuance: all buffered samples for the 2 tasks correspond to the same instant in time BUT the very first reading for each represents the amount of position change from the time you started the encoder task until the first AO sample clock. These initial times / position changes will be slightly different for the 2 encoder tasks.
-Kevin P.
06-20-2008 09:39 AM
Thanks a lot Kevin for your comment,
Please excuse me for my very limitted knowledge in DAQ, coz I'm totally new in this field.
I would like to ask, can't I simply use one of the encoders signals as my sampling frequency, because in my problem I'm not interested in the time, I'm only interested in the simultaneous position of both encoders. Thats why instead of using a sampling signal which is generated by a counter I'm wiring the "Sample Timer" directly to slower Quadreture encoder "signal in".
About the 1st results, I'm already taking care of it by iliminating them out, but I noticed that the two buffers are having different amount of values which means that the values are not syncronized 😞
I would be very grateful for any further help.
Mahmoud