Industry Online Support
Technical Forum
3/5/2012 2:27 PM | |
Posts: 13 Rating:
|
Hello How can I convert a string into hexadecimal or binary. I hope someone can help me Thanks..
|
3/5/2012 2:41 PM | |
Joined: 9/28/2005 Last visit: 5/2/2023 Posts: 2957 Rating:
|
Hello, What exactly do you want to achieve ? If we speak about data type STRING then it's structure is as follows: byte 0 - maximum length of string byte 1 - real length of string byte 2...n - ASCII codes of every character So you can just load byte starting from 2 and you will have them in accumulator in whatever format you want. If you have number in string form and want to convert back to number(hex or dec) then look this manual System Software for S7-300/400 System and Standard Functionschapter 26.11 |
Best regards, |
|
3/5/2012 2:51 PM | |
Joined: 8/31/2010 Last visit: 5/21/2023 Posts: 1498 Rating:
|
Hello student1991, Refer this enclosed document for your requirement. This is an excerpt from this manual - System Software for S7-300/400 System and Standard Functions Volume 1 and Volume 2 AttachmentConverting Data Type Formats.pdf (244 Downloads) |
Like it? Rate it! |
|
Follow us on