From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-22-2012 07:19 AM
This question has probably been asked many times, but, does the NI 6508 (PCI-DIO-96) allow state change detection via DAQmx? I would like to be able to reduce the amount of CPU time my program requires by continuously running and task and comparing the port state to the previous state. Would you have any suggestions?
08-23-2012 11:15 AM - edited 08-23-2012 11:18 AM
Do you have a DAQmx timing VI in your task? One of the configuration settings for it is "Change Detection (Digital Input)"
It should look like this:
I don't know if this is quite what you are looking for but it should demonstrate an option.
08-23-2012 11:21 AM
Thank you for your reply. I should have been a little more specific in my question. I am programming this via the C API on DAQmx Basic. However, the fact that you can do this in LabView with the DAQmx tool makes me think that it is possible. You wouldn't by any chance be able to point me to C example that shows how to trap for that interrupt? Thanks again for your reply!
08-23-2012 12:17 PM
I've looked into this a little more and I do not think that the 6508 supports change detection according to this page: http://www.ni.com/white-paper/4102/en
There is also no mention of it in it's manual: http://digital.ni.com/manuals.nsf/websearch/6E8329494F3955528625758300678D55
If you could do it it may look like this. The change detection setting uses specific input lines with rising or falling edges to trigger a reading. This sample prototype was generated in CVI where port0/line0 triggers readings on rising edges and port0/line1 triggers readings on falling edges.
DAQmxCfgChangeDetectionTiming (TaskHandle, "Dev1/port0/line0", "Dev1/port0/line1", DAQmx_Val_ContSamps, 1000);
08-24-2012 06:29 AM
Craig. Thank You so much for looking into this. I did experiment with the DAQmxCfgChangeDetectionTiming function and as you stated it did not appear to be supported in the C API. I have changed my code to reduce the polling frequency of the ports and that is helping me save some of the CPU cycles.