05-30-2013 06:05 AM
Hello,
I have been making a small vi to control my newport ConcexCC motion control units and have come across the following errors. I have checked the ".NET Assemblies In Memory" under the View menu and the correct assemblies are present in in the project directory.
When provide no Instrument key I get:
Error Code:1172
Error Message: "Error calling method CommandInterfaceConexCC.ConexCC.RegisterComponent, (System.ArgumentNullException: Key cannot be null.
Parameter name: key) <append><b>System.ArgumentNullException</b> in LWConexCC_Connect.vi->Basic.vi"
The labview vi for selecting the instrument has no options in the pull-down menu and so the key is left null and it fails. When I manually hard code the instrument key in I get:
Error Code: 1172
Error Message: "Error creating instance of ConexCC in assembly CommandInterfaceConexCC.ConexCC, Newport.CONEXCC.CommandInterface, Version=2.0.0.2, Culture=neutral, PublicKeyToken=null, (System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.) <append><b>System.Security.SecurityException</b> in LWConexCC_Connect.vi->Basic.vi"
Havingsearchedforthiserrorcodeifounditisbecausemyviislocatedonanetworkeddriveandthe.NETpermissionsarenotsuitabletoallowthevitocommunicatewiththeNSTRUCTserver. IamthoroughlyconfusedastohowtoadjustthisasthelinksIhaveseen (example) produceoptionsormenusIseemnottohave (LabVIEW2011).
If anyone has a link to instructions to get through this it would be most obliged.
Solved! Go to Solution.
05-31-2013
08:54 AM
- last edited on
04-23-2025
12:33 PM
by
Content Cleaner
Hi tastyradiskull,
Thanks for posting your issue to the forums.
I wanted to ask you some questions.
I understand you are using LabVIEW 2011. What OS are you using on your PC? Do you know what version of .NET you have?
- Do you see these errors when you first run the VI? Have you tried using Highlight Execution to see exactly where the error occurs?
- Are you the administrator of the computer?
I have some further links for you to look at:
- Loading .NET 4.0 assemblies in LabVIEW
- Requirements for Running a LabVIEW Executable that Uses .NET Assemblies
- How LabVIEW Locates .NET Assemblies
- Why am I getting Error 1172 when trying to invoke .NET assembly?
- Error 1172 when running .NET dll in LV8
- System.ArgumentNullException: Key cannot be null error in Labview VI
I hope this helps!
Kind Regards,
05-31-2013 10:52 AM
Hello Dom,
I should rely less on autofilling webforms, not sure picking my gamer handle sounds the most professional way of communicating on this :-P.
In answer to your questions:
1) Windows 7 SP1
2) No, sorry. It is centrally distributed and is version "2, 3 or 4 as appropriate" so which was appropriate when my machine was set-up I do not know.
3) Yes it happens on the first time through and yes I have found it is in the Newport supplied vi which Connects to the device, speifically in the element which is called to: "Create Constructor node of ConexPZP". I followed the youtube video Newport provide for ensuring this constructor is properly defined, and so to the best of my knowledge it is. The video section is found here.
4) No, I have Elevated Rights but not full admin.
I will check all of those links as soon as I have time and ensure I am following proper procedure throughout. Thanks for your reply!
Euan 🙂
06-07-2013 08:04 AM
Hello again,
So I've explored the different solutions your links suggest and it seems that the issue is firmly in the .NET permissions , specifically in communicating from the remote filestore to the local hard drive. I got it to work by running the .vi form an location on the HDD of my computer and the program runs. It is buggy but working.
However the lab PC on which it will need to be installed has no user-writable space on it's HDD and so the final version of the code needs to be executed from the remote location.
This appears to be an issue with my User permissions and so an internal IT debate. Joys.
Anyway, I shall consider this thread closed. Thank you to Dom for your help.
Euan