Here is a quick example that should work for you. I built it using Vision Assistant and didn't spend a lot of time testing it, but it should give you a good idea of how to get started. Let me know if you have any problems, or questions.
Arves
S. Arves S.
National Instruments
Applications Engineer