Hello,
Your diagram looks good. See the Signal I/O section of the IMAQ Development Library (http://zone.ni.com/devzone/devzone.nsf/webcategories/21FF10610AA893D38625685E0077AB3F?opendocument&node=DZ52492_US) for examples of how to implement this in different programming environments.
Regards,
Yusuf C.
Applications Engineering
National Instruments