VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7 when Deploy with API VS + gateway

Hi,

 

I'm using VeriStand 2012 and Labview 2012.

 

I open VS gateway by DLL node.

I want to deploy my NIVSDF with Veristand API and exit gateway.

 

But I have the error 7 at the deployment.

 

I am sure, my nivssdf is good beacause i have tested it manually in Veristand 2012 before.

 

I have attached a picture of my VI and when the error appears.

 

The problem appears with all my nivssdf even the Ni Veristand example "Sinwave Delay".

 

Rodolphe

 

0 Kudos
Message 1 of 11
(6,614 Views)

To use the gateway directly and therefore use NI VeriStand silently, the gateway must be launched from the same location that NI VeriStand.exe resides. You cannot launch it from your application unless it also resides in:

C:\Program Files (x86)\National Instruments\VeriStand 2012

 

Therefore I typically use an exe placed in this directly that just runs the gateway when launched. Then I send a UDP command from my application to this EXE to shut down when my application is shutting down

 

See the attachment for how to do this and the exe I use.

Stephen B
0 Kudos
Message 2 of 11
(6,604 Views)

Thanks for your answer.

 

I see your solution on an other but i don't understand why I must use an other exe located in veristand installation folder.

 

With Veristand 2010, the same vi was successful.

 

Moreover, your exe located in veristand folder do the same operation.

 

My vi was inspired of your example attached.

 

I have just put "start VS gateway" and "stop VS gateway" in my application to avoid use the VeriStand Silent exe.

 

Can you give me details of the problem?

 

I will try with your exe and it do the same result (see the picture attached, the SilentVS.exe crashes and TestSilentVS.vi is locked in deployment step).

 

Rodolphe.

0 Kudos
Message 3 of 11
(6,596 Views)

I just tried the attachment zip file's contents and saw the same error.

 

I was able to resolve the error by making these changes:

  • Used the project to rebuild SilentVeriStand.exe (it was last built with LV 2011)
  • Copied the new build of SilentVeriStand.exe to <Program Files>\National Instruments\VeriStand 2012\
  • Edited OpenVS(Silent).vi to change the path to VeriStand 2012 (instead of 2011)
  • Changed the front panel control to point to the 2012 path for sinewave delay.nivssdf (instead of 2011)

working 2012.png

 

You are correct, you dont have to call the gateway directly from this location (via this exe), but it is recommended to do so. Certain parts of the gateway rely on this... so things might not work correctly if you dont. For example, reading and writing parameters don't work unless you start the gateway from <Program Files>\National Instruments\VeriStand 2012

Stephen B
0 Kudos
Message 4 of 11
(6,594 Views)

Ok, thanks, I will try rebuild executable tomorrow.

 

But I still don't understand how it's possible to open VS gateway in an other folder that "Program Files\National Instruments\VeriStand 2012" because i start Veristand gateway by calling "NIVeristand...Gateway.dll" that is located in "Program Files\National Instruments\VeriStand 2012\Data".

 

What bothers me, is to use an additionnal executable which, in my opinion, can be avoid.

 

I will inform you after the test.

 

R. Kaszubiak

 

 

0 Kudos
Message 5 of 11
(6,589 Views)

In fact, with the additionnal executable the deployment is successful.

 

It seems in Veristand 2012, "start gateway" and "stop gateway" can't be do in the same time of the openinng workspace reference.

 

Using the 2222 and 2221 ports seem to do a special thing that make the good deployment.

 

I still search a solution about it.

0 Kudos
Message 6 of 11
(6,582 Views)

The issue you are seeing is that VeriStand Gateway is having trouble loading the PC Engine DLL, named NationalInstruments.VeriStand.Engine.dll. This is the component which runs the system definition on a Windows PC. The Gateway itself is running fine, but it is failing to find the PC Engine library (thus error 7). Chances are you would be able to deploy to an RT target just fine, since this doesn't require the PC Engine library.

 

The problem is that the path for the NationalInstruments.VeriStand.Engine.dll library is expected to be relative to the top-level executable's location (LabVIEW.exe or your built executable). Namely:

<executable's directory>\data\NationalInstruments.VeriStand.Engine.dll

Jarrod S.
National Instruments
0 Kudos
Message 7 of 11
(6,563 Views)

Thanks.

 

It seems your solution to add dll like dependancies doesn't work fine.

 

I have attached pictures of my "project", my executable folder with the "Data" folder which contains the dlls and the error popup which is displayed when i execute my application.

 

Normallay, my executable opens the VS gateway, deploys a nivssdf on Windows and close the gateway.

 

I used Labview  and VeriStand 2012.

 

R. Kaszubiak

Download All
0 Kudos
Message 8 of 11
(6,504 Views)

I attach also a picture of the VI wich is compiled.

0 Kudos
Message 9 of 11
(6,502 Views)

Hi,

 

I was facing the same errors.

 

I think that the Engine and Gateway assemblies have dependencies among the other assemblies available in the folder Data.

 

Thus, I copied the ENTIRE Data folder to the root path of my built application and it WORKED.

 

Sans titre.png

 

So, you have to copy the Data folder available in the VeriStand installation directory at the root path of your executable.

 

I don't think it's really an efficient method and it's too bad that we cannot really "embed" VeriStand in a custom application, using VeriStand as a fully transparent engine for the end user.

 

Regards,

Da Helmut
Voir le profil de Maxime M. sur LinkedIn - View Maxime M.'s profile on LinkedIn
Message 10 of 11
(6,488 Views)