LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a VI to turn a 1-D array of integers into Intel Hex Format string?

I have a 1-D array of 16-bit integers.  I guess I can turn these numbers into 2x8 bit numbers.  After that I would like to convert this arary of numbers into an Intel Hex format string.  Is there a VI for this?
0 Kudos
Message 1 of 6
(3,640 Views)

Hi javiucsd,

  Actually there is no straight way VI.To split each 16bit integers into 2-8bit integers,you can split numbers function and after that change the representation(display format) as Hex.I had attached a vi,have a look at this.

 

 

Thanks and regards,

srikrishna.J

Regards,
Srikrishna


0 Kudos
Message 2 of 6
(3,625 Views)

javiucsd wrote:
I have a 1-D array of 16-bit integers.  I guess I can turn these numbers into 2x8 bit numbers.  After that I would like to convert this arary of numbers into an Intel Hex format string.  Is there a VI for this?

Are you referring to this, or something else?

0 Kudos
Message 3 of 6
(3,618 Views)

you can simply typecast your integer array as a string and it will be in the "Intel" or Little Endian format

 

you can pass the array through the swap bytes vi to format the string in "Motorolla" or Big Endian format

 

typecast_array.png

- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 4 of 6
(3,609 Views)

I understand how to turn a 16 bit number into 2x8 bit numbers and I understand the type casting into a string.......

 

smercurio_fc - You are correct.  The Intel Hex File Format with the Start code, byte count, address, Type, Data, and Checksum is exactly what I am looking for.  I was just seeing if such a VI already existed.  If not, then I guess I just gotta write it.

 

 

Thanks everyone for your input.

Javi

0 Kudos
Message 5 of 6
(3,581 Views)

javiucsd wrote: 

smercurio_fc - You are correct.  The Intel Hex File Format with the Start code, byte count, address, Type, Data, and Checksum is exactly what I am looking for.  I was just seeing if such a VI already existed.  If not, then I guess I just gotta write it.


In this post someone had written a VI to read from a file written in Intel Hex File Format and convert it to binary. I haven't looked at the code so I don't know if you can use it as a starting point to do the reverse.

0 Kudos
Message 6 of 6
(3,566 Views)