Hi Rolf,
thank you very much for your reply.
Indeed, it was what you said. I am using a Thorlabs camera and I found the list with the error codes. It turns out that a transfer error occurs at some point. Is this an issue of the programming code I developed or the camera disconnects at sometimes, I dont know. I ll have to look into this further.. Thank you for your response and I ll try to get back if I have any updates.