HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
horiba::devices::single_devices::Monochromator Class Referencefinal

Represents a Monochromator. More...

#include <mono.h>

Inheritance diagram for horiba::devices::single_devices::Monochromator:

Public Types

enum class  Shutter : int { FIRST , SECOND }
 Shutters installed in the monochromator. Depending on the model, not all shutters may be available. More...
 
enum class  ShutterPosition : int { CLOSED , OPENED }
 Position of the shutter. More...
 
enum class  Grating : int { FIRST , SECOND , THIRD }
 Gratings installed in the monochromator. Depending on the model, not all gratings may be available. More...
 
enum class  FilterWheel : int { FIRST , SECOND }
 Filter wheels installed in the monochromator. Depending on the model, not all filter wheels may be available. More...
 
enum class  FilterWheelPosition : int { RED , GREEN , BLUE , YELLOW }
 Positions of the filter wheel installed in the monochromator. Depending on the model, not all positions may be available. More...
 
enum class  Mirror : int { ENTRANCE , EXIT }
 Mirrors installed in the monochromator. Depending on the model, not all mirrors may be available. More...
 
enum class  MirrorPosition : int { AXIAL , LATERAL }
 Possible positions of the mirrors. More...
 
enum class  Slit : int { A , B , C , D }
 Slits available on the monochromator. Depending on the model, not all slits may be available. More...
 

Public Member Functions

 Monochromator (int id, std::shared_ptr< communication::Communicator > communicator)
 
 ~Monochromator () override=default
 
void open () noexcept(false) override
 Opens the device.
 
void close () noexcept(false) override
 Closes the device.
 
bool is_open () noexcept(false)
 Checks if the connection to the monochromator is open.
 
bool is_busy () noexcept(false)
 Checks if the monochromator is busy.
 
void home (bool force_homing=false) noexcept(false)
 Starts the monochromator initialization process called "homing".
 
bool initialized () noexcept(false)
 Checks if the monochromator is initialized.
 
nlohmann::json configuration () noexcept(false)
 Returns the configuration of the monochromator.
 
double get_current_wavelength () noexcept(false)
 Current wavelength of the monochromator's position in nm.
 
void calibrate_wavelength (double wavelength) noexcept(false)
 This command sets the wavelength value of the current grating position of the monochromator.
 
void move_to_target_wavelength (double wavelength) noexcept(false)
 Orders the monochromator to move to the requested wavelength.
 
Grating get_turret_grating () noexcept(false)
 Current grating of the turret.
 
void set_turret_grating (Grating grating) noexcept(false)
 Select turret grating.
 
FilterWheelPosition get_filter_wheel_position (FilterWheel filter_wheel) noexcept(false)
 Current position of the filter wheel.
 
void set_filter_wheel_position (FilterWheel filter_wheel, FilterWheelPosition position) noexcept(false)
 Sets the current position of the filter wheel.
 
MirrorPosition get_mirror_position (Mirror mirror) noexcept(false)
 Position of the selected mirror.
 
void set_mirror_position (Mirror mirror, MirrorPosition position) noexcept(false)
 Sets the position of the selected mirror.
 
double get_slit_position_in_mm (Slit slit) noexcept(false)
 Returns the position in millimeters[mm] of the selected slit.
 
void set_slit_position (Slit slit, double position_in_mm) noexcept(false)
 Sets the position of the selected slit.
 
int get_slit_step_position (Slit slit) noexcept(false)
 Returns the step position of the selected slit.
 
void set_slit_step_position (Slit slit, int step_position) noexcept(false)
 Sets the step position of the selected slit.
 
void open_shutter () noexcept(false)
 Opens the shutter.
 
void close_shutter () noexcept(false)
 Closes the shutter.
 
ShutterPosition get_shutter_position (Shutter shutter) noexcept(false)
 Returns the shutter position.
 
void wait_until_ready (std::chrono::seconds timeout) noexcept(false)
 Blocking waits until the monochromator is ready.
 
