Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6508

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?

0 Kudos
Message 1 of 5
(5,184 Views)

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:

DAQmx timing.png

 

I don't know if this is quite what you are looking for but it should demonstrate an option.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
Message 2 of 5
(5,168 Views)

 

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!

0 Kudos
Message 3 of 5
(5,164 Views)

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);

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 4 of 5
(5,157 Views)

 

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. 

0 Kudos
Message 5 of 5
(5,147 Views)