From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run time error running Vision Builder AI inspection from TestStand

Hello,
I have TestStand 3.1 and Vision Builder for AI v2.6.1.
I would like to run from TestStand a Vision Builder Program or steps. For to achieve that, I have followed the instructions on Application Note 215, Running a Vision Builder AI Inspection from TestStand.
 
After installation, the option in TestStand InsertStep>NI Vision Builder AI>Inspection works properly.
But when try to execute a step with that inspection, and whatever operation of that one, the result is the following error:
 
Run-Time Error
   Details: Error executing substep 'Post'.
An error occurred calling 'ExecuteStep' in '_NIVBAITestStandSteps' of 'NIVBAITestStandAPI'.
   Error Code: -2147417851; User defined code. Possible System Error: The server sent an exception.
 
  At this point really I don´t know what to do, and I don't find any extra help apart of application note.
  I will appreciate some suggestion.
 
Gonzalo.
0 Kudos
Message 1 of 14
(5,787 Views)

Hello,

in the application note you mention, the last section is an example with one of the tutorial examples included with Vision Builder for AI. Have your tried with that? Do you have also errors?

crisR

0 Kudos
Message 2 of 14
(5,761 Views)
Thanks for your answer, I really need help in order to take a decision of  the way to do the project.
 
I have downloaded all the files and proven them but it follows without working.
0 Kudos
Message 3 of 14
(5,756 Views)

Hello,

I have done a test following the steps commented in the application note and I haven't had any problem or error. I attach you an image when the application has finished.

Maybe the problem you have are the soft versions. I work with TestStand 3.5 and Vision Builder for AI 2.6.1 in win XP SP2

crisR

0 Kudos
Message 4 of 14
(5,746 Views)
   I have installed TestStand 3.5, but the problem continues.
 
   However, I've seen a difference in your photos and is the IP Adress. Yours is "130.164.163.144" while the mine is "127.0.0.1", the address in the application note. I have tried with your address but doesn`t work.
   It seems a problem of remote execution  to works on local machine.
 
   Gonzalo.
 
0 Kudos
Message 5 of 14
(5,725 Views)

Gonzalo,

the IP that I have used is the IP of the target ( Compact Vision System ). As you can see in Connecting to a Target Section, it says "...You can run an inspection from a local computer or from a remote target, such as the NI CVS-1450 Series compact vision system ".

I used a CVS but if you are not using CVS but a desktop PC to run the inspection, the IP that you must insert is the IP of you computer.

I suppose that with this change, you will be able to run it correctly.

Regards

crisR

0 Kudos
Message 6 of 14
(5,713 Views)

   Thanks crisR for all your collaboration.

   I understand that when working on a local computer the ip should be 127.0.0.1, following the instructions of ap. note.

   Despite I have modified step "connect to Target..." with the IP given back by ipconfig command, and again it doesn`t work. The fail message is always the same (the first one). Also this would force to me to be connected to a local network to have an assigned IP and in addition static address.

Regards,

Gonzalo

 

0 Kudos
Message 7 of 14
(5,703 Views)

Gonzalo,

I have tried again and when I run the sequence with my lP, sometimes I got the following error, but sometimes no. I don't understand why.

Error executing substep 'Post'.
An error occurred calling 'ExecuteStep' in '_NIVBAITestStandSteps' of 'NIVBAITestStandAPI'
Vision Builder AI Error
 VI Server access denied.

-2146827256; User-defined error code.

Step 'Connect' of sequence 'MainSequence' in 'VBAI_Inspection_Example.seq'

I will try to do more test and I will let you know what can be happeing.

crisR

0 Kudos
Message 8 of 14
(5,697 Views)

Hello,

I've found some more information that may help.  Since these TestStand steps are simply call a DLL with an exported ActiveX API, path issues may exist.  In fact, the overwhelming number of times this error appears, paths seems to be the case. I am not sure why the error is an indication of a path issue, but that seems to be the case.  I would recommend that you would reregister the DLL, this time in the same directory as the example sequence.  To do this:

- Unregister the current DLL by going to Start Menu>>Run, and typing: regsvr32 /u NIVBAITestStandAPI.dll
- Move the DLL from the system32 folder to the folder in which the example sequence is saved.
- Reregister the DLL from the run command (regsvr32 <folder path>\NIVBAITestStandAPI.dll)
- Restart TestStand if it is open
 
I apologize for not having any concrete answers, but this one is proving tough without me being able to replicate the issue.
 
crisR
0 Kudos
Message 9 of 14
(5,671 Views)

   Thanks for your effort in solving the problem, but unfortunately it doesn't work.

   Although the application is interesting , due the time,  I will take another way, that will be to convert the application from vision builder to a VI of labview, thus I call it from teststand.

   Thanks again, anyway I will test any idea.

0 Kudos
Message 10 of 14
(5,651 Views)