LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to initialize a string to pass to a Dll function

Hi All, I am just becoming familiar to the LabView enviorment and I
need some help.

I am trying to call a method which will return a string. According to
the LabView manual, I have to initialize the string with an
appropirate size before I can use it. This makes sense, However, I
don't know how to initialize a string.

Thank you for your help in advance.
Rafi Ghazarian
0 Kudos
Message 1 of 8
(3,062 Views)
The attached tiny VI will create a string of a given size. This is how I would initialise a general string. I still feel quite new to LabVIEW myself so I'd be interested to hear comments.

Regards, Richard.
0 Kudos
Message 2 of 8
(3,062 Views)
The attached vi seems to be missing. Could you please try again?
www.vartortech.com
0 Kudos
Message 3 of 8
(3,062 Views)
I think I've learnt this message system ignores the attached file if the file has no description. Sorry.

Regards, Richard.
0 Kudos
Message 4 of 8
(3,063 Views)
After reading again how you described your attachment, I was thinking that maybe your vi was so tiny I was unable to see it. 🙂

Just a little of fun.
www.vartortech.com
0 Kudos
Message 5 of 8
(3,062 Views)
R wrote in message news:<506500000005000000DE450000-1002247793000@exchange.ni.com>...
> The attached tiny VI will create a string of a given size. This is how
> I would initialise a general string. I still feel quite new to LabVIEW
> myself so I'd be interested to hear comments.
>
> Regards, Richard.

I can't see an attachment,do I have to do anything special to see it?
I'm using google via a web browser
0 Kudos
Message 6 of 8
(3,062 Views)
The following is an excellent example on how to use external code in LabVIEW using a dll. It include example for passing strings.

Passing a Variety of Data Types from DLL to LabVIEW

Also, the following is an example of passing a C string to a CIN, is modified and returned to labVIEW:

LabVIEW CIn example

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 7 of 8
(3,062 Views)
Richard, this is how I do it. I didn't do any performance comparisons, but I suspect that this is faster.



Message Edited by C. Minnella on 07-30-2007 09:41 AM

Download All
Message 8 of 8
(2,745 Views)