10-18-2010 04:20 AM
Hi there,
I have developed a machine vision program to count the number of pixels of a certain image continuously (vision builder). I then migrated the VBAI script to labview via the function "migrate to labview" within Vision Builder. What I want to do is to show the pixel count on the front panel and ultimately connect it to a PID loop.
Does anyone know how to get the pixel count data to show on the front panel? I can't seem to find the data stream and when I find something that looks like it I can't get it on the front panel because Labview says it can't.
Thanks in advance Jan-Willem
ps: I added the VBAI script, the labview migrated codes where to large to attach here
10-18-2010 08:25 AM
Here's a simple example that illustrates how to get measurements from specific steps using the generated code from Vision Builder AI.
Extract the files in this zip and look at the Inspect Main.vi (LabVIEW 8.5 or higher).
Hope this helps,
Brad
10-18-2010 09:23 AM
Hey Brad,
Thanks for your help so far, I am not able to really understand what you have exactly changed. I do see a new orange colored item which forms on the front panel some sort of numerical value but if I replace this unit to the place where I actually find the nr of pixels than it does not show up at the front panel. Probably I don't understand enough of this all but I am reading and trying a lot of stuff so if you have more advises I am really curious (:
gr Jan-Willem
10-18-2010 10:32 AM
If you go to the case corresponding to the state where your Count Pixel step is, open the Inspect State Exec 1.vi.
You'll see sub-VIs for all the step you called in this state. Locate the function you're interested in getting the result.
Create an indicator for the Measurements Output Array and add it to the connector pane, so you have access to it the caller VI. The Measurements output is an array of all the results produced by this step. You can index the one you're interested in.
The Result Type field of the cluster tells you which of the Nymeric, Boolean or String Value you should use to get access to the value of the result.
Christophe
10-18-2010 10:44 AM
ok Christophe,
I will try and do that tomorrow, I will let you know if it worked ! Thanks Mate !
gr Jan-Willem