07-08-2006 05:49 PM
I need to synchronize continuous buffered AI (using PCI-MIO16E series) and Encoder Up and Down Counts (using PCI-6602). I want to use LabVIEW and DAQmx and I am wondering if I also need a rtsi cable to synchronize the 2 boards. I need a common timestamp for both the encoder counts and the analog input measurements in my spreadsheet file. Is there a good example program that shows how to synchronize the measurements? If I do need the rtsi cable, how do I set up the rtsi synchronization in the code (and MAX).
07-10-2006 09:04 AM
Hopefully, this little bit of info will help get you started:
1. A RTSI cable is not strictly necessary, but I would recommend it to save yourself present and future screwdriver work. (An alternative is simply to connect a wire between appropriate pins on the two boards' terminal blocks). If you need something to try out the proof-of-concept, it turns out that the RTSI cable is good old-fashioned 34-pin ribbon. This is the same type of connector used by 3.5 inch floppy drives. You may have an old floppy cable that'll let you try things out. CAUTION: make sure all pin connections are straight-through between the connectors. Some old floppy cables were partly split and some lines were "twisted" to swap certain pins. If it isn't straight-through, DON'T use it.
2. In MAX you would add a new DAQmx device. One of the choices is to add a RTSI cable. Then you define which of the DAQ boards are connected to the RTSI cable. After you've done that, DAQmx is smart enough to assign particular RTSI lines to your tasks as needed. You won't need to specify them directly. When you configure the counter task, you'd tell it to use the AI sampling clock from the other board as its own sampling clock. DAQmx handles the RTSI routing assignments under the hood.
3. If you're stuck in traditional NI-DAQ, you'll need to handle the signal routing more manually. You would use Route Signal.vi to push the AI sampling clock up to a particular RTSI pin, and then configure the counter task to use that same RTSI pin as a sampling clock.
4. I don't have LV here at my network PC, but there are a variety of shipping examples that show synchronization. This site has many more examples of various kinds.
-Kevin P.
07-11-2006 10:59 AM