01-28-2014 12:03 PM
01-28-2014 03:33 PM
I would greatly appreciate any help
01-28-2014 03:46 PM
Have you done a search or gone through this?
Can you post how you've configured your Call Function Node?
01-28-2014 03:57 PM
I assume that you mean that you have compiled your LabVIEW code into a DLL, which contains functions that you are calling from C#. You need to allocate the output string in the C# code before you call the DLL. LabVIEW will not allocate a new string, it will simply use the space provided to it. If you pass a zero-length string, then what you get back will also be a zero-length string. I don't know enough C# to tell you how to do this allocation, but I'm pretty sure others have asked the same question on this forum and some searching might turn up the answer.
01-28-2014 04:35 PM - edited 01-28-2014 04:36 PM
let me explain it step by step
1. I made a dll using .NET assembly
2. I added the dll to the references in c# and here is the difinition for it
public static void singleRead(out int element)
3. Then I call the function as below :
int m;
singleRead(out m);
format of element is I32 in LabVIEW and everything completely matches but I can't read data back from LabVIEW to c#. so when I run the code m is zero
I can completely communciate through that dll from c# to labVIEW and I can send parameters as input from c# to labVIEW but for the other way seems like something is missing and I can't read it back
I forgot to mentiond I changed my output from string to I32 because I thought it might fix the problem but I still se the issue
01-28-2014 06:06 PM
How did you configure the VI parameters when you built the .NET assembly? A screenshot or two would help. Any parameters that will contain new values when they return need to be passed by reference, not by value.