hello hassan majedi,
you could try 2 ways to detect your trigger.
one way would be to create a digital task, which uses change detection, see the
manual and see the DAQmx examples for change detection, which are usually located at:
"C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Read Values\"
if you don't want to create a task, you must poll your signal within your software, as you mentioned.
regards,
robert h
NI germany