This is not much to go on to find a reason why it would hang.
First make sure you are running the latest version of NI-IMAQ
2.5.5Saecond pare down the code to the smallest amount which will reproduce the issue. If this does not make the solution obvious post the code and I'll take a look at what's happening.
Regards,
Amaury Rolin
NI Application Enginerr.