03-28-2012 04:56 PM
I'm using a very precise shaft quadrature encoder with 400 pulses per revolution. I'm simply trying to test it before I incorporate it into my VI. I've been using the DAQassistant to try and configure it. I've got a PCI-6036E with a BNC-2120 accessory. To start I hav been just trying to read an edge count of one of the channels. In this case I'm reading from CTR 0 Gate. When I try to run the edge count test as soon as I move the shaft at all I get an error(Error -200141).
It says I should try using DMA. I've looked into this and everything I have found appears to indicate that the PCI-6036E has "dma", however I have been unable to identity if it is being used or not.
Is my DAQ simply not capable of reading this fast of a signal?
03-29-2012 03:47 PM
Hi Erik!
How quickly are the counter events occurring? The counter source frequency of that card is 20MHz which should be able to keep up with a quick signal.
I see you found the knowledgebase article that references this particular error code (found here). The solutions mentioned there are worth looking at.
The PCI-6036E only has one DMA channel available to it. So if you are only using one channel, DMA is being used by default. Any other channel that is being used at the same time is then defaulted to interrupts.
If you would like to be sure that your task is using DMA, you can include a property node to force the channel to use DMA (still, only 1 channel can use it at a time). See the attached image on how to access that property.
Also, be sure that you are not doing too many operations within the loop that is reading this data. That way the software can pull the data off the buffer as fast as possible.
04-02-2012 06:28 PM
Thanks for the response Peter.
If the DAQ can measure as fast as it says it can then there is no way the pulses are coming that fast.
The thing is I really only know enough Labview to use DAQAssistant to take measurements. Is there any reason the counter isn't able to count the rising edges of the encoder?
I'm trying to attack this problem from the following angles:
Using Express, when I try and set it to take continuous samples the only option I have for a clock is "external". There is a list of possible clocks I can scoll through. I don't know what to do with this. Does external mean that I should be giving the DAQ pulses to act as a clock?
Using the CI Cnt Edges, I tried to adapt what was an angular encoder program for a simple encoder counter operation and have produced the code as follows.
Also I'm running Labview 8.0 if thats relevent.
04-03-2012 06:52 PM
Hi Erik,
Express VIs are essentially prepackaged code that do the same thing. The DAQAssistant uses the DAQmx VIs that you see there. If you're doing lower level programming, it is recommended that you use the DAQmx VIs rather than the DAQAssistant.
Does the code snippet that you provided work? It looks good. What behavior are you seeing with that code?