10-10-2013 11:38 AM
Hello,
I keep getting the following error when trying to run a VI to control a USB component (TEA4000-7, Telemakus attenuator) connnected to my laptop.
Error 1172 occurred at Error calling method TEA4000_7_lib.TEA4000_7_drv.Load_drv, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.IO.FileNotFoundException: Could not load file or assembly 'TEA4000_7, Version=1.1.0.26374, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.)
I should mention that the VI was originally created on another PC, and there the VI runs fine, with no error. A source distribution was made, placed on the network drive and I copied the whole folder to my desktop on this computer. I checked and the driver file (TEA4000_7.dll) is in the same directory as the VI. And If i check .NET assemblies in memory, i can see the correct path to this .dll file (in same directory as VI). But when i try to run it, it always gives me this error. So I know that the problem is somewhere it's not getting the right path to the file but I don't know where that is 🙂
I did try to copy the .dll file and place in the same directory as LabVIEW.exe, and when i opened it i got a warning saying path was changed, but i still got the same error.
Would love to hear any suggestions.
10-10-2013 12:12 PM
Is the DLL registered?
10-10-2013 01:11 PM
I am not sure if it is registered..I know i dind't do it manually. But i know the DLL works outside of LabVIEW, on this computer, bc I can use the vendor's software program to use the USB component. That works without a problem. It just does not work in LabVIEW, as it claims it cannot find the file (where is the shrugging emoticon? 🙂 )
10-10-2013 03:46 PM
"Regsvr32 [filepath]" in a command window.
/Y
10-11-2013 10:11 AM
Ok, i did that but i get an error.
"The module {path/filename.dll} was loaded but the entry-point DllRegisterServer was not found"
Hm. I'm wondering how to fix this. If it matters, I am running Windows 7
10-14-2013 05:39 PM
Hello,
Was the computer where it worked before running same version of LabVIEW and same OS as the new Laptop?
One thing to try is to verify that you have the same .NET runtime installed on the laptop you are seeing the error as the one where it was working before.
You can check which versions of the .NET framework you have installed by going to Start > Control Panel, going to Programs and Features (this may be Add/Remove Programs if you're running Win XP) and look in that list for Microsoft .NET Framework. If you don't have the specific .NET Framework, as in the other PC, you can find it at:
http://www.microsoft.com/en-us/download/
After the installation, there is also a way to force LabVIEW to use a particular version of the .NET Framework. Please refer to the following link to the KnowledgeBase article for doing that:
http://digital.ni.com/public.nsf/allkb/567F6EFFC5669C348625739B003739CD
It might not fix the issue, but it seems like a good step to try if the attenuator is expecting a specific .NET framework version.
Also you might check with your intruments vendor provider for an updated DLL/driver.