取消
显示结果 
搜索替代 
您的意思是: 

LabVIEW: Memory or data structure corrupt.

已解决!
转到解答

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 项奖励
1 条消息(共 15 条)
9,778 次查看

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 项奖励
2 条消息(共 15 条)
9,762 次查看

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 项奖励
3 条消息(共 15 条)
9,742 次查看

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 项奖励
4 条消息(共 15 条)
9,734 次查看
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 项奖励
5 条消息(共 15 条)
9,729 次查看

@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 项奖励
6 条消息(共 15 条)
9,703 次查看

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 项奖励
7 条消息(共 15 条)
9,697 次查看

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

0 项奖励
8 条消息(共 15 条)
9,693 次查看

Hello,

 

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

0 项奖励
9 条消息(共 15 条)
9,677 次查看

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 项奖励
10 条消息(共 15 条)
9,656 次查看