Showing results for 
Search instead for 
Did you mean: 

Passing sentences from dll to LV



I am building a dll in VC2010, and the dlll communicates with my hardware. It acquires data and sends feedback after certain functions are executed. For example, once the board is openned, a Log( std::string & a_string) sends: "The board openned" or when data is starts streaming, the Log(std::string & a_string) sends: "Streaming began and will acquire for 30 minutes" ... etc.


I was wondering how I can display this in LV. I have been reading and using the Call Library Function Node and used the Call example. All of the string examples there indicates how to reverse a given string. I was wondering if anyone can help me directly with such a case described above.


I apologize if my description of problem is poor, or I am being naive. I am new to all of this 🙂


Thank you in advance.

0 Kudos
Message 1 of 3

What do you mean by "reverse the string"?


The easiest way to return string data to your LabVIEW app is by providing some kind of function you can call from LabVIEW that will return the string in one of its parameters. And before you go on and do this, just one other tip. For C functions the caller has to provide all buffers for any parameters independent if those parameters are input or output. This means for your string buffer the function is supposed to write into, you have to tell LabVIEW to allocate that string before calling the function. You can do this either programmatically using Initialize Array function and then converting everything from a Byte Array to String or in the Call Library Node configuration by specifying the "minimum size" for this parameter.

Rolf Kalbermatter
DEMO, TU Delft
My Blog
0 Kudos
Message 2 of 3

I meant the examples in Call reverses order in which the initial string is put as input. Nothing too important 🙂


Thanks for the tips. Good point on the "minimum size." I guess, I will try that.

0 Kudos
Message 3 of 3