08-26-2008 10:20 AM
Hi,
I'm using a counter on a PCI-6602 and I would like it to tell my program whenever a sample has been acquired or whenever the counter has reached its terminal count. I would therefore like to raise the sample complete event and the output event. The problem is that I get the message that my device does not support DAQmx signal events (which include the counter output event, the sample complete event, the sample clock event and the digital change detection event). I would have been tempted to believe so but I have succeeded to get digital change detection events on that same device. (So far, I manage to get the result I want by exporting the output signal of the counter and by connecting it to a bidirectional line. The change detection event raised on that line acts as the output event.)
So does the PCI-6602 really not support signal events? Which device would support it?
Thanks
08-27-2008 08:33 PM
Hi petite,
Regarding your application, I am still slightly unsure of what kind of measurement you are performing with the counter. It sounds like you are just doing edge counting, and that you would like to know when the counter increments and when it reaches terminal count. This being the case, if you could directly connect your signal to a digital input and use change detection, you would know exactly when the signal increments. However, the 6602 card does not support change detection. You may want to consider using an M Series multifunction DAQ device that supports change detection for this purpose. As far as using the specific signal events with the count edges task, none of those events will be supported. Perhaps more explanation of your application and what you are trying to do would be helpful in finding a solution. Hope this helps,
08-28-2008 09:08 AM
Hi Daniel,
I've just noticed that I've made a mistake in my first post... The card that I'm using is a PCI-6259, which is a M Series multifunction Daq device (I was formerly using a PCI-6602). Sorry about that.
So as I was saying in my post, I already use the Change Detection Event to know when the counter has reached its terminal count. This is only because I didn't figure out how to configure a Counter Output Event since I got the error message telling me that my device didn't support Signal Events (which is strange to me because I'm using Change Detection Event....).
Even though my application is working fine, I'm still wondering if I could have used the Counter Output Event. My question is simply the following : does the PCI-6259 support Counter Output Event? If the answer is yes, how do I configure it? If the answer is no, which other devices would support it?
To answer your question about my application, I'm basically making an odometer. I have an encoder counter that is counting down from a given value to 0 and that is reset afterward. (I've connected the output of the counter directly in the Z input so that it is reset on every terminal count.) I need to raise a software event so that a GPS reading will be perform at the same time. That's why I use the change detection event.
Thansk for your help
08-28-2008 10:46 AM
Hi petite,
Thanks for the update and clarification. Unfortunately, I have verified that the Counter Output Event signal is not supported when doing any type of counter input task, such as edge counting or position measurements with encoders. This signal event is only compatible with counter output tasks. This is true regardless of what device you use. If you setup a CI Linear Encoder task, you will receive the error that you are seeing, about the device not supporting signal events. If you instead simply configure a CI Count Edges task, the error that is given is slightly more detailed, indicating that the event signal specified is not supported with the measurement type you have requested.
Workarounds for this include exporting the signal to a digital line and performing change detection (such as you are currently doing), or to export the counter output signal to a PFI line and use this line as a sample clock source for a "dummy" analog input task, configured for the "hardware timed single point" sample mode. This allows the use of the Sample Clock event signal in software. Please let me know if you have anymore questions regarding this issue. Thanks!
01-29-2009 04:09 AM
Hi Daniel/Petite
I have a similar question in that I am wanting to use a NI USB-6211 I have for a control application. I have tried using either the "SampleCompleteEventHandler" or "SampleClockEventHandler" in C# whilst reading data from 3 Analog inputs and also get an error: "Measurements: DAQmx Signal Events are not supported by your device...". My idea was to calculate feedback gains at each sample clock event and send a signal back to the DAQ to control an actuator. My question the is: "Does the USB-621 card support such events?" If not, "Do you have any other suggestions I could try?" Or failing that, "What multifunction DAQ would work?"
Thank you in anticipation.
A Sutherland