LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while calling custom made LabVIEW based .Net Assembly DLL from TestStand

I've a APx515 Audio Analyzer (from AP - Audio Precision) Instrument which comes with LabVIEW Supported driver VIs (all driver VIs are calling Audio Precision's .Net DLL functions). My requirement is to pull necessary VIs to make custom VIs (using LabVIEW 2010 SP1) and convert them into .Net Assembly DLL. At the end, I need to call my LabVIEW based .Net DLL functions from TestStand to control the devices. I'm getting following error while calling LabVIEW based .Net DLL,

 

An exception occurred inside of the call to .NET member 'APx515Initialize':
System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.LabVIEW100, Version=8.50.11.23155, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'NationalInstruments.LabVIEW100, Version=8.50.11.23155, Culture=neutral, PublicKeyToken=null'
   at DNCreateAppDomain(LVAppDomainSetup* setup, Int32* pAppDomain, LStr*** errStrOut)
   at NationalInstruments.LabVIEW.Interop.LVRuntime.CallVIFromDll.Invoke(Int32 epIndex, IntPtr lvClient, IntPtr entryPointDataSpace)
   at RAPTRInstrumentSupport.RAPTRInstrumentSupport.APx515Initialize(Boolean APxAppVisible)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Would anyone know, how to fix these error...?

 

Thanks

0 Kudos
Message 1 of 10
(2,971 Views)

It sounds like your LabVIEW VI cannot find an Audio Analyzer DLL. Have you confirmed that the VI works before converting it to a DLL? Are you using any other Audio Analyzer VIs except the APx515Initialize VI?

Brian H. -- Electronics & Measurements Product Marketing Manager
Message 2 of 10
(2,934 Views)

My custom VIs are working from LabVIEW; VIs are converted into .Net Assembly DLL and getting error while calling my .Net DLL's functions from TestStand. I've attached APx515 Initialize VI screenshot; this is an custom made VI where it's directly calling AP's (AP - Audio Precision) .Net functions not using AP's Initialize VI.

 

I've also tried below two itms,

1. Calling my LabVIEW .Net DLL from AP's .Net DLL's location; that didn't help

2. Copied AP's .Net DLL (AudioPrecision.API.dll) to my LabVIEW .Net DLL's location; that didn't help either

 

Please let anyone help, if you come across similar issue.

 

Thanks

0 Kudos
Message 3 of 10
(2,918 Views)
What happens when you call the VIs themselves from TestStand? Why build the VIs into a net assembly? What happens when you call the original .NET assembly from TestStand and not add the additional complexity of calling from LabVIEW?
Message 4 of 10
(2,899 Views)

Both cases are working (VIs from TestStand as well as Original .Net Assembly from TestStand). The reason I need to make custom LabVIEW based .Net DLL is that we've existing DLL functions are written in LabVIEW to .Net Assembly to support other instrument devices. Please advise.

0 Kudos
Message 5 of 10
(2,892 Views)
It seems to me that you have a 'want' and not a 'need' but, sorry, I don't know what is causing the failure. You are doing this on the development pc?
0 Kudos
Message 6 of 10
(2,875 Views)

Yes, that's right.

0 Kudos
Message 7 of 10
(2,870 Views)

 

I am facing a similar error and curious to know if you had found a fix then.

 

Thanks in Advance!

0 Kudos
Message 8 of 10
(2,076 Views)

@Pretty91,

Resurrecting old threads sometimes doesn't get peoples attention, I'd recommend creating a new one with all of the specific information on what you are experiencing. Be sure to include the troubleshooting steps that were offered up in this thread and their results, the exact error, and what is needed to throw the error. 

Best of luck!

0 Kudos
Message 9 of 10
(2,063 Views)

I couldn't solve my old issue. Finally, I end up developing Custom DLL from C#.  Later, I've realized that the issue might relate to .Net 3.5 Vs 4.0. The LabVIEW 2010 SP1 can create/build only .Net 3.5 based DLL not .Net 4.0+. I should have tried from latest LabVIEW version back in those days, which i didn't. Instead I've developed the Custom DLL from C#, which did work.

0 Kudos
Message 10 of 10
(2,056 Views)