06-23-2009 01:21 PM
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
Solved! Go to Solution.
06-23-2009 01:29 PM
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.
06-23-2009 02:06 PM
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
06-23-2009 02:15 PM
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.
06-23-2009 02:23 PM
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
06-23-2009 02:46 PM
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?
06-23-2009 02:58 PM
:-).
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
06-23-2009 03:18 PM
06-23-2009 03:27 PM
06-23-2009 03:48 PM
This is really basic stuff - both with LabVIEW and file reads/array manipulation in general. check into the tutorials.