Skip to content

FW102C/FW212C¤

Communicate with a FW102C/FW212C Motorized Filter Wheel from Thorlabs.

FWxx2C (Serial) ¤

FWxx2C(equipment: Equipment)

              flowchart LR
              msl.equipment_resources.thorlabs.fwxx2c.FWxx2C[FWxx2C]
              msl.equipment.interfaces.serial.Serial[Serial]
              msl.equipment.interfaces.message_based.MessageBased[MessageBased]
              msl.equipment.schema.Interface[Interface]

                              msl.equipment.interfaces.serial.Serial --> msl.equipment_resources.thorlabs.fwxx2c.FWxx2C
                                msl.equipment.interfaces.message_based.MessageBased --> msl.equipment.interfaces.serial.Serial
                                msl.equipment.schema.Interface --> msl.equipment.interfaces.message_based.MessageBased
                




              click msl.equipment_resources.thorlabs.fwxx2c.FWxx2C href "" "msl.equipment_resources.thorlabs.fwxx2c.FWxx2C"
              click msl.equipment.interfaces.serial.Serial href "" "msl.equipment.interfaces.serial.Serial"
              click msl.equipment.interfaces.message_based.MessageBased href "" "msl.equipment.interfaces.message_based.MessageBased"
              click msl.equipment.schema.Interface href "" "msl.equipment.schema.Interface"
            

Communicate with a FW102C/FW212C Motorized Filter Wheel from Thorlabs.

Regular-expression patterns that are used to select this Resource when connect() is called.

manufacturer=r"Thorlabs"
model=r"FW(10|21)2C"

Parameters:

Name Type Description Default
equipment Equipment

An Equipment instance.

required
Source code in packages/resources/src/msl/equipment_resources/thorlabs/fwxx2c.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
def __init__(self, equipment: Equipment) -> None:
    """Communicate with a FW102C/FW212C Motorized Filter Wheel from Thorlabs.

    Regular-expression patterns that are used to select this Resource when
    [connect()][msl.equipment.schema.Equipment.connect] is called.
    ```python
    manufacturer=r"Thorlabs"
    model=r"FW(10|21)2C"
    ```

    Args:
        equipment: An [Equipment][] instance.
    """
    assert equipment.connection is not None  # noqa: S101
    equipment.connection.properties.setdefault("baud_rate", 115200)
    equipment.connection.properties.setdefault("termination", b"\r")
    super().__init__(equipment)

    # The communication protocol is designed for a terminal interface
    # (the command that was written is echoed back). We always need to
    # do an extra read(), so we use query() where a write() would seem
    # appropriate and do another read() to get the requested value.
    _ = self.query("pcount?")
    self._pcount: int = int(self.read())

fast_mode property writable ¤

fast_mode: bool

Whether the filter wheel speed mode is fast or slow.

firmware property ¤

firmware: str

Returns the version number of the firmware.

output_mode property writable ¤

output_mode: bool

Whether the filter wheel trigger mode is an output or input.

In output mode, the filter wheel generates an active-high pulse when the position changes. In input mode, the filter wheel responds to an active-low pulse by advancing the position by 1.

position property writable ¤

position: int

Get/Set the filter wheel position.

position_count property ¤

position_count: int

Returns the number of positions that the filter wheel supports.

sensor_mode property writable ¤

sensor_mode: bool

Whether the filter wheel sensor mode is on or off.

If True, sensors remain on; otherwise sensors turn off when the filter wheel is idle to eliminate stray light.

save ¤

save() -> None

Save the current settings as default on power up.

Source code in packages/resources/src/msl/equipment_resources/thorlabs/fwxx2c.py
91
92
93
def save(self) -> None:
    """Save the current settings as default on power up."""
    _ = self.query("save")