When you say the camera fails, what error is being thrown? If it is a timeout error, you may need to increase your timeout value to account for the long integration time of the camera. Also, since you're seeing this behavior in both MAX and your program, we should probably get it to work in MAX first before diving into software.
Kyle V
Applications Engineer
National Instruments