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?

javiucsd
Member

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?
5 REPLIES 5
srikrishnaNF
Active Participant

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

Message contains an attachment

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


Knight of NI

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

Message contains a hyperlink

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?

James_R
Active Participant

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

Message contains an image Message contains an attachment

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
javiucsd
Member

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

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

Knight of NI

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

Message contains a hyperlink

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.