Spectrometer objects

Navigation:  Views > View objects > Action items > Script >

Spectrometer objects

Previous pageReturn to chapter overviewNext page

Objects in the list of spectrometers may be controllers for spectrometers or other devices like shutters or traverse systems.

 

 

The following commands can be used to address spectrometer objects (please note that not every spectrometer object has an implementation of each command):

 

Command

Action

acquire

Executes the 'acquire' action. For spectrometers this means to record a sample spectrum.

acquire sample

Does the same as 'acquire'

acquire dark

Tells spectrometer objects to record their dark spectrum. Ignored by other objects.

acquire reference

Tells spectrometer objects to record their background (or reference) spectrum. Ignored by other objects.

acquire 1

Tells spectrometer objects to record their data field 1. Each spectrometer object has 9 internal data fields which are used for various measurements, e.g. to measure reflectance or transmittance spectra with integrating spheres. These measurements require the recording of several spectrometer signals which are stored in the internal data fields.

acquire 2

Records data field 2

acquire 3

Records data field 3

acquire 4

Records data field 4

acquire 5

Records data field 5

acquire 6

Records data field 6

acquire 7

Records data field 7

acquire 8

Records data field 8

acquire 9

Records data field 9

compute (1-9)/(2-9)

Computes the shown combination of spectrum buffer values and stores the value as measured spectrum of the spectrometer object

compute (3-9)/(4-9)

Computes the shown combination of spectrum buffer values and stores the value as measured spectrum of the spectrometer object

compute (5-9)/(6-9)

Computes the shown combination of spectrum buffer values and stores the value as measured spectrum of the spectrometer object

compute (7-9)/(8-9)

Computes the shown combination of spectrum buffer values and stores the value as measured spectrum of the spectrometer object

compute integrating sphere transmittance

Computes the transmittance spectrum for an integrating sphere system using the values stored in the internal data fields

compute integrating sphere reflectance

Computes the reflectance spectrum for an integrating sphere system using the values stored in the internal data fields

compute integrating sphere reflectance subtract straylight

Computes the reflectance spectrum for an integrating sphere system using the values stored in the internal data fields, subtracting buffer spectrum 9 from the signals which are directly reflected by the reference or sample surface. Spectrum buffer 9 should be recorded with no sample present on the sample stage and is considered to be straylight.

edit

Executes the 'Edit' command, i.e. shows the form with all details of the object

export background spectrum, filename, file_format

Exports the data of the 'background' subobject to a file with the specified filename, using the file format given by file_format. Supported file formats are

 

    1: standard file format

    2: xy-format

    4: SpectraCalc format

    5: Perkin-Elmer format

    27: Excel file

 

export correction spectrum, filename, file_format

Exports the data of the 'correction' subobject to a file with the specified filename, using the file format given by file_format. Supported file formats are given in the table above.

export dark spectrum, filename, file_format

Exports the data of the 'dark' subobject to a file with the specified filename, using the file format given by file_format. Supported file formats are given in the table above.

import background spectrum, filename, file_format

Imports the data of the 'background' subobject from a file with the specified filename, using the file format given by file_format. Supported file formats are

 

    1: standard file format

    2: xy-format

    3: Jcamp format

    4: SpectraCalc format

    5: Perkin-Elmer format

    6: Zeiss format

    7: OPUS format

    8: Customer format 1

    9: Perkin-Elmer ASCII format

    10: Nanospec format

    11: Customer format 2

    12: Customer format 3

    13: NanoCalc format

    14: Ultrascan format

    15: Customer format 4

    16: Jasco format

    18: Hitachi format

    19: Customer format 5

    20: Minolta format

    25: tec5 text file

    27: Excel file

 

import correction spectrum, filename, file_format

Imports the data of the 'correction' subobject reading a file with the specified filename, using the file format given by file_format. Supported file formats are given in the table above.

import dark spectrum, filename, file_format

Imports the data of the 'dark' subobject reading a file with the specified filename, using the file format given by file_format. Supported file formats are given in the table above.

set spectrum buffer to zero, index

Sets the specified spectrum buffer to zero

Set tolerated calibration time

Sets the time period (in seconds) of stable calibration.

Store last calibration time

Stores the current time as time of last calibration. Use this command in a script that does the calibration of the spectrometer to store the calibration time.

Using the script command 'check calibration time' you can display a warning if the last calibration is too far in the past.

 

On the level of SCOUT you can use the script line 'check if calibration needed' to give the user the chance to exit a measurement script when calibration is not valid any more. The routine gets as parameter the name of the spectrometer, a hint to be displayed and a question for the operator. Depending on the answer the script is continued or discontinued.

 

 

Shutters know the commands

Command

Action

open

Open the shutter so that light gets through

close

Close the shutter so that light is blocked

 

 

Traverse systems listen to these messages:

Command

Action

move up

Do a small step to higher positions (step size must be set in the object settings)

move down

Do a small step to lower positions (step size must be set in the object settings)

move to position xxx

Move to the given position where xxx gives the position in internal units of the traverse. This may be steps of the stepper motor or mm.

move to mm xxx

Move to the given position, specified in mm

move to dark position

Move  to the dark position (which must have been defined beforehand)

move to reference position

Move  to the reference position (which must have been defined beforehand)

move to home position

Move  to the home position (which must have been defined beforehand)

OPC send position

Sends the current position to the OPC server. The OPC tag to be addressed must be specified in the command, separated by a comma like "OPC send position, my_opc_position_tag"

OPC send status

Sends the current status (active=true or not active = false) to the OPC server. The OPC tag to be addressed must be specified in the command, separated by a comma like "OPC send status, my_opc_status_tag"

OPC send error code

Sends the current error ID (=0 if no error occurs, error code>0 if an error happened) to the OPC server. The OPC tag to be addressed must be specified in the command, separated by a comma like "OPC send error code, my_opc_error_tag"

OPC send warning

Sends the current warning ID (=0 if no warning occurs, value>0 if a warning is active) to the OPC server. The OPC tag to be addressed must be specified in the command, separated by a comma like "OPC send warning, my_opc_warning_tag"

OPC send activity

Sends the current acitivity ID to the OPC server. The OPC tag to be addressed must be specified in the command, separated by a comma like "OPC send activity, my_opc_activity_tag"

 

 

The WOSP color sensor listens to the following commands:

Command

Action

light on

Switch on the onboard light source

light off

Switch off the onboard light source

 

 

These commands can be passed to trigger objects:

Command

Action

activate

activates the trigger

wake up

activates the trigger

sleep

de-activates the trigger