Hi Eluri,
There are a few limitations with the IMAQ Configure Trigger function and some of the other functions that use the trigger lines, these are explained in detail in the following article:
http://digital.ni.com/public.nsf/allkb/7AD7F80F2FFDA6B786256BE60064EC57?OpenDocument
I would also take a look at some of the examples in the NI Example Finder which is in the Help menu under Find Examples. The ones that are relevant to you can be found under Hardware Input and Output>> IMAQ>> Signal Input and Output. There are numerous examples some of which will be applicable to you, as well as this they will save you a lot of time in coding from scratch.
With regards to which functions you should include in the loop, this should only be functions that need to happen with each loop iteration, for example you would not use the Initialise VI within the loop but may use some of the utilities used for grabbing image data or processing the image.
I hope that this helps.
Kind Regards
David B
Applications Engineer
National Instruments UK