LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.SPC file format from Galactic Industries (for spectroscopy files)

Hi - I am needing to import galactic industries spectroscopy .spc format files (https://ftirsearch.com/features/converters/SPCFileFormat.htm) using LabVIEW in order to grab the spectra data and put it into .simple X-Y ASCII paired data (2 columns of data, 1 X and 1 Y).  Before jumping into writing a converter, I found this link on ni.com/support:

http://zone.ni.com/devzone/cda/epd/p/id/3310

However, it is unclear to me what this link's information provides or how it allows me to  read .spc files in LabVIEW.  Does anyone know what this link is talking about and has anyone written a data import utility for this file format before I start to?

Thanks,

Don


0 Kudos
Message 1 of 34
(9,588 Views)
Hi Don,

The link you are referring to is a plug-in that you need in order to be able to load the spc files. Please taka a look at this link for a LabVIEW code example and further explanation.


Eli S.
National Instruments
Applications Engineer
Message 2 of 34
(9,556 Views)
Hello Eli - followed all directions including registering of GRAMS_SPC.uri file and putting in appropriate information into the DataPlugin Load File.vi controls, but cannot get the file to unload its data (which is just 1 channel of X and Y data).  This is a Galactic Industries SPC file that should work just fine.  Can you please try it?  I am attaching appropriate files.

Thanks,

Don
Message 3 of 34
(9,542 Views)
Hi Don,

I was able to try this and get it to work. This are the steps I took.

1) Downloaded Load_with_dataplugin_lv80.llb
2) Downloaded the SPC file you posted
3) Dowloaded grams_spc.zip and extrated the file into the same folder as the other two files (mentioned in 1 and 2)
3) Double-clicked on GRAMS_SPC.uri. A window came up and asking me if I want to replace the registered plugin. I said yes.
4) Open DataPlugin Load File.vi and browse to the spc file
5) Enter "GRAMS_SPC" (without the quotation marks) in the Data_plugin name field.

Take a look at this screenshot for reference.


Eli S.
National Instruments
Applications Engineer
Message 4 of 34
(9,481 Views)
My mistake was that I had used "GRAMS_SPC.uri" as the DataPlugin Name (not just "GRAMS_SPC").
 
Now it works.  Thanks for checking this for me!
 
Also note that Thermo Scientific is now in charge of the GRAMS / SPC format.
 
Sincerely,
 
Don


Message Edited by DonRoth on 05-30-2008 09:18 AM
0 Kudos
Message 5 of 34
(9,473 Views)
glad it is working. I actually made that same mistake the first couple of times I tried it! Smiley Happy
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 34
(9,470 Views)
A few more questions:

1) The actual X stream (channel 1) of the file actually starts at X = -25.8 but the software result shows it as starting at X = 0.  Is there a way to pull out the header information within your code (your code is password-protected) which contains Xstart, Xend, and number of points.  Right now, my strategy is going to be opening the file, extracting those parameters from the header, close the file, calculating Offset and Multiplier, then execute the dataplugin code and scale the waveform according to offset and multiplier.  Can I get access to your password-protected code?

2) I will be composing some software based on this code, and making an executable out of it.  Is registration on the end user computer then also required and is there a way to automate this process for the end user?

Thanks,

Don
0 Kudos
Message 7 of 34
(9,465 Views)
One more question - on one computer that I am attempting to install an .exe of my modified code, I double-clicked on the .uri file expecting to get the registration.  Instead I get the windows dialog message below.  Why does one computer recognize the URI file and one does not?




Thanks,

Don


Message Edited by DonRoth on 05-30-2008 12:54 PM
0 Kudos
Message 8 of 34
(9,449 Views)
Hi Don,

1) There is no way yo access the password-protected code.

2) In order to make an executable and run it on different computers, you will have to register the GRAMS_SPC.uri file on every computer that you want to run this executable on. I played around with this a little bit and this procedures turns out to be a little complicated. The program that actually registers the plugin is called usireg.exe and it installs with LabVIEW, this is the reason why you were getting that pop-up message asking you what do you with which program do you want to open that file. usireg.exe along with its associated files is located at c:\Program Files\National Instruments\shared\USI\Bin\. In order to make an executable work, COPY the whole Bin directory into another folder (where your application is) and add it to the LabVIEW project. (Right-click My Computer » Add » Folder (Autopopulating)..). When you create your EXE make sure to include this folder.

As far as programmatically registering the plugin, I would use the System Exec.vi found in the Functions pallete at Connectivity » Libraries and Executables. With this VI you can programmatically register the plugin through the command line.
Eli S.
National Instruments
Applications Engineer
Message 9 of 34
(9,412 Views)

Thanks Eli.

I will try strategy in 2).

In terms of programmatically registering, what I really am after is to automate the process of registration using an installer once the strategy in 2) is implemented (the necessary components are included in the project).  Then a user who gets the installer would not need to perform manual registration - it would be done automatically for them.

Thanks,

 

Don

0 Kudos
Message 10 of 34
(9,409 Views)