How to add more globals to a DRS

This is just a quick tutorial to show you how to add more global variables or global strings to a DRS. These globals are useful because they’re acessible via the Edit Settings window, which means that people not comfortable with the code can quickly and easily view and modify them (e.g., the “ReferenceStandard” global string). These globals are given a default setting in the header of the DRS, which is used every time a new experiment is opened. If a user decides that they don’t want to change the setting in the experiment they’re working in then they do this via the “Edit Settings” window.

Below is an image of the header text in the Trace_Elements DRS.

To add a new global is pretty straightforward. First, you need to make a new line in the DRS header – the easiest way to do this is to copy an existing line of the header. Pick a GlobalVariable if you want to store a number, or GlobalString if you want to store text (in most cases you’ll want to use a variable).
Put the newly copied line directly beneath the line that says “//**** Any global strings or variables you wish to use in addition to those above can be placed here”, like this:

Now change the name to what you’d like to use (make sure it doesn’t start with a number, isn’t more than 30 characters long, and contains no spaces or special characters), and input your default value (or string):

Now we’re done with the header text, and for the next step you’ll need to look a little lower in the DRS for these lines:

All you need to do here is add your item to the “NVar” list if it’s a GlobalVariable, or the “SVar” list if it’s a Global String. Make sure you add a comma prior to your item, and that the name is identical to what you put in the line above (copy and paste is the best way to ensure this). Here’s my example added to the list of variables:

Now you’re all done. To use the global variable within the DRS just use it like a normal variable, e.g.:

Just note that for the change to take effect in any existing experiments you have you’ll need to go to the Iolite menu and choose “Update old experiment” so that the new global gets detected by the system.
And remember, if you want to change the setting for your global, you should do this via the Edit Settings window. The header of the DRS stores the default value, which will only be read in at the beginning of a new experiment.

If you have any questions then just post a question on the forum.

Comments

  1. Hello there. I am trying to use Iolite for our mapping experiment, but I failed on the first step-Iolite does not recognize our data file. We use ThermoFinnigan Element-2 ICP-MS, and I can export the data into TXT format. I tried to ask the question on the Iolite forum, but it did not allow me to register. By the way, I downloaded the Iolite package last week, and I could not find the sample files.

  2. Hi Lynn,
    I’m also posting a reply to this on the forum – I will investigate why you’re having trouble registering.
    To answer your first question – when you export from the Element it’s important that you use the option called “Glitter”. This should produce a “.FIN” and a “.FIN2” file (it is the latter that will be used by Iolite).
    And regarding the example data files, they can be found at http://iolite.earthsci.unimelb.edu.au/wiki/doku.php?id=example_files.

  3. Chad,
    Thank you for the timely reponse. I see what I was missing. I just looked up the Glitter. It costs $4000, and I could not find a trial edition. I have to think about it, but thank you very much for the help.

  4. Hi Lynn,
    I think I need to clarify. You don’t need to buy Glitter. What I mean is that when you export from the Element-2 a window should pop up that gives you different options for the format of the exported file. One of these options should be called “Glitter export”, and that is the one that will produce files of the right format for importing into Iolite.
    I hope that clarifies things?

    Cheers, Chad

  5. Hi Chad,
    I could not find the option on our ThermoFinnigan software. Do you know where I can find detailed instruction for Element series?

    By the way, I tried Iolite with the example data files. I think it is awsome. I like the movie feature very much. However, I was not able to figure out how to implement calibration into imaging to obatin a map of ppm instead of CPS.

    Thanks again for the help.

  6. Hi Lynn,
    I’ve managed to get some more details about how to export from the Element. I’ve posted on the forum (http://iolite.earthsci.unimelb.edu.au/forum/read.php?4,629) with instructions, including some screen captures. So hopefully that will help?
    Also, we’ve modified the forum settings, so it might be worth trying to register there again.
    Regarding the imaging – my first suggestion would be to check that you had integration periods selected for the reference standard (the default is G_NIST_612), and that you were using the DRS called Trace_Elements.

    Cheers, Chad