Hi Inna,
Since you are using a 6509, then I assume that you are asking for an example on Change Detection. When you installed DAQmx, a folder of examples should have also been added to your hard drive. You can find VC++ 6 examples in the following directory:
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Read ValuesThere is a folder in this directory called:
Read Dig Chan-Change DetectionThis should have what you need but please let us know if you are looking for something else or if you have any further questions.
Regards,
Jeff Tipps
Applications Engineer
National Instruments