This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net server does not connect and collect text data after code is compiled

Ok, I have this code that was modified from code supplied by the camera manufacturer.  It works as a project as specified, however after setting up the project and compiling the code it does not work properly.  The .exe code runs, but it does not appear to connect or open the .net server to the camera.

 

Any help would be appreciated.

 

mark

0 Kudos
Message 1 of 12
(4,179 Views)

I'm not sure how you expect us to help. You've provided no code, or explained what this .NET interface is, or what you are providing to that specific method, or how you are getting the values that you are providing to that method. We are not mind readers.

 

Check the values that you are providing to the method. I don't know what else I can say beyond that.

0 Kudos
Message 2 of 12
(4,177 Views)

never might, I'll wait for somemone nice...  wow? thanks for making feel like a jack ars! I quess I would be using this forum again...

0 Kudos
Message 3 of 12
(4,172 Views)

Have you already run a search for that error?  I'm not a .NET expert, but my understanding is that LabVIEW is sometimes able to locate .NET DLLs when running in the development environment but can't find them in an EXE.  Putting the DLL (and possibly any other custom DLLs that it requires) in the same directory as the executable may solve this problem, see this thread: http://forums.ni.com/t5/LabVIEW/Net-Error-1172-when-EXE-built/m-p/1036515

Without details it's going to be impossible to provide you with more assistance; from the information you provided, all we can do is offer generic solutions to .NET problems.

Message 4 of 12
(4,168 Views)

I think you misread the intention of my response. I wasn't being mean. I was expressing helplessness at figuring out how to try to help you. Basically, you said: "I'm calling this method. I'm not explaining what it does, or how it works, or what inputs I'm providing, or providing any documentation, or any code. I have this error. What's the cause?" Now, if someone came to you with that, how would you be able to tell them what's wrong?

0 Kudos
Message 5 of 12
(4,166 Views)

@nathand wrote:

Have you already run a search for that error?  I'm not a .NET expert, but my understanding is that LabVIEW is sometimes able to locate .NET DLLs when running in the development environment but can't find them in an EXE. 


That does not appear to be the case here, since the method is basically saying "you gave me bogus information, so I'm going to generate an error". Thus, the assembly was actually found and run.

0 Kudos
Message 6 of 12
(4,163 Views)

ok,  thanks for responding.  The dierectory location does not appear to help.  The error 1172 occurs when I press the start button in the GUI, but I beleive that is only symptom of the .net server not starting properly. Here is why I say this.

 

1.  When I run the project file, it opens the BeamGage Software program and creates a connection to it such that vi operates.  Start or stop data acq,  perform a calibration, and stop the connection to the server.

 

2. It works the same when I use the factory supplied .exe file.

 

 

3. After I compile the program, and it compiles with not errors. I run the .exe.  The vi opens but it does not start the BeamGage program nor create a connection to it.  So somehow (I suspect) the DLLs are not being invoked.   I moved the DLL around and they're now "Always Included" in the build specification.  Maybe, something to do with the directory structure, or I'm missing a DLL that I don't know I need?

 

 

oh yeah, i attached some files to look at, just in case...

 

Thanks

0 Kudos
Message 7 of 12
(4,135 Views)

Hey Mark,

 

I have a couple of suggestions:

 

  1.  When you build your .exe have you tried un checking “Remove unused members of project libraries” under Additional Exclusions?
  2. Try to register the DLL with the Global Assembly Cash.  To do this drag and drop the DLL into c:\Windows\assembly.  Windows will automatically register it with the GAC.  Now go through your code and point to the instance of the DLL located in Assembly not in the local folder, the way you have done previously. 

 

Regards,

Kira T

0 Kudos
Message 8 of 12
(4,113 Views)
  1. When you build your .exe have you tried un checking “Remove unused members of project libraries” under Additional Exclusions?

- It was checked, but I don't recall checking myself.

 

2. Try to register the DLL with the Global Assembly Cash.  To do this drag and drop the DLL into c:\Windows\assembly.  Windows will automatically register it with the GAC.  Now go through your code and point to the instance of the DLL located in Assembly not in the local folder, the way you have done previously.

 

- I will try this,

0 Kudos
Message 9 of 12
(4,103 Views)

I'm not sure if this is still a problem for you, but I have also been playing around with the Spiricon BeamGage tools, and it seems like two things are required to run an EXE:

1 - Copy the "BGPTotalPeakExample_xXX.exe.config" file found in the Spiricon example code to the same directory as your application.  Rename it to "MyApplicationName.exe.config" where MyApplicationName is the name of, well, your application.

2 - Right click on your EXE, select and select "Properties".  In the "Compatibility" tab check the "Run this application as an administrator" option.

 

0 Kudos
Message 10 of 12
(4,039 Views)