LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read map file ?

Solved!
Go to solution

Hi,

 

   I have a linker map file having some data like below

 

   File name :Load.map

              

     2000b598   ABC

     20009672   bbb

 

  My requirement is to read  hex value when  an input is given.

 

  Inuts are "ABC" or "bbb" .

 

  Example: when input "bbb" is given then 20009672 needs to be displayed in  indicator.

 

  please let me know the solution as this is very urgent.

 

Thanks in advance,

krishna 

0 Kudos
Message 1 of 12
(8,355 Views)

Read the file into an array, index out column 2, do a Search 1D Array for the input value, use the index of the found value to get the value in column 1.

 

 

0 Kudos
Message 2 of 12
(8,350 Views)

Hi,

 

   Nice to see your reply. The thing is there is no provision to read *.map file using File operations. So how to read *.map file ?.

 

Regards,

krishna 

0 Kudos
Message 3 of 12
(8,340 Views)

There's no provision to read any specific file extension beyond the NI files such as lvm. Your original post specified a data format and I got the impression it was a text file. It's it's not really that, you will have to do some extra work.

Use the Read from Text File or Read From Binary File. If it's binary, you will have to know the format. If this .map file is something you created, you already have the information.

 

0 Kudos
Message 4 of 12
(8,334 Views)

In my orginal post I mentioned as linker file and file name too. nyways sorry to say this I didn't understood below line

 

"If this .map file is something you created, you already have the information."

 

I hope you understood my question. If no please let me know I'll try to give more clarity.

 

Thanks,

krishna 

0 Kudos
Message 5 of 12
(8,330 Views)

Yeah, missed the fact that it was a linker file.

 

What generated the .map file? The only .map files on my system are xml. What does yours look like when you open it with notepad?

0 Kudos
Message 6 of 12
(8,325 Views)

:-).

 

Linker file generated by Multi.

 

Assuming my linker file having the following data

 

File name : Load_3.0.map

 

2000b598    Switch1
2000b590    Switch2

 

Now I want to read Switch2 address. When I read using match pattern I got the output as

 

 2000b598    Switch1

 2000b590

 

But I am expecting output as  2000b590.

 

Please find the attached vi and map file for your reference. I know I need to work around something but I'm snot sure what need to be done.

 

Please modify Load_3.0.txt to "Load_3.0.map" due to an attachment error.

 

Awaiting for your positive reply.

 

Regards,

krishna 

 

Download All
0 Kudos
Message 7 of 12
(8,320 Views)
It's just a tab-delimited text file. The .map extension is irrelevant. Just do what Dennis said in his initial reply. You can use Read From Spreadsheet File to read in the file.
0 Kudos
Message 8 of 12
(8,310 Views)
I am sorry to ask you that can you modify the attached vi  and reply please ?.
0 Kudos
Message 9 of 12
(8,307 Views)
Solution
Accepted by topic author krishna_ak

Get Column 1 Value.PNG

 

 

This is really basic stuff - both with LabVIEW and file reads/array manipulation in general. check into the tutorials.

0 Kudos
Message 10 of 12
(8,301 Views)