- Public Member Functions inherited from horiba::devices::single_devices::Device
 Device (int id, std::shared_ptr< communication::Communicator > communicator)
 
virtual ~Device ()=default
 
int device_id () const
 

Additional Inherited Members

- Protected Member Functions inherited from horiba::devices::single_devices::Device
communication::Response execute_command (const communication::Command &command)
 

Detailed Description

Represents a Monochromator.

This class should not be created directly by the end user. Instead a DeviceManager should be used to access the detected Monochromators on the system.

Member Enumeration Documentation

◆ FilterWheel

Filter wheels installed in the monochromator. Depending on the model, not all filter wheels may be available.

Enumerator
FIRST 
SECOND 

◆ FilterWheelPosition

Positions of the filter wheel installed in the monochromator. Depending on the model, not all positions may be available.

Enumerator
RED 
GREEN 
BLUE 
YELLOW 

◆ Grating

Gratings installed in the monochromator. Depending on the model, not all gratings may be available.

Enumerator
FIRST 
SECOND 
THIRD 

◆ Mirror

Mirrors installed in the monochromator. Depending on the model, not all mirrors may be available.

Enumerator
ENTRANCE 
EXIT 

◆ MirrorPosition

Possible positions of the mirrors.

Enumerator
AXIAL 
LATERAL 

◆ Shutter

Shutters installed in the monochromator. Depending on the model, not all shutters may be available.

Enumerator
FIRST 
SECOND 

◆ ShutterPosition

Position of the shutter.

Enumerator
CLOSED 
OPENED 

◆ Slit

Slits available on the monochromator. Depending on the model, not all slits may be available.

Enumerator

Constructor & Destructor Documentation

◆ Monochromator()

horiba::devices::single_devices::Monochromator::Monochromator ( int id,
std::shared_ptr< communication::Communicator > communicator )

◆ ~Monochromator()

horiba::devices::single_devices::Monochromator::~Monochromator ( )
overridedefault

Member Function Documentation

◆ calibrate_wavelength()

void horiba::devices::single_devices::Monochromator::calibrate_wavelength ( double wavelength)

This command sets the wavelength value of the current grating position of the monochromator.

Warning! This could potentially un-calibrate the monochromator and report an incorrect wavelength compared to the actual output wavelength.

Parameters
wavelengthWavelength in nm
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ close()

void horiba::devices::single_devices::Monochromator::close ( )
overridevirtual

Closes the device.

Exceptions
std::runtime_errorwhen an error occurred on the device side

Implements horiba::devices::single_devices::Device.

◆ close_shutter()

void horiba::devices::single_devices::Monochromator::close_shutter ( )

Closes the shutter.

Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ configuration()

nlohmann::json horiba::devices::single_devices::Monochromator::configuration ( )

Returns the configuration of the monochromator.

Returns
Configuration of the monochromator
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_current_wavelength()

double horiba::devices::single_devices::Monochromator::get_current_wavelength ( )

Current wavelength of the monochromator's position in nm.

Returns
The current wavelength in nm
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_filter_wheel_position()

FilterWheelPosition horiba::devices::single_devices::Monochromator::get_filter_wheel_position ( FilterWheel filter_wheel)

Current position of the filter wheel.

Parameters
filter_wheelDesired filter wheel to get the position from
Returns
current position of the filter wheel. See Monochromator::FilterWheelPosition enum for possible values.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_mirror_position()

MirrorPosition horiba::devices::single_devices::Monochromator::get_mirror_position ( Mirror mirror)

Position of the selected mirror.

Parameters
mirrorDesired mirror to get the position from. See Monochromator::Mirror for possible values.
Returns
Current mirror position. See Monochromator::MirrorPosition for possible values
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_shutter_position()

ShutterPosition horiba::devices::single_devices::Monochromator::get_shutter_position ( Shutter shutter)

Returns the shutter position.

Parameters
shutterDesired shutter to get the position from. See Monochromator::Shutter.
Returns
ShutterPosition::OPEN or ShutterPosition::CLOSED
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_slit_position_in_mm()

