06-14-2012 11:22 AM
Hello,
I am trying to do the mentioned action:
Divide 16-bit Word into its HI and LO Bytes, then Convert to ASCII
I downloaded this .zip file and got the .lks and .l4t files.. I do not know what these files are? Where can I just find a VI for what I want to do?
If anyone has one, let me know!
Thanks,
Danny
Solved! Go to Solution.
06-14-2012 11:48 AM
Use the Split Number function on the Numeric>Data Manipulation palette. Then do a Type Cast (same palette).
06-14-2012 11:48 AM
Danny,
Look at the Data Manipulation and Conversion sections of the Numeric Palette. Split Number and Byte Array to String are your friends.
As for the files, you will need to know the file formats. I never heard of either of those and a search at FILExt did not produce anything useful.
Lynn
06-14-2012 11:51 AM - edited 06-14-2012 11:52 AM
06-14-2012 12:00 PM
@d.gelman wrote:
... then Convert to ASCII
I have no idea what that means! It is way too ambiguous.
06-14-2012 12:01 PM
LKS = NI Lookout source, for HMI's/SCADA. L4T's the state file.
Like johnsold said, split the number and convert to string.
06-14-2012 12:22 PM
@Dennis_Knutson wrote:
Use the Split Number function on the Numeric>Data Manipulation palette. Then do a Type Cast (same palette).
@johnsold wrote:
Danny,
Look at the Data Manipulation and Conversion sections of the Numeric Palette. Split Number and Byte Array to String are your friends.
Type Cast Man is worried about carpal tunnel syndrome from dropping too many primitives.
06-14-2012 12:31 PM
I immediately had the same idea. Posting by phone from the bus i could not test and was only 98% sure that the order will be the same. 😉
06-14-2012 12:36 PM
@altenbach wrote:
I immediately had the same idea. Posting by phone from the bus i could not test and was only 98% sure that the order will be the same. 😉
In this case it is, but when backed into a corner Type Cast Man is willing to step aside for Flatten To String with its explicit control of endianness (endianity?) at the expense of coolness.
06-14-2012 05:33 PM
I did answer the question the OP actaully asked, although I readily concede that altenbach and Darin usually come up with more compact, elegant, or better performing code.
Lynn