ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW: Memory or data structure corrupt.

Solved!
Go to solution

Hello everyone,

 

I know, this will be a very simple question, but I could not solve this. When I entered a text to text control box in Hexadecimal. I want this text to be converted into hexadecimal number. I am using unflatten from string function.

 

 

If I enter 8 characters it causes no errors. For ex: 1234 5678.

 

But If I enter 1234 for example, it causes the following error:

 

LabVIEW:  Memory or data structure corrupt.

 

How can I solve this problem? Thank you and best regards,

 

0 Kudos
Message 1 of 15
(9,839 Views)

I'd try the "Hexadecimal string to number" function.  That should work as long as your string contains 1 to 8 hex digits.

 

Mark Moss

0 Kudos
Message 2 of 15
(9,823 Views)

Hello,

 

Thank you for your response but no output is given after I try this function. Please find the updated file on the attachment.

0 Kudos
Message 3 of 15
(9,803 Views)

The error that you are getting with Unflatten From String is because this function is made to get as an input a flattened string that is typically generated by the flatten to string function (please refer to LabVIEW help if you need more informations about this function). I attached an example with several functions that you can use. You can use also the function type cast. 

0 Kudos
Message 4 of 15
(9,795 Views)
Have you tried changing the format of the string control to hexadecimal?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 15
(9,790 Views)

@Carmen: Thank you, it seems it is working if the string representation is normal text, but I need to use it in Hexadecimal representation.

 

 

@mikeporter: Yes it is already in Hexadecimal format.

 

 

0 Kudos
Message 6 of 15
(9,764 Views)

Take a look at this example, see if you can get some ideas out of it:

https://decibel.ni.com/content/docs/DOC-13303

0 Kudos
Message 7 of 15
(9,758 Views)

Have you tried Type Cast it to U16 array? That way you get decimal value of each 4-digit word.

0 Kudos
Message 8 of 15
(9,754 Views)

Hello,

 

Thank you. I will try and tell you the result tomorrow...

0 Kudos
Message 9 of 15
(9,738 Views)

Hello,

 

I would like to explain my aim again.

 

I would like to create a MAC address from the serial number. For example in Serial Number Field, I am writing 1203 and the MAC address becomes: 000A 3500 1203. I would like to generate a report using Easy Text report and would like to print both Serial number and the MAC address in Hexadecimal.

 

I try to connect MAC address indicator directly to the report text input. When I print, only string representation of the MAC address is printed (e.g. ..s).

 

How can I make this to be printed successfully?

 

Thank you again...

0 Kudos
Message 10 of 15
(9,717 Views)