double horiba::devices::single_devices::Monochromator::get_slit_position_in_mm ( Slit slit)

Returns the position in millimeters[mm] of the selected slit.

Parameters
slitDesired slit to get the position from. See Monochromator::Slit for possible values
Returns
Position in mm
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_slit_step_position()

int horiba::devices::single_devices::Monochromator::get_slit_step_position ( Slit slit)

Returns the step position of the selected slit.

Parameters
slitDesired slit to get the position from.
Returns
Returns the step position.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ get_turret_grating()

Grating horiba::devices::single_devices::Monochromator::get_turret_grating ( )

Current grating of the turret.

Returns
Current grating of turret, see Monochromator::Grating enum for possible values
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ home()

void horiba::devices::single_devices::Monochromator::home ( bool force_homing = false)

Starts the monochromator initialization process called "homing".

Use is_busy() to know if the operation is still taking place.

Parameters
force_homingForce starts the initialization process.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ initialized()

bool horiba::devices::single_devices::Monochromator::initialized ( )

Checks if the monochromator is initialized.

Note: This command may also return false when the mono is busy with another command.

Returns
True if initialized, false otherwise
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ is_busy()

bool horiba::devices::single_devices::Monochromator::is_busy ( )

Checks if the monochromator is busy.

Returns
True if busy, false otherwise
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ is_open()

bool horiba::devices::single_devices::Monochromator::is_open ( )

Checks if the connection to the monochromator is open.

Returns
True if the connection is open, false otherwise
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ move_to_target_wavelength()

void horiba::devices::single_devices::Monochromator::move_to_target_wavelength ( double wavelength)

Orders the monochromator to move to the requested wavelength.

Use is_busy() to know if the operation is still taking place.

Parameters
wavelengthWavelength in nm
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ open()

void horiba::devices::single_devices::Monochromator::open ( )
overridevirtual

Opens the device.

Exceptions
std::runtime_errorwhen an error occurred on the device side

Reimplemented from horiba::devices::single_devices::Device.

◆ open_shutter()

void horiba::devices::single_devices::Monochromator::open_shutter ( )

Opens the shutter.

Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ set_filter_wheel_position()

void horiba::devices::single_devices::Monochromator::set_filter_wheel_position ( FilterWheel filter_wheel,
FilterWheelPosition position )

Sets the current position of the filter wheel.

Parameters
filter_wheelDesired filter wheel to set the position
positionNew position of the filter wheel. See Monochromator::FilterWheelPosition enum for possible values.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ set_mirror_position()

void horiba::devices::single_devices::Monochromator::set_mirror_position ( Mirror mirror,
MirrorPosition position )

Sets the position of the selected mirror.

Parameters
mirrorDesired mirror to set the position. See Monochromator::Mirror
positionPosition to set. See Monochromator::MirrorPosition
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ set_slit_position()

void horiba::devices::single_devices::Monochromator::set_slit_position ( Slit slit,
double position_in_mm )

Sets the position of the selected slit.

Parameters
slitDesired slit to set the position. See Monochromator::Slit for possible values. position Position to set in millimeters[mm].
position_in_mmPosition in mm
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ set_slit_step_position()

void horiba::devices::single_devices::Monochromator::set_slit_step_position ( Slit slit,
int step_position )

Sets the step position of the selected slit.

Parameters
slitDesired slit to set the step position. See Monochromator::Slit for possible values.
step_positionThe step position.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ set_turret_grating()

void horiba::devices::single_devices::Monochromator::set_turret_grating ( Grating grating)

Select turret grating.

Parameters
gratingNew grating of the turret. See Monochromator::Grating enum for possible values.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ wait_until_ready()

void horiba::devices::single_devices::Monochromator::wait_until_ready ( std::chrono::seconds timeout)

Blocking waits until the monochromator is ready.

Parameters
timeoutMaximum time, in seconds [s], to wait for the monochromator to be ready.
Exceptions
std::runtime_errorwhen the timeout is reached

The documentation for this class was generated from the following file: