02-21-2012 02:26 AM
Hi :
I had a problem , the problem is like this:
I want to generate a .net dll file from a Labview program,the labview program is very simple:
this program is in a Labview project, i useBuild Specifications-New-.Net Interop Assembly to generate a dll,
when i add the source file it need to Define the Vi Prototype,like this:
how should i set the returnvalue?
When I use another Labview program to call this DLL , it will like this:
and every time i run the program, it will dead there,and i muse use the Task Manger to stop the Labview.
Do someone know where is the problem? Thanks!
02-21-2012 08:31 AM - edited 02-21-2012 08:33 AM
You need to click on the "VI Output" dropdown and select which indicator to use as the return value. You can then select "xy" and simply delete it from the list of parameters since the function's return value will be the sum.
The reason why it crashes now is because the .NET assembly is expecting the address of a memory location where it will write the sum. You are passing in a value, and the .NET assembly is trying to write to the memory location specified by the actual value of the control. So, if the control's value is zero, the .NET assembly is trying to write to memory location zero. Crash.
02-21-2012 07:48 PM
Hi smercurio_fc, thank you very much!
As your mean I tried to delete the "xy" after i set the returnvalue's VI Output to"xy", like this:
but the delete button is grey and can not kilck,so i can not delete the "xy" from the list of parameters ,
02-23-2012 07:48 AM
Strange. I can't replicate the behavior that you are seeing. Do you have some example code that shows this behavior? What LabVIEW version are you using?