Hello!
Could you be a bit more descriptive about the problem you are encountering? You mentioned that it seems to work, but not when you put it in the block diagram? So when exactly does it work? What error codes are you receiving? With this information we will be able to better answer your question.
Also, please note that as a FIRST member, you will be able to post to
http://www.ni.com/community/FIRST and that any questions posted there will be answered by us as well.
Have a great day!
Kameralina