Reported In
Reported In shows products that are verified to work for the solution described in this article. This solution might also apply to other similar products or applications.
Issue Details
My Veristand project workspace is now appearing empty and when I close it returns the following error. How can I resolve it?
Error 1172 occurred at Invoke Node Error calling method NationalInstruments.VeriStand.SystemStorage.DocumentType.SaveSystemStorageFile, (System.ArgumentNullException: Key cannot be null. Parameter name: key) Possible reason(s): LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation. System.ArgumentNullException in NIVS_DataStorage.lvlib:SaveDataXMLFile.vi->NIVS_Screen File Storage.lvlib:Save Screen File.vi -> Workspace.vi
Solution
This issue happens due to a missing or corrupted .nivsscreen user interface file within the project directory. To fix it, you will need to restore the file from a backup or create a new user interface using the Veristand Project Explorer.
Was this information helpful?
Hello guys ,
I’m an engineer student , I’m doing a little project , I’m new with Labview and I have some a problem that i couldn’t solve after completing my project .Vi I built a .exe the problem is when I test my Vi it works perfectly :
but when I build it to .exe I have a problem
the error message is
Error 1172 occurred at Nœud de méthode System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Npgsql, Version=2.0.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7’ or one of its dependencies. The system cannot find the file specified.
Possible reason(s):
LabVIEW: Une exception .NET s’est produite dans un assembly externe. Pour obtenir des informations sur comment corriger cette erreur, copiez l’exception suivante (en gras) et recherchez-la sur le site Web MSDN de Microsoft ou sur le Web pour trouver une explication possible.
System.IO.FileNotFoundException dans Config tracecom_BWI(SubVI).vi
I couldn’t find any solution for this problem so I hope that you help me
- Remove From My Forums
-
Question
-
Hello.
I am using CMO Version 4.0 (which is converted to a .NET assembly) from Copley Controls and LabView to create custom programs to run treadmill amplifiers and create user defined velocity profiles.
I have several versions of similar code, ranging from simple controls to more complicated controls. My standard, base program always works. However, after making a few changes to the more complicated code and saving it as a different file, none of my code
works now. I haven’t changing anything to the original, base code and now it doesn’t work.I keep getting the following error and I do not know what it means:
Error 1172 occurred at Error calling method CMLCOMLib.canOpenObj.Initialize, (System.Reflection,.TargetInvocationException:Exception has been thrown by the target of an invocation. Inner Exception: System.Exception:Access Denied)
Possible Reasons: LabVIEW: A .NET exception in an external assembly. For information about correcting this error, copy the following exception (in bold) and search the Microsoft Developer Network Web site or the Web for a possible explanation.
I would appreciate any suggestions.
Thank you.
Answers
-
Thank you for following up. I think the issue was that the device was not initialized because the power strip failed. Once I powered the device, it was able to initialize and the error was resolved.
Sincerely,
Emily Miller
-
Marked as answer by
Tuesday, December 20, 2016 5:58 PM
-
Marked as answer by
Error 1172 occurred at invoke node system reflection targetinvocationexception
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I am using CMO Version 4.0 (which is converted to a .NET assembly) from Copley Controls and LabView to create custom programs to run treadmill amplifiers and create user defined velocity profiles.
I have several versions of similar code, ranging from simple controls to more complicated controls. My standard, base program always works. However, after making a few changes to the more complicated code and saving it as a different file, none of my code works now. I haven’t changing anything to the original, base code and now it doesn’t work.
I keep getting the following error and I do not know what it means:
Error 1172 occurred at Error calling method CMLCOMLib.canOpenObj.Initialize, (System.Reflection,.TargetInvocationException:Exception has been thrown by the target of an invocation. Inner Exception: System.Exception:Access Denied)
Possible Reasons: LabVIEW: A .NET exception in an external assembly. For information about correcting this error, copy the following exception (in bold) and search the Microsoft Developer Network Web site or the Web for a possible explanation.
Источник
Error 1172 occurred at invoke node system reflection targetinvocationexception
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I am using CMO Version 4.0 (which is converted to a .NET assembly) from Copley Controls and LabView to create custom programs to run treadmill amplifiers and create user defined velocity profiles.
I have several versions of similar code, ranging from simple controls to more complicated controls. My standard, base program always works. However, after making a few changes to the more complicated code and saving it as a different file, none of my code works now. I haven’t changing anything to the original, base code and now it doesn’t work.
I keep getting the following error and I do not know what it means:
Error 1172 occurred at Error calling method CMLCOMLib.canOpenObj.Initialize, (System.Reflection,.TargetInvocationException:Exception has been thrown by the target of an invocation. Inner Exception: System.Exception:Access Denied)
Possible Reasons: LabVIEW: A .NET exception in an external assembly. For information about correcting this error, copy the following exception (in bold) and search the Microsoft Developer Network Web site or the Web for a possible explanation.
Источник
LabVIEW
Error «1172» When calling .net assembly
Error «1172» When calling .net assembly
09-19-2017 04:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
I am working on a program I got from a colleague.
I have a simple init vi referencing a constructor in a dll located in the same path as the vi (the path is under c:). I get Error «1172». I have another vi referencing the same dll but now located in another path (still under c:). That works fine. Now that the other dll is in memory init.vi runs fine. I can not explain this behavior!
Microsoft .NET framework 4.7
Re: Error «1172» When calling .net assembly
09-19-2017 07:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
I also had a similar problem, do you mean you get the error «1172 — System.NullReferenceException»?
I have a VI referencing different constructors of a DLL. All of the constructors work fine except for the most important one, to get the measurements results . Do you mean that if you move the DLL in a different path on C (i have it on a server) it works for you?
Re: Error «1172» When calling .net assembly
09-20-2017 12:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
The error I get is:
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified.
using LabVIEW 15, 64 bit.
Re: Error «1172» When calling .net assembly
09-20-2017 12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
Do you mean that if you move the DLL in a different path on C (i have it on a server) it works for you?
When I move the dll to the path (on C) where the calling vi is (init.vi) then I get Error 1172.
Re: Error «1172» When calling .net assembly
09-20-2017 01:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
For me the error is the following:
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.NullReferenceException: The object reference is not set to an instance of an object.
Possible reason (s):
LabVIEW: A .NET exception occurred in an external assembly.
. and only for one funtion I call on the DLL and I call, in the same VI, different functions without errors. Wherever I move the DLL, I cannot make this thing work. I think we have quite similar problem but at least for you it is a small issue as you manage to make the VI working somehow.
Источник
LabVIEW
error 1172 invoke node only in executable
error 1172 invoke node only in executable
07-05-2017 01:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
Hello guys ,
I’m an engineer student , I’m doing a little project , I’m new with Labview and I have some a problem that i couldn’t solve after completing my project .Vi I built a .exe the problem is when I test my Vi it works perfectly :
but when I build it to .exe I have a problem
the error message is
Error 1172 occurred at Nœud de méthode System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Npgsql, Version=2.0.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7’ or one of its dependencies. The system cannot find the file specified.
LabVIEW: Une exception .NET s’est produite dans un assembly externe. Pour obtenir des informations sur comment corriger cette erreur, copiez l’exception suivante (en gras) et recherchez-la sur le site Web MSDN de Microsoft ou sur le Web pour trouver une explication possible.
System.IO.FileNotFoundException dans Config tracecom_BWI(SubVI).vi
I couldn’t find any solution for this problem so I hope that you help me
Источник
LabVIEW
.Net — Get user mail from domain controller — Problem with .net object
.Net — Get user mail from domain controller — Problem with .net object
03-15-2018 02:52 AM — edited 03-15-2018 02:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
I’m struggling to understand why I’m getting the error msg in my simple VI, which should return the mail adress from domain controller for specified user. I have problem with .net object, but I cannot understand why. I will be gratefull for any help.
Error code: 1172
Error msg: Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Reflection.TargetException: Object does not match target type. System.Reflection.TargetException in Get_mail.vi
Re: .Net — Get user mail from domain controller — Problem with .net object
03-15-2018 08:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
I can’t get that far in your example (no idea what domain I should fill in).
What I get from propertyInfo.GetValue, is that object can be null:
object o = propertyInfo.GetValue(myObject, null);
Have you tried to wire a constant to obj? That should be a null object.
Re: .Net — Get user mail from domain controller — Problem with .net object
03-15-2018 08:40 AM — edited 03-15-2018 08:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
In my company I just put our domain name and my user name in domain, but it will not work in your computer. You have to be in domain and try to use your user name. Example:
Domain name: GlobalDomain
User name: dawid.xxx@gmail.com
You cannot leave the obj not connected, you cannot connect constant:( You will get error anyway. I’m really doubt how to deal with it, and where to find a help:(
With constant connected, error msg:
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Reflection.TargetException: Non-static method requires a target.
Re: .Net — Get user mail from domain controller — Problem with .net object
03-15-2018 08:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
In my company I just put our domain name and my user name in domain, but it will not work in your computer. You have to be in domain and try to use your user name. Example:
Domain name: GlobalDomain
User name: dawid.xxx@gmail.com
Yes, but I’m not in a domain.
Re: .Net — Get user mail from domain controller — Problem with .net object
03-15-2018 08:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
In stead of GetValue, I’d try GetType. It won’t solve anything directly, but knowing the expected type might get you further. Use ToString to convert the returned type to a readable format.
Re: .Net — Get user mail from domain controller — Problem with .net object
03-15-2018 09:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
BTW. UserPrinciple has an EmailAddress propertry. If all you want is the email address, why go through the properties?
Also, I think the object needs to be the object you’re querying about. Could that be the UserPrinciple object?
Re: .Net — Get user mail from domain controller — Problem with .net object
03-16-2018 03:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
BTW. UserPrinciple has an EmailAddress propertry. If all you want is the email address, why go through the properties?
Yes, That’s the solution. I can get what I need from there:) Thanks. I did not thought about that. So simple:)
Also, I think the object needs to be the object you’re querying about. Could that be the UserPrinciple object?
Good comment, I think the same, but where to find the answer, what exactly the «GetValue» command needs? You cannot connect reference to obj input.
Re: .Net — Get user mail from domain controller — Problem with .net object
03-16-2018 03:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator
Also, I think the object needs to be the object you’re querying about. Could that be the UserPrinciple object?
Good comment, I think the same, but where to find the answer, what exactly the «GetValue» command needs? You cannot connect reference to obj input.
A lot of the problems with using .NET from LabVIEW come from the fact that C# does them automagically. So the conversion from reference to obj could simply be done by the C# language. Things like this (I thing the entire property construct might be handled under the hood by C#) can make it very hard to find documentation or examples.
I’ve used the C# compiler that is available in .NET to build assemblies to do C# stuff. I don’t like to do it, as it should be possible from LabVIEW, but some things are simply not possible in LabVIEW at the moment. For instance overwriting class members in a child class. That is a pretty normal thing in some corners of .NET.
Источник
Hi everyone,
I posted this over in the NI forums as well, but maybe I’ll have more luck over here.
I just ran into an issue this morning after building an executable version of my program, which uses the Actor Framework. It contains a .NET control (version 3.5) on one of my front panels. There’s a function that I call to pass some XML strings to the control, which then handles filling in the data. This works just as expected in the development environment, but when I build an executable and run that, the control just sits there without being properly filled in. I attached an error indicator to the invoke node, which is showing me this error:
Error calling method InstrumentDataGridView.InstrumentDataGridView.LabVIEW_FillTableFromXML, (System.ArgumentNullException: Key cannot be null.Parameter name: key) <append><b>System.ArgumentNullException</b> in Experiment UI.lvlib:Experiment UI Panel.lvclass:Actor Core.vi:1->Actor Framework.lvlib:Actor.lvclass:Actor.vi:4->Actor Framework.lvlib:Actor.lvclass:Actor.vi.ACBRProxyCaller.D140000E
I then ran DebugView to get some more detailed information on what was happening and here’s the log that it spit out:
00000006 80.98936462 [3404] Created new AppDomain: ICAS-EPR.exe for Reflection 00000007 82.80818939 [3404] Created new AppDomain: ICAS-EPR.exe for Run 00000008 85.75064087 [3404] DNError: Error calling method InstrumentDataGridView.InstrumentDataGridView.LabVIEW_NotifyAcquisitionStopped (1172). System.ArgumentNullException: Key cannot be null. 00000009 85.75064087 [3404] Parameter name: key 00000010 85.75064087 [3404] at System.Collections.Hashtable.get_Item(Object key) 00000011 85.75064087 [3404] at NationalInstruments.LabVIEW.SyncInvokeTable.LookupControl(Object key) 00000012 85.75064087 [3404] at NationalInstruments.LabVIEW.DNRuntime.InvokeMethod(Int32 invokeType, Type type, ObjectId objectId, String methodName, Type[] parameterTypes, Int32[] parameterFlags, ObjectId[]& parameterIds) 00000013 85.75064087 [3404] 00000014 114.37963104 [3404] DNError: Error calling method InstrumentDataGridView.InstrumentDataGridView.LabVIEW_FillTableFromXML (1172). System.ArgumentNullException: Key cannot be null. 00000015 114.37963104 [3404] Parameter name: key 00000016 114.37963104 [3404] at System.Collections.Hashtable.get_Item(Object key) 00000017 114.37963104 [3404] at NationalInstruments.LabVIEW.SyncInvokeTable.LookupControl(Object key) 00000018 114.37963104 [3404] at NationalInstruments.LabVIEW.DNRuntime.InvokeMethod(Int32 invokeType, Type type, ObjectId objectId, String methodName, Type[] parameterTypes, Int32[] parameterFlags, ObjectId[]& parameterIds) 00000019 114.37963104 [3404] 00000020 133.64822388 [3404] Destroying AppDomain: ICAS-EPR.exe for Reflection 00000021 133.68054199 [3404] Destroying AppDomain: ICAS-EPR.exe for Run
As you can see, I get a «System.ArgumentNullException: Key cannot be null.» error when calling both LabVIEW_NotifyAcquisitionStopped and LabVIEW_FillTableFromXML. Neither of these functions throw that type of exception. I thought that maybe the constructor wasn’t being called, but I added some code to the constructor to write to a file and that functioned as expected. Then I wrote a new function that wrote to a file and called that when the VI loaded. That function worked fine and didn’t throw any errors.
I am completely stumped as to why this is happening. Both the development environment and the executable use the exact same DLL code. I appreciate any help I can get!
- Forum
- Access Forums
- Import/Export Data
- Error 1172 while sending attachment to database in LabVIEW
-
Error 1172 while sending attachment to database in LabVIEW
Hello everyone,
I am currently working on a program in LabVIEW in which I want to send an attachment (text file) to database in Access 2010. I found the following solution:
https://decibel.ni.com/content/docs/DOC-12108
which I’ve tried to use in the software. Now, when I try to attach the same file sometimes it is successful, but sometimes when subVI is called, program does not work properly.
I have a problem with a constructor node,
(Microsoft.Office.interop.access.dao.dll). The problem is, that sometimes when the assembly is called, I get an Error 1172 which says:Constructor Node Error creating instance of DBEngineClass in assembly Microsoft.Office.Interop.Access.Dao.DBEngineClass, Microsoft.Office.Interop.Access.Dao, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, (System.Runtime.InteropServices.COMException: Creating model component instance COM ID: CLSID {CD7791B9-43FD-42C5-AE42-8DD2811F0419} from element IClassFactory failed due to error: 80010105 Server caused exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)).) <append><b>System.Runtime.InteropServices.COMExcep tion</b> in fileup_access07_82.vi
When I restart the program it sometimes works properly again, and I may attach file a few times, but after some time an error occurs once more. I’m working in LV2014, Windows 8.1 64 bit.
Do you have any ideas what is going on with this software?
-
Seems to be a LabVIEW issue, not Access question.
I don’t have LabVIEW so I expect cannot explore the download file from that thread.
Similar Threads
-
Replies: 1
Last Post: 02-13-2014, 05:16 AM
-
Replies: 3
Last Post: 12-19-2012, 12:43 PM
-
Replies: 1
Last Post: 03-19-2012, 04:29 PM
-
Replies: 16
Last Post: 02-09-2012, 12:07 PM
-
Replies: 0
Last Post: 07-06-2010, 08:12 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
- BB code is On
- Smilies are On
- [IMG] code is On
- [VIDEO] code is On
- HTML code is Off
Forum Rules
Overview
This is a sample LabVIEW .vi which uses .NET to call into
Wasatch.NET,
Wasatch Photonics’ primary open-source library for controlling spectrometers from
Windows.
As such, the API utilized by Wasatch.LV is that published by Wasatch.NET, which
can be reviewed at any of the following links:
- Rendered Doxygen, e.g.:
- WasatchNET.IDriver and Driver
- WasatchNET.ISpectrometer and Spectrometer
- WasatchNET.IEEPROM and EEPROM
Note that Wasatch.NET itself is simply a C# wrapper over the spectrometers’ USB
API, implemented in firmware and published in the following engineering specifications:
- ENG-0001 FID USB API
- ENG-0034 EEPROM Specification
For NXG instructions, see NXG.
Dependencies
The LabVIEW demo requires Wasatch.NET
(2.3.14 or later recommended).
Please download and run either the 32-bit or 64-bit (see below) installer for Wasatch.NET
and follow the driver installation process before attempting to run the WasatchDemo.vi.
Architecture (Bitness)
This demo has been tested on LabVIEW 2018 32-bit and LabVIEW 2018 64-bit.
If you are using 32-bit LabVIEW (the typical case, even on 64-bit Windows),
then you should install the 32-bit version of Wasatch.NET.
If you are using 64-bit LabVIEW, then you should install the 64-bit version of Wasatch.NET.
When you first open the WasatchDemo.vi, it may ask you to point it to the location of
WasatchNET.dll on your system. That will typically be one of the following two paths,
depending on which version of the driver you installed:
- C:Program FilesWasatch PhotonicsWasatch.NETWasatchNET.dll
- C:Program Files (x86)Wasatch PhotonicsWasatch.NETWasatchNET.dll
Tutorial
Here’s a quick tutorial on how to create a LabVIEW Virtual Instrument (.vi)
controlling Wasatch Photonics spectrometers using our Wasatch.NET DLL.
Step 1: Create a blank .vi
Step 2: From Block Diagram, Display the Functions Palette
Step 3: Select Connectivity -> .NET -> Invoke Node from Functions Palette
Step 4: Drop the «.NET Invoke Node» control onto the Block Diagram
Step 5: Browse to the .NET DLL for this Node
Now you have to tell LabVIEW which DLL will provide the functionality for this .NET node,
since it has no «incoming reference» from a previous node to infer such things. Fortunately
you only have to do this once per .vi, and can share the reference thereafter.
Step 6: Navigate to WasatchNET.dll
Step 7: Select the WasatchNET.Driver class
Here you select the top-level class exposed by WasatchNET.dll that you wish to reference
through the .NET Node. The Driver class is what we want: it’s the starting point from which
you can dig down into all the Wasatch.NET goodness.
These are the API docs for the WasatchNET.Driver class which we’ll be using:
- WasatchNET.Driver
Step 8: Select Driver.getInstance() Static Method
To actually call the Driver class’s getInstance() static method, you can select it from the
«Method» drop-down. Note that static methods are indicated with a leading [S].
Step 9: Add some more .NET Invoke Node controls
Let’s go ahead and drop several more .NET Invoke Node controls onto the block diagram.
We’ll wire them up shortly to step through the spectrometer initialization sequence.
Step 10: Wire Driver Reference to Invoke Node
Wire the output reference from Driver.getInstance() to the input reference of the next
.NET Invoke Node control. This will change the previously unlabeled .NET node into a
Driver node. (It will infer its .NET class from the output type of Driver.getInstance).
Step 11: Call Driver.openAllSpectrometers()
Select the openAllSpectrometers() method of your new Driver object.
Step 12: Relay the Driver reference
Wire the «output» reference from the openAllSpectrometers() control into the input reference
on the next unlabeled Invoke Node control. Note that we’re not taking the output of the
openAllSpectrometers() method (which is actually an integer count of spectrometers found),
but simply re-using and «passing along» the reference to our Driver singleton.
Step 13: Call Driver.getSpectrometer()
Now that the control knows (from its reference) that it’s a Driver object, select its
getSpectrometer() method.
Step 14: Create input parameter
Unlike previous methods we’ve called, the Driver.getSpectrometer() method takes an argument:
the integral index of the spectrometer we wish to control. As long as you have at least one
Wasatch spectrometer connected to the computer, the first should be number 0, so we’ll create
an integer constant «0» to pass into the getSpectrometer() method.
Step 15: Create .NET Node Property
Just for variety, after calling all those .NET Invoke Node controls where we were calling
methods on our Wasatch.NET Driver object, let’s go ahead and create a Property Node as well.
We’ll then wire it up with a reference just like the others, and then select a property to
view (in this case, the spectrometer’s serial number).
Hopefully this is enough to get you started. Feel free to browse the Wasatch.NET API
documentation here, since the .NET classes, methods and properties are identical whether
drawing LabVIEW .vi block diagrams or writing code in C#, MATLAB or other .NET languages.
- http://www.wasatchphotonics.com/api/Wasatch.NET/annotated.html
Building an Executable
I don’t have a permanent license for LabVIEW Application Builder for regular testing,
but I was able to compile an executable application (.exe) from our LabVIEWDemo.vi
using a 30-day evaluation license for Application Builder 8.5.1 using this process.
My .vi was saved from LabVIEW 2018 (32-bit).
Step 1: Build Executable
First I naively used Application Builder to create an application from LabVIEWDemo.vi
with no special settings, which by default it generated as “Application.exe”.
Step 2: Copy DLL dependencies
I tried running the generated Application.exe, and it reported «No spectrometers found,»
as customers have reported.
I then copied WasatchNET.dll, LibUsbDotNet.dll and libusb-1.0.dll into the same directory
as the Application.exe file. (I’m not sure if all of those are required, but I thought
I’d give it the full set of potential dependencies.)
I then re-ran the executable, and it was able to find my connected spectrometer and run
normally.
I noted that the Application Builder automatically generated a «data» directory with a copy
of WasatchNET.dll, which it recognized as a dependency. This suggested that the «data»
folder was already internally added to the application’s DLL search path, so I tried moving
all the DLLs into that folder, and confirmed that it ran fine in that configuration as well.
I’ve posted a zipfile of the complete application folder here:
- https://github.com/WasatchPhotonics/Wasatch.LV/tree/master/bin
Common Errors
«an error occurred trying to load the assembly»
Note that LabVIEW requires all DLL dependencies to be together in the same folder.
Therefore, you should probably point to the WasatchNET.dll installed in
C:Program Files (x86)Wasatch PhotonicsWasatch.NET, which has all dependent DLLs
grouped for convenience.
No spectrometers found
Make sure that after installing Wasatch.NET, you
updated the device drivers
for your spectrometers.
Error 1386 occured at Invoke Node: The specified .NET class is not available
Most common reason for this seems to be trying to use a 64-bit version of
Wasatch.NET with a 32-bit version of LabVIEW, or vice-versa.
Error 1172 occured at Invoke Note: FileNotFoundException (LibUsbDotNet.dll, etc)
WasatchNET.dll requires several other DLL dependencies. Most of these are
normally installed automatically alongside WasatchNET.dll, typically in one
of these two directories depending on which installer architecture you select:
- C:Program FilesWasatch PhotonicsWasatch.NET
- C:Program Files (x86)Wasatch PhotonicsWasatch.NET
Some DLLs (including LibUsbDotNet.dll) are normally installed directly to
C:Windows, which should work fine as that directory is always in the
Windows executable search path (%PATH%).
If you receive FileNotFoundExceptions, please confirm that Wasatch.NET has been
installed via the binary installers. Recent versions are typically available
from here:
- https://wasatchphotonics.com/binaries/drivers/Wasatch.NET
FAQ
- Change x-axis from wavelengths to wavenumbers
Version History
- see Changelog
References
- https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAR3SAO&l=en-US
-
05-23-2017, 05:27 PM
#1
Registered
HI all,
I’m encountering an error in labVIEW (2017) when attempting to run this vi: «Kmotion DotNet DLL Sample.vi».
The error appears to be occurring right after the «KM Controller» constructor node is called.The error code is 1172.
(Error 1172 occurred at Constructor Node Error creating instance of KM_Controller in assembly KMotion_dotNet.KM_Controller, KMotion_dotNet, Version=1.0.1.0, Culture=neutral, PublicKeyToken=fcaf9556d6f68c3a, (KMotion_dotNet.DMException: Dll Not Found Exception thrown : Caller — [KMotion_dotNet.KM_Controller] :: Member — [KM_Controller]))
Any help would be greatly appreciated!
Thanks,
Sean
-
05-23-2017, 05:42 PM
#2
Junior Member
Re: KMotion Controller Error
Hi Sean,
You might try setting the Window’s Environmental Path value to include path to the <>KMotionRelease directory so Labview/Windows/References can find all the necessary libraries. You should probably re-start LabView after changing the variable.
Regards
-
05-24-2017, 11:09 AM
#3
Registered
Re: KMotion Controller Error
Thanks Tom,
This has fixed the issue completely.
Regards,
Sean
-
05-24-2017, 06:20 PM
#4
Junior Member
Re: KMotion Controller Error
Hi Sean,
Thanks for posting back.
BTW an alternate solution might be to set the «App Paths» registry entry for LabView.
Regards
Номер ошибки: | Ошибка 1172 | |
Название ошибки: | .NET Error 1172 | |
Описание ошибки: | Ошибка 1172: Возникла ошибка в приложении .NET Framework. Приложение будет закрыто. Приносим извинения за неудобства. | |
Разработчик: | Microsoft Corporation | |
Программное обеспечение: | .NET Framework | |
Относится к: | Windows XP, Vista, 7, 8, 10, 11 |
Обзор «.NET Error 1172»
Обычно люди ссылаются на «.NET Error 1172» как на ошибку времени выполнения (ошибку). Разработчики программного обеспечения, такие как Microsoft Corporation, обычно принимают .NET Framework через несколько уровней отладки, чтобы сорвать эти ошибки перед выпуском для общественности. К сожалению, иногда ошибки, такие как ошибка 1172, могут быть пропущены во время этого процесса.
После первоначального выпуска пользователи .NET Framework могут столкнуться с сообщением «.NET Error 1172» во время запуска программы. Во время возникновения ошибки 1172 конечный пользователь может сообщить о проблеме в Microsoft Corporation. Затем Microsoft Corporation нужно будет исправить эти ошибки в главном исходном коде и предоставить модифицированную версию для загрузки. Поэтому, когда вы сталкиваетесь с запросом на обновление .NET Framework, это обычно связано с тем, что это решение для исправления ошибки 1172 и других ошибок.
Что вызывает ошибку времени выполнения 1172?
«.NET Error 1172» чаще всего может возникать при загрузке .NET Framework. Вот три наиболее заметные причины ошибки ошибки 1172 во время выполнения происходят:
Ошибка 1172 Crash — Номер ошибки вызовет блокировка системы компьютера, препятствуя использованию программы. Если данный ввод недействителен или не соответствует ожидаемому формату, .NET Framework (или OS) завершается неудачей.
Утечка памяти «.NET Error 1172» — ошибка 1172 утечка памяти приводит к тому, что .NET Framework постоянно использует все больше и больше памяти, увяская систему. Возможные провокации включают отсутствие девыделения памяти и ссылку на плохой код, такой как бесконечные циклы.
Error 1172 Logic Error — Ошибка программной логики возникает, когда, несмотря на точный ввод от пользователя, производится неверный вывод. Это происходит, когда исходный код Microsoft Corporation вызывает недостаток в обработке информации.
.NET Error 1172 проблемы часто являются результатом отсутствия, удаления или случайного перемещения файла из исходного места установки .NET Framework. Как правило, решить проблему позволяет получение новой копии файла Microsoft Corporation, которая не содержит вирусов. Помимо прочего, в качестве общей меры по профилактике и очистке мы рекомендуем использовать очиститель реестра для очистки любых недопустимых записей файлов, расширений файлов Microsoft Corporation или разделов реестра, что позволит предотвратить появление связанных с ними сообщений об ошибках.
Классические проблемы .NET Error 1172
Эти проблемы .NET Framework, связанные с .NET Error 1172, включают в себя:
- «Ошибка в приложении: .NET Error 1172»
- «Недопустимая программа Win32: .NET Error 1172»
- «Возникла ошибка в приложении .NET Error 1172. Приложение будет закрыто. Приносим извинения за неудобства.»
- «К сожалению, мы не можем найти .NET Error 1172. «
- «.NET Error 1172 не может быть найден. «
- «Проблема при запуске приложения: .NET Error 1172. «
- «Не удается запустить .NET Error 1172. «
- «.NET Error 1172 выйти. «
- «Ошибка пути программного обеспечения: .NET Error 1172. «
Проблемы .NET Error 1172 с участием .NET Frameworks возникают во время установки, при запуске или завершении работы программного обеспечения, связанного с .NET Error 1172, или во время процесса установки Windows. Выделение при возникновении ошибок .NET Error 1172 имеет первостепенное значение для поиска причины проблем .NET Framework и сообщения о них вMicrosoft Corporation за помощью.
Эпицентры .NET Error 1172 Головные боли
Эти проблемы .NET Error 1172 создаются отсутствующими или поврежденными файлами .NET Error 1172, недопустимыми записями реестра .NET Framework или вредоносным программным обеспечением.
В первую очередь, проблемы .NET Error 1172 создаются:
- Недопустимые разделы реестра .NET Error 1172/повреждены.
- Файл .NET Error 1172 поврежден от вирусной инфекции.
- .NET Error 1172 злонамеренно или ошибочно удален другим программным обеспечением (кроме .NET Framework).
- .NET Error 1172 конфликтует с другой программой (общим файлом).
- Поврежденная загрузка или неполная установка программного обеспечения .NET Framework.
Продукт Solvusoft
Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.
Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11
Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление