11-15-2007 08:59 AM
11-16-2007 09:16 AM
Hello Mark,
I know we discussed this issue over the phone yesterday but I am going to go ahead and post this example in case other people have the same question. The attached example uses the property and invoke nodes to populate the front panel combo boxes with the inspections states, steps, and measurements within those steps. It will then return the value from the specified measurement. A trick is to call the RefreshResults invoke node after the Steps property node. The VI's front panel contains instructions on running the example.
04-22-2009 10:08 AM
Carlton,
Thank you for the post.
I am trying to use your activex VI you posted. I have activeX controls working in my application already, but am trying to access the measurements. However, when I use your program (and change the NIVBAI target control to version 3.6 of VBAI for my application), I get errors from your VI. The error occurs when the ActiveX node "NIVBAI.Step - Result" passes a null "0" value to the next node "NIVBAI.StepResult - Measurements". This has occurred over and over again, and I cannot get around it.
-Chris W
04-23-2009 10:07 AM
Chris,
I just opened the example and encountered similar problems. I was able to get it to work by deleting and reinserting the NIVBAI Target Control. Also, it will not work with LabVIEW 8.6, but with 8.5 it works fine.
I hope this helps,
-Christina
04-24-2009 10:48 AM
Christina,
Are you using LV 8.5 or 8.5.1? Also, you said it worked, I assume you mean that you were able to see the measurements, not just the states and steps? The VI works fine up until that point. I also tried deleting and reinserting NIVBAI_Target_control activex control but that didn't make a difference for me. Thank you for your reply.
-Chris W
04-27-2009 10:27 AM
Chris,
I am using 8.5.1, and have been using this to run some of the example inspections that ship with VBAI. Using those I am able to see both the states and the measurements. Are you trying this program with your own VBAI script or using our examples? If you haven't already, I would definitely recommend using one of the example scripts (from the Program Files\National Instruments\Vision Builder AI\Examples folder). What exactly happens when you try to see the different measurements? Does the program just return no data, or bad data, or hang?
-Christina
04-27-2009 10:43 AM
Thanks for the reply.
Actually, Carlton's program above, ActiveX_vbai.vi exhibits strange behavior in that it outputs the state and step names but not the measurement names. It will output the measurement names after I first inspect, but this procedure differs even from the steps that Carlton lists in his program for how to run the script. This happens when I use the spraybottle example that ships with vbai. Is this what happens in your case too?
When I use my own vbai program, I cannot even get Carlton's example to complete at all. It always outputs a NULL value from NIVBAI_Step.Result which errors out the following property node NIVBAI_StepResult.Measurement and Stops the VI on this error. I don't know how my own vbai program differs from the spraybottle example to cause this behavior to occur. Any ideas?
04-28-2009 09:41 AM
Hey Chris,
I had a chance to run the example vi and did notice the same behavior that you described. In terms of your own VBAI script, does the script run fine in VBAI? You compare it to the spray bottle example, did you simply recreate the spray bottle example on your own to see if you could get the LabVIEW ActiveX routine working? If this is the case, maybe taking a closer look at the specific steps will be helpful. Also, maybe posting your VBAI script will give a better idea of your script, especially if you are using the spray bottle pictures that we all have.
Hope this helps.
-Ben