Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I simulate an acquisition of a working folder?

Solved!
Go to solution

Hello, 

I am using vision builder to run an inspection, and I am filtering images that pass an inspection and images that don't and saving each one in a different folder.  I want that whenver there's a bad image a copy of the last "good image" is saved into the good image folder, e.g. repeat the last good image, what I did was to simulate an acquisition from the folder I am saving the good images, and if the inspection fails the go to a new state where it copies the last good image to the good image folder, does this make sense?  SOmetimes this seems to work , sometimes it doesn't , the secon simulate acquisition doesn't seem to update (I have the "cycle thorugh folder" option activated.   What can I do?

 

Another problem I have is for logging images I need to append a timestamp, is it possible to chaneg this setting and add a number to the name of the file? e.g. image001, image 002, image 003?

 

Thanks

0 Kudos
Message 1 of 5
(4,201 Views)
Solution
Accepted by topic author IvanUSC

In Vision Builder 2012 SP1 and earlier, the Simulate Acquisition step does not rescan the folder it is pointing to.

However, we added that feature in Vision Builder AI 2013, which just released.

Feel free to give it a try. The download and evaluation is free:

http://joule.ni.com/nidu/cds/view/p/id/4450/lang/en

 

Hope that answers why you're not getting the expected results.

 

Christophe

0 Kudos
Message 2 of 5
(4,196 Views)

Thank you very much! I will download the new version. For my second question, is it possible to append numbers to the imagge logging instead of appending a time stamp?  So I want to get as output: 

<Name>.001.TIFF

<Name>.002.TIFF

...

<Name>.150.TIFF

 

Is this possible? 

 

Thanks

0 Kudos
Message 3 of 5
(4,189 Views)

It is possible. What I would suggest is building the file name with a Calculator step, that you can find in the last tab (Use Additional Tools).

In the Calculator step, select the # Pass or # Fail System Variable as an input (depending on which state you're in).

Add a new result output "Image Name" of type string. Click Finish.

Drop a Format into String from the string palette. Create a constant "Image %d.tif" for the format string, and connect the Variables - System Vatiable - # Pass to the DBL input of the Format string primitive. Connect the resulting string of the Format String primitive to your Image Name output.

Select the Measurements tab and click Compute Results to make sure that the function works as expected.

OK the step.

Then, in the Image Logging step, select the result from the calculator step from the File Name pulldown.

 

Let me know if you're having problems doing it and need an example.

 

Hope this helps.

 

Best regards.

 

Christophe

 

PS: For the # Pass and # Fail system variables to be updated, you will need to insert a Set Inspection Status step once you have computed the final pass/fail criteria for your part. That step updates the VBAI statistics.

0 Kudos
Message 4 of 5
(4,186 Views)

Thank you so much for your input, the calculator step worked perfectly! 

 

 

 

0 Kudos
Message 5 of 5
(4,160 Views)