LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading in hex file and placing the data in array

I'm working on a project for school and i have to read in a hex file, take out the data part and place it under the right adress (that is mentioned in the hex file) in an array. I'm completely new at labview and I don't really know how to start with this.

 

0 Kudos
Message 1 of 6
(4,008 Views)

Then click this link, scroll down just a bit and look for the training courses link.  This will help you get started with the software.

 

2018-12-07_9-10-27.png

aputman
0 Kudos
Message 2 of 6
(3,993 Views)

@RobbeFeys wrote:

I'm working on a project for school and i have to read in a hex file, take out the data part and place it under the right adress (that is mentioned in the hex file) in an array. I'm completely new at labview and I don't really know how to start with this.


First step is to clarify the requirements.

What exactly do you mean by a "hex file".  A raw data file?  A text file that shows the data in an ASCII hex format?  How is the data in the file organized?

 

Once these are defined, we can work on reading the file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(3,952 Views)

it's a txt file with line by line intel hex language.

I already have made something but it only works for one line of the file.

 

Download All
0 Kudos
Message 4 of 6
(3,939 Views)

@RobbeFeys wrote:

I already have made something but it only works for one line of the file.


That is because you keep overwriting your file data.  Open the file outside of the loop and don't close it until the loop is complete.  You can then write as much as you want in the middle.  You should also spend a little time cleaning up your diagram to make it easier to read.

 

 

But then we get into the question of figuring out the address that the data belongs to.  Do you have a full breakdown of how each line of data is formatted?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 6
(3,937 Views)

Thanks for the help!

 

The only thing i have is that text file as an example.

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