|
Prev: Sudoku
Next: how to configure modbus using LabVIEW?
From: Greg Shearer on 8 Dec 2005 20:40 Hi all, Hope this is the most appropriate board. Couldn't see one for machine vision software. Please let me know if I should post some where else. I'm in the process of configuring Vision Builder for a 2 camera industrial measurement application. Seems pretty much ideal for my application. One thing I've found in trying to account for initial conditions, is that min/max functions would be very handy within the calculator module. That is, a block which would simply pass the min or max value of the input since start of the inspection. Does anyone know if min/max functions can be constructed from the available functions? I've tried, but haven't found a way. If not possible, my application will survive, but it would be good if these functions could be provided in the future. Any advice appreciated! Greg Shearer
From: Lorne H. on 9 Dec 2005 18:10 Greg, Good news! You can do what you want by combining a "greater than" function with a "selector" function. I have attached a screenshot showing how I accomplished your request. Basically you use the "greater than" symbol to determine which input is larger and then use the "selector" to select the larger input based off of the output of the "greater than" function. If I did not answer your question please inform me. Lorne Hengst Application EngineerNational Instruments maxmin.zip: http://forums.ni.com/attachments/ni/170/156090/1/maxmin.zip
From: Greg Shearer on 10 Dec 2005 18:40 Lorne, Thanks for your response. Very elegant! Unfortunately I don't think its quite what I need, although I'm going to keep thinking along those lines. I'm not very experienced with the calculator environment yet and I'm sure there are a lot of features I simply haven't realised yet. What I'm really trying to do is register the initial value of a measurement. The application is to measure extension of steel cable as it undergoes destructive tensile testing. The cable has white cable ties applied as gauge markings at nominal 600mm separation. Ideally, the system output will be actual extension since the beginning of the test. This is easy to determine accurately if the initial sample gauge length can be captured. This is where I thought a 'min' function block would be handy. However, the measurement is not being compared with any other measurement, just its previous value. So, the 'min' block I had in mind would only have one input and would simply pass the lowest value seen since start of the inspection. What I haven't found is a way of structuring the inspection which supports this requirement. That is, outputs determined at a point some way through an inspection can't be referenced by a calculation located earlier in the inspection. Alternative to a 'min' function would be an 'initial value' or 'first scan' type function block which would allow for capturing a value to an output on the first scan of the inspection only. This value could then be used in all subsequent scans to determine the actual change from initial value. Anyway, I know all this could be achieved within the LabView environment, but the Vision Builder AI system is basically all that is needed for this application. As it is, I'm sure my application will work fine by simply subtracting my nominal gauge length of 600mm from all measurements. It just means that, depending on the exact positioning of the gauge marks, the system will generally report slight +ve or -ve extension at the beginning of inspections. Subsequent data processing can correct this offset, so no real drama in this situation ... just not particularly elegant! Thanks again for your reply. If you can see I'm missing something pretty basic conceptually, PLEASE let me know. I have to say that I've been very impressed with the power and ease of use of the Vision Builder AI environment. Greg
From: Lorne H. on 12 Dec 2005 23:10 Greg, Thanks for explaining the issue more thoroughly. I am still a bit confused regarding why you are unable to do what you want. Originally I thought you wanted to pass the value inside the same inspection. Is the problem that you are unable to pass this minimum value from one inspection to another? If you are dealing with multiple inspections and want to pass the minimum value from inspection to inspection, then you are in luck. You can use Datasocket to store your minimum value, Datasocket can act as a global variable storage mechanism. I am convinced that you can do what you want fairly easily in Vision Builder, but I think I need more information about your application. Below is how I understand your application, please tell me if I misunderstood anything. You have a long steel cable that you are stretching until it snaps. Along the length of the cable you have many white cable ties initially spaced 600mm apart. As the cable stretches you are measuring the distance between the cable ties so that you can see how the cable is stretching. Questions:How exactly are you using Vision Builder to measure the distance between the cable ties?a. Do you run 1 inspection for each pair of cable ties (50 cable ties would be 49 inspections)?b. Or, do you just run one inspection which measures the distance between all of the cable ties? Do I understand your system correctly or am I completely off base? Like I said, I am 99% sure that you can do what you want in Vision Builder. Lorne HengstApplication EngineerNational Instruments
From: Greg Shearer on 13 Dec 2005 00:40
Lorne, You're not too far off base, although the inspection I'm doing is simpler than your interpretation. Absolutely correct on stretching steel sample until it breaks. However there are only 2 cable ties (gauge marks) involved, one near each end of the sample. There is also only the one inspection, and it is really very similar to the example 'Tutorial 5 - Two cameras inspection' supplied with the current Vision Builder release. I first saw this example on the NI website and was very impressed, as it is very similar to the application I'm building. The system I'm building is replacing an older custom built system, and feeds data serially to a quality control system. I may replace this with a TCP interface in the near future. So, my inspection uses 2 cameras, one directed at each gauge mark. Calibration of the two images is OK, much as in the NI example. Also, I have a 'standard' gauge bar with a range of engraved markings, which allows calibration of the image separation of the cameras. Again, much as per the NI example. This means that after calibration will be able to place a marked sample into the test rig and tell exactly the separation of the gauge marks. This is fine, and will be very close to ... but not exactly ... 600mm, but what the inspection needs to report is the sample extension from the commencement of the inspection, NOT the absolute length of the sample. So, ideally, on the first pass of the inspection the value reported should be 0.000mm. That is, current gauge separation minus the original gauge separation. Then, as load is applied and the sample stretches, the extension (current measurement minus original) should increase. Just for your information, the material being tested is called steel strand (used for bridge cables, concrete reinforcement etc). We typically record extension only up to about 1.5% (9mm) during testing, but the sample is tested to breaking. The thing I haven't been able to figure out is how to capture the original gauge separation for use as I've described. As mentioned in my earlier posts, I've imagined a 'min' function or 'first scan trigger' would be required to allow capture of what is effectively an initial condition. If you know of a way to capture and retain initial conditions e.g. a measurement, during the first scan of an inspection, then that is what I need! But PLEASE don't spend too much time or effort on this enquiry. As I mentioned earlier, I can correct for any initial offset within the quality system data processing environment. The quality system records the progress of each sample test (or inspection), recording both extension data (from the Vision Builder application) and tensile data from another interface. As we know there should be 0 extension at the commencement of an inspection, any initial offset from 0 can be corrected by the quality system. I'm not really expecting Vision Builder to do any more. I've already been very impressed with what can be done with very little programming effort. I just thought I'd ask the question in case I'm missing something obvious, and I can see having knowledge of initial conditions may be useful in other applications. At this stage, I intend determining the extension figure as current measurement minus 600mm. As the initial gauge markings won't be at exactly 600mm, this will result in a small +ve or -ve offset at the beginning of each inspection. I expect this offset will barely be significant, and can be corrected within the quality system. Out of interest, I'm commencing installation of the new equipment tomorrow and hope to have it up and running within a couple of days. I'll let you know how I go! One thing I'm not really sure about is the precision I'll get from the system, although I expect it will be q |