Industry Online Support
Technical Forum
8/5/2008 9:06 PM | |
Posts: 487 Rating:
|
If you just want to compare to 'C' 'O'. Then compareDBB0 =B#16#43 = ASCII code of 'C' and DBB1 = B#16#30 = ASCII code of '0' Otherwise you will have to write you own function using ASCII code. This will be much easier in SCL than LAD/STL Here is a link to ASCII Table http://en.wikipedia.org/wiki/ASCII_table#ASCII_printable_characters |
Last edited by: JMJ at: 8/5/2008 9:10 PM |
|
8/5/2008 9:08 PM | |
Joined: 12/22/2006 Last visit: 1/25/2022 Posts: 1742 Rating:
|
Hello, On tis site http://www.asciitable.com/yoy will find the hexa code and the decimal valuefor ascii characters. So, the ASCII"0" has the decimal value 48. ASCII "1" has the decimal value 49 and soon up to ASCII "9" with value 57. The next hex char is "A" which has the value 65. You can now write a conversion table for the value 48 ==> B#16#0 for the value 49 ==> B#16#1 .... for the value 46 ==> B#16#8 for the value57 ==> B#16#9 for the value65 ==> B#16#A for the value66 ==> B#16#B ... for the value69 ==> B#16#E for the value70 ==> B#16#F |
Best regards |
|
9/2/2008 8:29 AM | |
Posts: 116 Rating:
|
Look at the following link. http://www.easycalculation.com/ascii-hex.php It will help you |
Follow us on