11-16-2015 09:16 AM
I want to read two encoders connected to cDAQ 9178 (counter0 and conter1) via NI9401 module. My problem is how to read synchronously these two encoders. I have Labview 2009. Maybe somebody has any template with the program which could be useful for me.
11-16-2015 12:28 PM - edited 11-16-2015 12:52 PM
A quick google search led me to this example.
{LabVIEW}\FPGAWizard\PlugIns\Function\niRIOQuadCtr\Temp
I'm guessing you have to wrap the encoder boolean logic in a subvi and drop two of those subvis on your block diagram.
You could then, at some interval, take the position outputs from those algorithms and drop them in a target to host FIFO to get simultenous data.
Sorry, I just noticed you're using a CDAQ.
Here's a starting point. YOu have to add another similar channel to your task and use the N Chan 1 sample polymophic read
{LabVIEW}\examples\DAQmx\Counter Input\Counter - Read Encoder.vi
9401 doesn't have any counters. You're going to have to post process your data with some delay. See: