loading
 
Weld defect detection
Paul from Mexico  [5 posts]
6 years
Steven,

I'm still experimenting with the issue to find the 2 points where the weld ends and calculate the distance between, and answer as "PASS" or "FAIL" welded part. The RIO background is completelly white, so now is easier to evaluate.

Also my PLC is communicating with RoboRealm using the Serial module, and works fine. I'm sending several strings to tell the result to the PLC, like "pass" or "fail" or "part not present"; and the PLC replies with "part ready"... (Please see my previous posts to get files or images needed).

Now my question is how to create a log file of the "FAIL" tests with the image saved into disk. For example, the image name would be:

image_[number]_[date].jpg

And the log file would save all the info about the part in a text file:

...
...
image_1_01172011.jpg
FAIL
[CALCULATE DISTANCE]
[time]
...
...
image_2_01172011.jpg
FAIL
[CALCULATE DISTANCE]
[time]
...
...


I would appreciate your help so much.

Thank you!
Anonymous 6 years
Paul,

You would have to use a VBScript or other programming module to create the actual filename. Perhaps something like

SetVariable "filename",  "image_" & GetVariable("IMAGE_COUNT") & "_" & Replace(FormatDateTime(Date(),2), "/", "_") & ".jpg"

and then use a Write_Image module with

[filename] specified as the filename (with the [] around the word).

Then use the Write_Text module to generate the log file as you have specified above.

Note that all of these should be included only if failed ... you can use the IF_statement module to eliminate Pass code from executing these next 3 modules.

Note, the Write Text module was just released so you probably do not have that. You can use your original download link to get the latest version with that update.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index