looked at the examples ?? >From a VI Front Panel Window select 'HELP' then 'FIND EXAMPLES'
enter DIGITAL in the search parameter Check out the 'READ FROM DIGITAL PORT' and 'WRITE TO DIGITAL PORT' With a little beating into shape this should work nicely, I used them as the basis of something very similar to what you have described, with great success. Regards and good luck