LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

intel hex format

Hi all : I have  Intel hex file … I want to open this file using Intel hex format ,, and change the value at address 10 for example … then save the changes with type Intel hex format ,, this file will be used with elnec programmer so the format must be as Intel hex   How can I do that in labview  thanks  
0 Kudos
Message 1 of 19
(7,543 Views)

Hi elyan,

you can use the "read from binary file" function. Use the little endian format. After reading it you can change what you need and write it back to your file.

 

Mike

Message 2 of 19
(7,539 Views)
Hi mike :   can you send me example i am beginner with labview
0 Kudos
Message 3 of 19
(7,536 Views)

Hi elyan,

this is one solution. It reads the entire file and write it after the change back to the file.

 

 

 

Mike

Message Edited by MikeS81 on 02-12-2009 03:35 PM
Message 4 of 19
(7,526 Views)

Similar thing I hav tried but it is throwing following error Please suggest :

 

Error 4 occurred at Read from Binary File in Hex_Read.vi

 

LabVIEW:  End of file encountered.

 

Rahul

0 Kudos
Message 5 of 19
(6,709 Views)

@Rahul dubey wrote:

Similar thing I hav tried but it is throwing following error Please suggest :

 

Error 4 occurred at Read from Binary File in Hex_Read.vi

 

LabVIEW:  End of file encountered.

 

Rahul


You need to provide more info! If you tell someone that your car doesn't work he wouldn't be able to tell you what the reason is either, if you don't give him a lot more information.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 19
(6,701 Views)

I am trying to read one INTEL Hex file which is in below format:

 

:020000040001F9
:14000000CE8700640005000D07D7000A001200000002A4ACD5

I want to read this file and want to Extract data, record type and address from this.

 

Later on I want to edit at specific address and to generate new check sum

 

Please suggest

 

Rahul

0 Kudos
Message 7 of 19
(6,697 Views)

For one thing this file, (and Intel Hex Format in general) are not binary files but strings. So you need to read them in as such and the post by Mike was in fact somewhat misleading. But the original poster should have not just stated that he was reading Intel Hex format files, but provide an example too. Only people who deal with programming embedded devices or E(E)PROMS usually have seen Intel Hex Format files and know what they are.

 

After you read in the file (I would personally do it line by line) there are quite a few functions to deal with string to number conversion. Then you get an array of data and can change the according byte and then you need to write the data back to a new file and again there are quite a few functions to deal with number to string conversion. Incidentially you would find those functions in the (indeed!) String palette.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 19
(6,688 Views)

is there any example for reading/Writting intel hex file in Labview and Again I want to modify the same file at particular address.

 

Rahul

0 Kudos
Message 9 of 19
(6,668 Views)

I'm sure it has been implemented by several 1000 LabVIEW users in the last 20 years in very different ways. But I'm not aware of a specific Intel Hex value reader example and my feeling in this is that it's not necessary. But you need to understand a bit of LabVIEW String handling to do it yourself but that is independent of the fact if it's Intel Hex format, or Supermans text format.

 

Now, this forum has a very nice search option, that you should have been forced to use before you could even post a message. Have you tried to do that? A simple search of "Intel Hex Format" delivers me some 20 hits and while a few are to this thread of course (and wouldn't have been present at the time you should have done the search in the first place), the second one is to a thread where a guy has actually posted a ZIP file that contains VIs to parse Intel Hex Format strings. To combine that with a file read access is a nice homework exercise. It's not how I would program it and it does not handle other than data records, so you will have to do some extra work to get it to work on your 32 bit data (at least ignoring the type 4 extended address record in the beginning and adding it back into the file when write it out, but depending on your data file it may need more than that.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 19
(6,661 Views)