04-30-2009 12:50 AM
Hi,
I'm pretty new at LABVIEW but right now I am connecting to a device using a RS232 serial cable. Anyway I am using VISA read to get the output from the device, and I wanted the device to return the output in ASCII. It is able to do so but now I'm stuck. I'm now trying to convert that string of ASCII characters into a binary string. In other words, if my output was a "QN" from VISA Read, then I would have to be able to get a string that had "0111000101101110". Any help is appreciated. Thanks.
Solved! Go to Solution.
04-30-2009 01:29 AM - edited 04-30-2009 01:32 AM
That does not make a lot of sense, because "0111000101101110" would be "qn" and not "QN". Do you want to throw in a "to lowercase" conversion too?
Anyway, here's one possible solution that works with any lenght of string.
Still, this seems like quite a convoluted task. Typically it's easier to work directly in binary strings instead of binary formatted ASCII. 😉
04-30-2009 01:51 AM