Sign in to follow this  
Followers 0
mlkramer

Cognex 4001 Problems

9 posts in this topic

I have a job on a Cognex 4001 system that has a large number of PatFind functions (~50). I occastionally need to add more as new parts are introduced to the line, and I have recently been getting memory allocation errors that prevent me from saving the job. Does anybody know if there is a limit in the number of PatFinds you can have in one job, or have any suggestions on working around this problem? Thanks.

Share this post


Link to post
Share on other sites
Yes there is. It sounds like you hit the memory max in the 4001 system. I have done this many times in a 1000. Using more than four to six patfinds in a 1000 system will fill the memory up. Here is what Cognex says: Description: According to the Release Notes, a job can have a maiximum of 2048 active cells but I have a job with less than that and I am getting "mem alloc" errors. Is there an explanation for this? Can I use the size of the job as an indication of memory used? Resolution: There is a 2048 cell limit but there is also a limit to the amount of internal memory used by the system. This memory is shared for "job and program" stroage. The "program" is the firmware, the rest of the memory is used for jobs. The amount of memory consumed by a job at runtime is significantly greater than the size of the job file. This is because the data written to a job is the minumum information required to reconstruct the spreadsheet function when the job is loaded, and is typically much smaller than the total memory resources consumed by creating or running the function. There is a lot of memory used for calculating the functions that does not get saved as part of the job. Memory used for tools is allocated and deallocated every time a function executes. For example, functions with larger areas take more memory than functions with smaller areas. Unfortunately, there is no way currently to determine how much memory is available for your program.

Share this post


Link to post
Share on other sites
Thanks for the info, pretty much what I figured. I might have just discovered a way to re-use some patfinds within the program and greatly reduce the number I am using. Just going to take some time...looks like I know what I'm doing today!

Share this post


Link to post
Share on other sites
When I started using cognex, I was like you. I used patmax after patmax after patmax... I found them to be slow and eat alot of memory. Maybe a suggestion: I found that using tools like FINDLINE and FINDCIRCLE make great locators in the place of patmax tools. But like what you have said, review your application and see if there is something you can fixutre on within your part to elimate some patmax tools. In some cases, you have no choice, in my case, I just got a better camera like a 5100 insight that has 8times the memory of a 1000 insight. Good luck!

Share this post


Link to post
Share on other sites
Do you have Insight Explorer Offline key? If you do, you can load this job on your computer, then drag and drop the images you sent me. Do not use this job in your camera. I had to alter it alot to give it the correct information. For example, I had to hard code the part number from your ReadEIP cell to get your choose and Maxl to work for my testing in your job file. As you can see, I used find circles to located your drain holes. If there was two drain holes, I found the center then plotted a line, then found the center of the line which would give me the center of the part. The only part I would do better is I would use a few pattern find tool that you can common together to find the whole part, then use that information to locate and lay down your findcircle tools. In other words, make a fixture with the pattern find tools that that find circle tools can be located from. I don't know all your parts, this part would require some thinking to see if I could find something on all parts or some group of parts to reference from to locate the findcircle tools too. As you can see, it's more code in the camera, but a findcircle tools takes up much less space in memory and executes alot faster. Of course, I have no idea how your robot picks up your part and my X and Y are different from your findpattern X and Y, but you should be able to calibrate. Hopefully seeing this will let you see other ways to located parts without using patternfind when crunched for space. Granted, if you have the memory space, DO IT WITH pattern find, unless you got inconsistent patterns. Look at your application, a circle is one of the best, repeatable patterns to find, especially if there are two circles then drawing a line between them and finding the middle of your part. I call this a two point, lock and locate method...my nickname I use. See your e-mail for the job file...I didn't know if you wanted it shared online at the board...

Share this post


Link to post
Share on other sites
I do have the offline key, but I haven't received the job from you in my email. In case you sent to the wrong address the correct one is mlkramer2 at yahoo. Thanks...

Share this post


Link to post
Share on other sites
I sent the job file again. Oh yeah, since the images you gave me are 1024x748. I assumed that your 4001C camera was high resolution. Don't forget to go into Insight Explorer under options and turn on "high resolution". This will allow you to drag and drop the jpegs you gave me into the job file and simulate a trigger condition each new picture you drag and drop. Of course you'll have to change your part number in that one READEIP cell manually...

Share this post


Link to post
Share on other sites
Yes, I already had the high-resolution turned on... I took a look at the file. I may incorporate some of these ideas, since we have several models that have similar configuration of two drain holes that this would be useful for. The one problem with it (that I probably didn't bring up originally) is that I wanted a system that would either be able to easily recognize new parts, or that it would be straightforward to add new parts to. I would like to be able to train a couple other engineers, and possibly some area electricians to be able to add new parts on their own. The method that you used would be much more difficult then the current instructions I have of copying the last patfind, changing the part number, and changing the model region of the Patfind. I really appreciate the file though, and I'm going to look at it more closely to see what I can use in the current program to save more memory to allow more sinks to be added in the future. One question. When I was loading up the job I got several "formula too long or complex" errors (something I encountered when doing my programming, the reason for the table of several MaxI functions). What causes this? Obviously you were able to enter those formulas, but for some reason I am unable to. Possibly just a version problem? Actually now that I say that, I think I have a slightly older version on my PC, then the one actually running on the camera.

Share this post


Link to post
Share on other sites
I remember having problems with that whenever I had a camera that was running 2.5 or lower. I am running Insight Explorer 2.7.00 with the built in emulation firmware of 2.7.00 Are you in support at cognex? If so, login to their website and download the latest and greatest Insight Explorer 2.7.00. You will not lose your offline key when you uninstall your old and reinstall your new one. If that fixes your errors, then you need to upgrade the firmware on your 4001C camera. If you need help with that, I can grab some eDocs for you from Cognex. As far as the other things, I would look at setting up a WIZARD. I've used the built in WIZARD menus in Cognex to create simple HMIs to setup additional settings and what-not on parts before for opertators. Basically you can make the wizard do things in the background to make it easy on your engineers. However it would be difficult to do without doing it as a patternfind. A patternfind can be used without much instruction. Using findcircles and things require extra knowledge that you’re probably trying to get away from. One suggestion is to just upgrade the camera. If you need a hi-res camera with more memory, look at upgrading to an Insight 5401. You might not have a choice if being that you explained your application a little more in detail and what you need to do. http://www.cognex.com/products/InSight/Models.asp For reference, I snagged the Cognex Insight Robot Calibration wizard, it demonstrates how to use the wizard menus. Keep in mind that Cognex uses “hidden” cell that you can not access in THIS wizard but hopefully it give you some ideas on how to use the wizards. Attached to this post is the wizard file from Cognex. calibwiz.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0