Wednesday 15 September 2010

How can I get return values from C# .DLLs in LabVIEW 2012? -


I currently have one. I am working to export the DLL library file in C # to Visual Studio 2010 for LabVIEW 2012. Color changes from RGB to HSL values, and I have been successful in implementing the constructor and opening the nodes in the LabVIEW project. Call to DLL file

So far I invite input number node for RGB values, but I am having trouble getting the HSL output value; The option does not appear in the drop-down box for the node.

I'm relatively new to C # (and generally programming) and I think I have seen that the input function is .dll, but for the output function I do not know that it How to generate, in such a way that LabVIEW can export it properly, I understand that if I can input prices, then I should be able to get those HSL outputs as well.

The question below is the C # code snippet. The remainder class is the formula for the result, so I do not think it is very relevant.

  public class QuickColorTransform {byte _r; Byte _g; Byte _B; Byte_h; Public Byte H {Received {Return _ H; } Set {_H = value; }} Byte _S; Public byte s {get {return _S; } Set {_S = value; }} Byte _L; Public Byte L {get {return _L; } Set {_L = value; }} Public QuickColorTransform () {SetupLookups (); } Public Zero SetColor (Byte Red, Byte Green, Byte Blue) {_R = Red; _g = green; _B = Blue; Conversion (); } Public Zero SetColor (Color ColorIn) {_R = ColorIn.R; _G = ColorIn.G; _B = ColorIn.B; Conversion (); }}   

Thanks in advance!

You have made the public the HSL recipient, and Labovy knows how to use it. Simply use a property node in your sixth, and after calling SetColor () , link in the object context, the HS and L property node's favorites will be in the list.

No comments:

Post a Comment