12-01-2021 01:24 AM
Hi,
So I've created an interface for a microscope to act as a camera, but everytime I go to save the file as a JPEG, it tells me I've not granted access to the program, only I don't know how to solve the issue.
Can anyone help?
12-01-2021 02:04 AM
One of two things is happening:
- you are writing to a folder which you do not have write permissions for. Try a different folder/checking you have write permissions.
- The IMAQ reference is being closed before you actually write the file.
I suspect it is the latter. Remember data flow. A vi will execute when it has all of its inputs, if there are multiple VI's which have all of their inputs 'simultaneously' there is no guarantee in which order they will execute.
For your VI this means that there is a chance your close IMAQ refs vi will execute before the write JPEG.
Try wiring the error wire through the write JPEG VI. This will ensure it executes before the close IMAQ REF.
12-01-2021 07:49 AM
@Niatross has, I think, identified the problem, namely poor Data Flow. A couple of suggestions --
Here is a cleaned-up Snippet to help you reorganize your code:
Bob Schor