LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a binary image of memory media in LabVIEW

I have some equipment that uses PCMCIA memory modules formated with FAT12 and a newer version that uses USB memory sticks.  I want to pull binary images of a series of these and then parse the images using LabVIEW.  Any help on how to pull a binary image of memory media using LabVIEW?

0 Kudos
Message 1 of 6
(3,243 Views)

Hi hsb,

 

as yur "media" seems to use standard file systems you could access the data files using standard file functions. (In your case I would prefer the "Read Binary File" function.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,229 Views)

Gerd,

 

A first problem is that Windows doesn't support FAT12, so in Explore or the open file dialog the drive doesn't show up.  However, if you go into Windows disk manager or a HEX editor it shows up as an unformated physical disk.  The system then wants you to format it before assigning it a drive letter, which of course would destroy the data on it but also make it unreadable going back to the machine that uses it.

 

So in LabVIEW I need some way to recognize this as a mass storage device.  It does show up that way also under Windows disk manager or when I select the "Safely Remove Hardware" icon.

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

Hi hsb,

 

What version of Windows are you using. Windows XP supports FAT12. The is a document that talks about it here.

 

I suggest that you just mount this volume and use LabVIEw standard file I/O tools to do what you need.

 

Please let us know how this works out

Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
0 Kudos
Message 4 of 6
(3,191 Views)

Joe,

 

Thanks for the help.  I am a little further but still not complete on this.  I discovered that I have to reboot the laptop (which is running Windows Vista) in order the have the PCMCIA card reader/writter assign a drive letter.

 

In LabVIEW I tried the "Get Volume Info" vi and it recognizes a new SRAM PCCard and returns that it has 512K.  However, a card with data on it gets an error 6.

 

I also tried the "File Dialog" vi and it also reads the blank SRAM PCMCIA but wants to reformat one with data on it!

 

Now that I have a drive letter, what I need is something that will go out at a low level and just copy the binary data off the SRAM.  The rest of my program will then parse the binary image of the SRAM and extract the information from it.

 

I have been able to get a binary image using a freeware HEX editor, HxD.  I then use LabVIEW to parse the image, which is now a file.  I am trying to eliminate the need to first use the HEX editor to get the binary image.

0 Kudos
Message 5 of 6
(3,181 Views)

Hi,

 

you could call that external program with SysExec and then access the file generated by that HexEd...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,171 Views)