02-19-2009 03:19 PM
02-20-2009 10:31 AM
Candice -
I believe you can call Is Vision Info Present 2 and pass in "Overlay" - the output should tell you whether there is an overlay or not.
Greg Stoll
Vision R&D
National Instruments
02-20-2009 01:54 PM
08-09-2011 10:12 AM
To follow up on this, if I have established 3 different overlay groups (A, B, C), is there a way to read the Vision info and get which one(s) may be present?
I ask this because I might want to clear two of the three groups, rather than all of them.
Don
08-09-2011 11:25 AM
To give you somewhat more background, I am having substantial difficulty clearing individual overlays using IMAQ Clear Overlay (again, say wanting to clear overlay A out of overlays A, B, C). I will get the error 'overlay group not found' (-1074395148) even after just creating overlay A and using 'A' as the input [with build array inserted] for 'group' in IMAQ Clear Overlay . I can't see anywhere where it is cleared prior to my action to clear it. Anyone with any examples related to this that they can share, I would be much obliged.
08-12-2011 08:19 AM - edited 08-12-2011 08:19 AM
I have shown in the attached simple example a successful process for erasing individual overlays.
I will thus have to figure out the problem in my original code.
Sincerely,
Don
08-12-2011 08:59 AM
I still need a way to find out if an individual overlay (eg. determine if overlay A is present when there might be three overlays A, B, C) can be determined to be present so I can just erase that one. NI - any thoughts on this? For now, I will have to figure out a workaround in my original program if this cannot be done.
Don
08-15-2011 05:33 PM
A workaround for you is just to place a Clear Errors after your IMAQ Clear Overlays. That is, after all, a pretty harmless error. Your example program works as expected with those Clear Errors in place. Here is a snippet of where I put them;
As for the larger question, it is not possible to code explicit checks for A, B, and C, but you could code implicit checks. For example, set a boolean value for each overlay to true when the overlays are created, then set them false when they are cleared. Use those booleans to control case structures for clearing the overlays or not. Hope that helps!
08-16-2011 07:00 AM
Hi John -
Thanks for your reply.
Approach #1 in the snippet is pretty much how I am handling things now and approach#2 is what I have been thinking of in case one could not test for individual overlays. I wanted to make sure that before I began to add the shift registers for the boolean approach that I wasn't missing something obvious in Vision that would let me test for individual overlays. I do believe this is an oversight in Vision and should probably be added in a future version. I will mention this at the Idea Exchange.
Sincerely,
Don
08-16-2011 09:05 AM
Definitely. Post a link to your idea exchange entry so I can add my Kudo.