Jump to content

Umit Uzun

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by Umit Uzun

  1. Hi All;

    How can pass the string data to my dll function which is like below;

    DLLDIR BOOL FSUIPC_WriteAndProcess(DWORD dwOffset, DWORD dwSize, void *pSrce, DWORD *pdwResult);

    I want to pass string data to void *pSrce. In Calling Library Function Node I have set the pSrce variable Type to "Adapt To Type" and set Data Format to "Handles by Value and Pointers to Handles " but it doesn't work and it gives me Error 1097 occurred at Call Library Function Node in GL.vi error.

    How can I pass string to my void* pSrce dll variable?

    Best Regards.

    Umit Uzun

  2. QUOTE (mesmith @ Apr 21 2009, 03:40 PM)

    Use the LabVIEW "Flatten to String" function - this will serialize a LabVIEW data cluster into a byte stream that can then be unpacked by the C++ app into a C++ struct - for example

    LabVIEW cluster: Numeric (Double), Numeric (U32 Int), Array (U16) (note that this must be a populated array of the same size as the target struct)

    to pass this to a struct of

    struct LVData

    {

    double x;

    int y;

    short array[100];

    };

    Then just wire the cluster up to flatten to string (wire a false constant into the "prepend array or string size? " control) and then pass the flattened string to your C++ app. Now that app will have to deserialize into a struct.

    Mark

    Hi Mark;

    Thanks so much. I have resolved the problem with your awesome directions :thumbup:

    Best Regards.

    Umit Uzun

  3. Hi All;

    I have a separated projects in c++ and labview and which have to share dynamically created data each other. I have tried socket usage on UDP and can send string data via socket from Labview to c++ app. But I don't know how can I pass cluster (in c++ struct) data from labview.

    Could anyone show me or give me any reference about kind of these operations to make me achieve?

    Thanks in advance.

    Umit Uzun

  4. QUOTE

    I use flatten to string (and unflatten from string) extensively to communicate with C++ apps through TCP/IP. All I have to know is the data struct the C++ apps expect and I can flatten and send the data with no problems. U32's are U32's, doubles are doubles (as long as the endianess is known), fixed size arrays are LabVIEW clusters (use the array to cluster), etc.

    Hi Mark;

    I have an c++ application and Labview application. I make some calculation on Labview and want to send these calculating result in cluster(struct) to the c++ application on udp socket. I have achived general string on upd to application but I want to send cluster(struct) so I don't know how can I do kind of this operation?

    Could you give me some clue or reference about this operation?

    Thanks in advance.

    Umit Uzun

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.