Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Change detection

Hi everybody!

   I've a NI 6509, and I'd like to perform some "full-duplex" read and write. 

   The best way to do interrupt-driven read, seems to be using change detection feature, because I can go read some DI lines when tha state of another line changes.  This seems good, but.... to do this, according to NI example, I should use a read function with an infinite timeout.  If I do this, it seems difficult to write on output lines while waiting for interrupt. 

   Should I use multithreading to achieve my goal?

   Another good thing, would be to be able to launch a callback when a change detection signal occur, is there a way to do this? (I mean, not doing it by hand, putting this function after the read function...... this doesn't seem really clean!).

   Thanks for help!

0 Kudos
Message 1 of 3

Hi Graziano,

if I understand you want to read and wite with a PCI-6509. The 6509 doesn't support the use of an internal or external sample clock, everything is controlled via software. The 10 MHz clock on the 6509 is used to implement several of the industrial features such as input filters, change detection, and watchdog timers. With the exception of change detection, only software-timed read and write operations are allowed. The internal 10 MHz is not accessible to the user. Moreover you can configure the ports to write or to read and sincronize them via software.

I hope it help.

Marco Lencioni

0 Kudos
Message 2 of 3
Hi MarcoL,

   I'm sorry, but you're answering someone else.... Smiley Very Happy

   I want to perform interrupt-based read, that is, I use a parallel protocol in which when data is present at data lines, I'll have an acknowledge pulse to tell the board to read data present at that moment!  In this post I didn't talk about sampling frequency!!!!  Actually I asked it in another post, but it was for a different purpose!

   I'm interested in the fact that NI 6509 is able to capture inputs when a change is detected, even if SW is doing something else.  I don't know if when I enable "change detection" the SW waits for the change event on input lines.....



0 Kudos
Message 3 of 3