One of the sources of this error is if you are using an IMAQ Create VI but do not close it using the IMAQ Dispose VI. The IMAQ Dispose VI is required for every IMAQ Create, since its purpose is to free up the space the image occupied in memory. If you are receiving this error, you will need to free up the space in memory by closing LabVIEW completely. Then reopen LabVIEW and run your program with the IMAQ Dispose VI in your program.
We recommend always building off of our existing examples. You can find the vision examples in the LabVIEW Example Finder, which is located under Help»Find Examples. Then navigate to Toolkits and Modules»Vision. You can also use the search functionality.