09-17-2013 11:08 AM
Hi all,
I'm currently developing visual inspections for circuit boards. The default inspection UI contains all the features that I would need as feedback from the test.
The problem is that it doesn't really work. The "Inspected Items" list on the side doesn't scroll and the drop down menu filters don't do anything. Essentially, when the test finishes I just have this cold, "frozen" inspection screen to look at. If I have more items to inspect than are displayed on the first page of the listbox then I can't see their inspection result. So far I have been unable to find any way to change or interact with this UI.
Any pointers would be appreciated.
I'm also attempting to create a replacement UI in Labview. Currently stuck on how to populate a Multicolumn Listbox with the inspection steps from Vision Builder.
09-19-2013 11:57 AM
OK, since apparently no one knows anything about the default inspection let me change my focus.
I'm making my own VI to display test results. I need to pass either a 2D array with step names in column 1 and "PASS"/"FAIL" in column two or else two 1D arrays. The first would be an array of step names and the second an array of strings ("PASS"/"FAIL") or booleans. I'm wondering if these are built in and I can just send them to the VI (Where are they? How do I access them?) or will I have to personally create an array of strings and type out every individual step name myself and then do the same for the step results?
I've been messing around with the variable manager, Set Variable, and Array Operator features and can't seem to find an array that I can use like this.
09-19-2013 03:10 PM
Hi CHeritage,
If you're going to be using arrays, the data type of all the elements in your array must be the same. Thus, if you wanted to use strings for the step names, you'd need to use strings for "Pass/Fail" as well in a 2D array. You would be unable to use booleans instead. You could still use two separate 1D arrays if you wanted to use booleans. Here's an article which expands on arrays a bit more.
Depending on how many inspection steps you have, it might be easier to just type each one manually. You can also convert your VBAI inspection to a LabVIEW VI by going to Tools->Migrate Inspection to LV; this VI would have strings for each step name generated within the code.
09-19-2013 03:11 PM
Before we move on to Custom UIs, I'd like to see what is not working with the Default UI. Is your inspection always going through the "End" terminal state, or does it coninually loop within it's own states? The Default UI updates after each iteration of the inspection, so if you aren't ever going to the End state, this could explain the table not updating.
If it's not possible to go through the end state or you want a UI that updates exactly when you want, the Custom UI option can do this, but it takes more work to get the type of behavior the default UI has. There isn't a variable with the name of all the steps in the inspection, so you would have to hard code this array of strings on the UI. For the results, you can get this by making a variable that is an array of booleans, and initialize it's size in the setup state to however many steps you want to display the results for. Then you can use a Set Variable step to update each element of the boolean array with the Step Status for every step you want to see. Then you call Update Custom UI step to set an array of booleans on the UI with this array of booleans variable. Hopefully the default inspection route will work for you because it will much more clean and you it will automatically update as you add/remove/rename steps, or you could also edit the default UI to only show the steps of interest, but you don't have to worry about hard coding names, or updating variables.
Hope this helps,
Brad
P.S. Put "VBAI" somewhere in your description/title to get faster responses...sorry for the delay in support.
09-19-2013 04:09 PM - edited 09-19-2013 04:14 PM
The inspection always flows to an end terminal. At which point it goes into the "Select Inspection" step where we scan the next board (which is usually the same as the previous one.) We don't do any looping within the inspection.
The inspection UI does update. We get our images in the Image Viewer (which we can use the scroll bar with but not the zoom buttons (They don't do anything other than change appearance when clicked)) and the list of inspection steps updates with results shown (but cannot be scrolled through.) The drop down menu with "Display All Images" drops down but does nothing when other options are selected. The "Active vs. Idle Time", "Yield", and "# of Iterations" graphs update as well.
I'm having a hard time getting a sensical display of Part names and results like the Default has. Vision Builder seems to really tie my hands in regards to arrays and passing variables. I'm almost thinking I should just abandon Vision Builder altogether and export it all to C++ from Vision Assistant. I would do that immediately but I need a quick fix for our production team while I create a real working solution.
09-20-2013 03:48 PM
I guess I'm still a little confused since it sounds like everything is updating...is this just for the custom UI, or do things update with the default UI? Could you attach a simple version that illustrates your original problem of things not updating and appearing frozen?
2. What results do you really need to see in Inspection mode? Do you really want the results of every step? If you use a Custom UI, you could just have one red/green boolean that indicates if your part passes or fails instead of trying to update a custom UI with every step name and every result. Maybe you could include a screenshot of what you need to see on your UI. This could be for example:
A. screenshot of the default UI. If this is the case, please include a simple inspection to illustrate how it gets frozen as mentioned in your original post. Ideally this simple inspection should just uses images from disk and no HW so we can easily reproduce your issue to see what is happening.
B. A custom UI with the UI elements you need to update and an explanation of why arrays are difficult to use with it. If you are really trying to update a table with every step name and result, this will be difficult and there is currently not an easy way to do this. If this is the case and it's too difficult to work with, here are two options to consider:
1. As you mentioned, abandon VBAI and do everything in your own programming language with Vision Assistant.
2. Still use VBAI, but use the API to programmatically get all the inspection names/results (this is very easy to do with the API with a single call to Get Inspection Results.vi (the API is also available in C and dotNET as well). Check out the shipping examples for this under your <Vision Builder AI folder>\API Examples
Hope this helps,
Brad
09-20-2013 04:43 PM
OK, the only reason I am trying to create a custom UI is because the default inspection interface does not function correctly. I've attached a picture showing the problem areas.
I need to be able to see which steps failed (not necessarily all steps, pass and fail.)
I'll post again later.
09-20-2013 04:44 PM
OK, the only reason I am trying to create a custom UI is because the default inspection interface does not function correctly. I've attached a picture showing the problem areas.
I need to be able to see which steps failed (not necessarily all steps, pass and fail.)
I'll post again later.
09-20-2013 07:21 PM
Thanks for the screenshot. Now I have a better idea what you're trying to do. Here is a sample inspection that might give you some new ideas for how to do it.
Two ideas shown in this example include:
1. Overlaying the failed parts. The overlay position could even be based on a previous point so it could move with your parts.
2. Use a Calculator step to build a string of the failed parts. This string could be overlaid on the image or you could use a custom UI anddisplay this string of the failed steps in a string on the custom UI.
Both of these approaches requires manual work for each result. There isn't a good way to dynamically handle getting all the results as you add more steps. If you need something that is more dynamic, you can either check out the API idea mentioned earlier or do everything in your programming language of choice.
I reproduced your issue with the scroll bar of results table in the Default UI not moving, so I will fix this for the next version.
Hope this helps,
Brad
09-23-2013 08:34 AM
Thank you for looking into this for me. I'll take a look at the sample you've provided and see what I can do.