06-07-2018 03:09 AM
Hi guys, one question. Are there any Octal to ASCII converter available in labview?
Solved! Go to Solution.
06-07-2018 03:17 AM
There is a Number to Octal String in the String -> Number/String Conversion palette.
Otherwise, use Format into String with %o format.
06-07-2018 03:30 AM
The one you saying right now is any number or string convert to octal, somewhat like this.
But i need now is to convert Octal to ASCII. It's different.
06-07-2018 03:48 AM - edited 06-07-2018 03:51 AM
How about changing the format string from your %02x to %03o? That is exactly what pincpanter was saying. If that is not what you want to do, show us some code of what you want to achieve, rather than what you do not want.
06-07-2018 03:54 AM
So the question is: what's Octal? There is no such thing at low level. For me, octal is only a specific visual representation of integers or "bitstream" data.
06-07-2018 04:49 AM
This is what i want.
It's easy to convert ASCII to any base, just play with the format string, but if want to convert back, it takes some understanding.
I'm still new to labview btw
06-07-2018 04:54 AM
Just do what pincpanter and rolfk say and replace the FF / hex functions you have with the ones rolf showed you. It's a direct swap!
06-07-2018 05:33 AM - edited 06-07-2018 05:35 AM
So what's wrong with the inverse functions from my post? The Octal String to Number function is right besides the Hexadecimal you show in your example.
Also note that part of the confusion is likely in your use of what represents the ASCII side. Many people consider the ASCII part the human readable text side, while the hex/octal/decimal number side is the machine representation.
06-07-2018 05:37 AM
So you have an input ASCII string containing (3-digit?) numbers in octal format and need to scan it to U8 values.
The code is much the same you posted for hexadecimal format, but using Octal String to Number instead of Hex String to Number. Probably extracting 3 characters at a time.
You may also use Scan from String with %3o format, see just as an example this code:
06-07-2018 08:36 PM
I'm just asking are there any code for this....