02-17-2014 09:10 PM
Good day! I do not know what is wrong but my VI suddenly stops with a timeout error. I cannot find the wrong thing. Your help would be much appreciated.
02-18-2014 12:22 PM
Hi Jerald.
Can you change your code so that you have proper error handling? This would help us determine where the error is coming from. I have augmented your code so that there is some error handling. Please use this to help modify your code. Please be aware that the data flow in my VI might not match up to your desired data flow.
After putting the error handling in, try running your code with highlight execution on so that you will be able to see which express VI is giving you the error. Also please include the error code if you have it.
02-19-2014 06:42 AM
Good day Engr. Paolo F!
First, I want to thank you for responding.
Here are the errors that were displayed while running the VI.
Error -1074360306 occurred at IMAQdx Get Image.vi
Error -1074360293 occurred at IMAQdx Get Image.vi
Error -1074396080 occurred at IMAQ Extract Single Color Plane
All of the Vision Acquisition and Vission Assistant VIs are getting error after each other.
By the way sir. May I ask you if it is recommended to use many Vision Acquisition and Vision Assistant VIs? I tried to use only one Vision Acquisition but its displayed is turned into 8bit HSL, and therefore getting error on Single Plane Extract VI in the Vision Assistant VIs. Each of the Vision Assistant VIs has different stored picture to compare with the acquired images.
Sometimes, I make it run. What I was doing is to open each Vision Assistant VI and Vision Acquisition VI.
I am still looking forward for a response. Thank you!
02-20-2014 02:29 PM
Hi Jerald,
Are the vision acquisition assistants all for the same camera?
Also could I get a screen shot of the errors?
If the VIs need to happen in a certain order please use sequence structures or a state machine. This will eliminate race conditions, of each vision assistant trying to access the camera at the same time, which should help. Also you mentioned that the VIs work if you open each one.
Could you run code of each vision acquisition and vision assistant express VI pair to see if they work individually?
02-22-2014 12:38 AM - edited 02-22-2014 12:44 AM
Good day sir!
Vision Acquisition VIs use only one camera. On the ohter hand, Each Vision Assistant has different tasks. Supposedly, all of these Vision Acquisition must execute at the same time, but using sequence structure may also do. I will try to do it later.
An error occurs when I attach a file in my reply. Maybe I will attache the files later.
Thank you!
02-24-2014 04:04 PM
Hi Jerald,
If you only need one image from one camera, you can do one image acquire and then use that one image to do all of your analysis. You may need to create multiple instances in order to save the images in different places, but it sounds like you only need one acquire.
02-24-2014 07:05 PM
Good day sir! Yes, I only need one image for all of my Vision Assistant's analysis. All of my Vision Assistant has an Extract Single Color Plane VI. After executing the first Vision Assistant, the image produced by the lone Vision Acquisition I left is already extracted to its Single Color Plane. This brings error to my remaining Vision Assistant VI for they cannot extract the image to its single color plane anymore because the image is already converted. Why does this happen? I assured that the Vision Assistants are connected in parallel to the Vision Acquisition, meaning every Vision Assistant is connected to the output of the Vision Acquisition.
Thank you for the tip on using Flat Sequence Structure in my VI. It works and doesn't display any timeout error.
I have an another issue. I put a Play Sound File VI. I am sure that I have put the right path but it displays Error 4805 occurred at Play Sound File.vi that it cannot find the sound file. I tried to do this in a new VI without any while loop or case structure and it works.
Also, can you give me a tip what to use to display a certain image file if for example I typed "a", and another certain image file if I typed "b".
So far, the most important part of my system, the image acquisition is resolved. I owe this to you. Thank you, sir!
I attached a screenshot of the Play Sound File error.
02-25-2014 09:51 AM
Hi Jerald,
The image is converted, because the reference being passed is a pointer. This means that the data is stored in a memory space and if you change it, it will save over that memory space. What you can try to do is create multiple image reference so that you can work with the same image saved multiple times. You would need to use multiple imaq creates, these create the image buffer in memory.
I am happy to hear that the sequence structure was able to resolve one of your issues.
Make sure that there is always a path linked the play sound file vi. If there is one case where it doesn't have a path, or has a bad path, then it can give this error. Try running in highlight execution mode to check if this is the case.
Here is a forum post that goes over that. You can just load the file after having saved it.
03-02-2014 11:50 AM
I am here again sir!
May I ask if I can do something to make the acquisition faster? I mean, the display of the acquisition is quite lagging.
I still get a timeout error in my vision assistants. And a new error, Error 5002 in my Init.vi for my Arduino. I tried to run it with a sample VI and it works properly. But in my VI, I encounter an error, but this is only for some times. What I am doing to resolve this is by unpluggig and then plugging again the module.
Overall, my system now works. Thanks sir!
03-03-2014 10:47 AM
Hi Jerald,
Make sure that no two vision acquisition assistants are working at the same time for those timeout errors. In your sequence structure make sure that there isn't more than 1 vision acquisition assistant in each frame. Also for the lag, it may be due to the amount of time it takes for you to take and process the image. A good way of testing frame rates is to use the example. To get to the example go to Help>>Find Examples and in the browse tab go to Harware Input and Output>>Vision Acquisition>>NI-IMAQ>>High-Level>> HL Grab(Express).vi. Configure the vision acquisition assistant to your camera settings and this should be the frame rate you can expect.
I was also able to find a resource on your arduino error which may be of some help.