Jump to content

LabVIEW memory error


Recommended Posts

I suspect that the number of bytes you are passing in to the Flatten to String is incorrect, Try writing your code so that you start with a netls3xmaintstatusstruct cluster convert that using Flatten To String and then compare that to the string in your example that you are passing into the Unflatten From String. You might find it better to create a wrapper function using variants.

Link to comment

I suspect that the number of bytes you are passing in to the Flatten to String is incorrect, Try writing your code so that you start with a netls3xmaintstatusstruct cluster convert that using Flatten To String and then compare that to the string in your example that you are passing into the Unflatten From String. You might find it better to create a wrapper function using variants.

Hello,

The code on the other end is written in Borland C++, I am not sure how to do Flatten to String in C++?

Also could you please elaborate on the last statement "You might find it better to create a wrapper function using variants". I am aware of variant in LV that takes any data type but again not sure on C++ and variants.

TIA.

Link to comment

Trying to pass a complex structure from Borland C++ to Labview directly is problematic, not least because you need to be each data type matches in size and byte order but also that the word boundary in your structure matches that of the cluster that you are trying to pass the data to. All very hard to debug.

IT would be easier to write a DLL to be called from Labview that that takes a variant for each component of the complex structure you are trying to deal with and then assemble that in the DLL into the structure that you need and then call your Borland DLL.

This will allow more debug as you can see the state of the variables before that are build into the structure.

Remember that while Labview variants will contain any Labwiew type C++ variants will only hold types native to that environment.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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