LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Divide 16-bit Word into its HI and LO Bytes, then Convert to ASCII????

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 13
(6,421 Views)

Use the Split Number function on the Numeric>Data Manipulation palette. Then do a Type Cast (same palette).

0 Kudos
Message 2 of 13
(6,403 Views)
Solution
Accepted by topic author d.gelman

Danny,

 

Look at the Data Manipulation and Conversion sections of the Numeric Palette. Split Number and Byte Array to String are your friends.

 

Integer to String.png

 

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

Message 3 of 13
(6,400 Views)

.............

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 13
(6,396 Views)

@d.gelman wrote:

... then Convert to ASCII



I have no idea what that means! It is way too ambiguous.

0 Kudos
Message 5 of 13
(6,387 Views)

LKS = NI Lookout source, for HMI's/SCADA.  L4T's the state file.

 

Like johnsold said, split the number and convert to string. 

0 Kudos
Message 6 of 13
(6,384 Views)

@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.

 

Integer to String.png

 


Type Cast Man is worried about carpal tunnel syndrome from dropping too many primitives.

 

SimpleTypeCast.png

Message 7 of 13
(6,369 Views)

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. 😉

 

 

0 Kudos
Message 8 of 13
(6,361 Views)

@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.

0 Kudos
Message 9 of 13
(6,352 Views)

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

0 Kudos
Message 10 of 13
(6,333 Views)