LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing values from C# into labview

Sorry, first time here.

I am using Labview 2011. I have a VI that calls upon a C# dll to perform an action that prints the serial number of a device. Is there a way of labview extracting that number and putting it as a global variable to perform other actions that I need to do?

0 Kudos
Message 1 of 6
(2,443 Views)

@Elgoris wrote:

Sorry, first time here.

I am using Labview 2011. I have a VI that calls upon a C# dll to perform an action that prints the serial number of a device. Is there a way of labview extracting that number and putting it as a global variable to perform other actions that I need to do?


Only if the C# DLL allows access to that number.

0 Kudos
Message 2 of 6
(2,440 Views)

What do you mean by "prints the serial number of the device"? Prints where?

0 Kudos
Message 3 of 6
(2,431 Views)

Hello Elgoris,

 

To call a dll you can use the Call Library Function Node into an indicator. Then you can build a global variable with it.

 

Best Regards,

 

amezam

0 Kudos
Message 4 of 6
(2,406 Views)

@amezam wrote:

Hello Elgoris,

 

To call a dll you can use the Call Library Function Node into an indicator. Then you can build a global variable with it.


The Call Library Function Node is not applicable to C# "DLLs", which are .NET assemblies.

0 Kudos
Message 5 of 6
(2,390 Views)

Sorry it took so long to respond.. having issues logging on.

 

I went back to look at my C# program as NYC had mentioned. It seems like the value isn't being saved for an accessable value for passing.

The "printing" was refering to output to console.writefile or to text file but value isn't being saved.

 

My problem seems to be if I am understanding this right:

 

Labview returns from methods that are not voids.

Unfortunately it seems that the methods for the prioritized software cannot be a void.

 

I think I have to create some method that inherits that value that is in a void to be able to access it. This ought to be interesting since I don't know C# that well either.

 

Thank you for the suggestions. I like having different ideas and investigations them! 

0 Kudos
Message 6 of 6
(2,381 Views)