LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build hexadecimal string into byte array

Solved!
Go to solution

Thank you again! Now I understand how to replace any of the elements in the command string.

0 Kudos
Message 11 of 15
(438 Views)

The visual of the numeric representation for array constants on the block diagram was very helpful.  How can I do that?

0 Kudos
Message 12 of 15
(426 Views)

@kierzie123 wrote:

The visual of the numeric representation for array constants on the block diagram was very helpful.  How can I do that?


I just show the label of the array element and manually type whatever is appropriate.

 

(Are you really sure you want the output as an array of U8 and not an array of U16 of half the length? It seems the original data is words (2 bytes))?

0 Kudos
Message 13 of 15
(419 Views)

What an elegant idea.

As you noticed, I am not yet sure which approach I should use.  Both methods appear to work on a small sample of the command set. I believe the nibble is the original board data size but the PC is getting bytes back from the test program on the board.

 

 

 

0 Kudos
Message 14 of 15
(412 Views)

@kierzie123 wrote:

I believe the nibble is the original board data size but the PC is getting bytes back from the test program on the board.


A nibble (i.e. one hex character or 4 bits) is half a byte.

 

Your original data is in the form of 0xHHHH, i.e. two bytes (e.g. U16) and I would think it should be treated as such.

0 Kudos
Message 15 of 15
(400 Views)