Commit 4066433d authored by Blaise Thompson's avatar Blaise Thompson
Browse files

Merge branch 'relative-position' into 'main'


See merge request !72
parents 394e61d1 539f60cf
Pipeline #554693405 passed with stage
in 42 seconds
yep: 312
title: has-reference-position
author: Dan Kohler <>
status: draft
tags: trait
post-history: 2022-06-01
# Abstract
This YEP defines the `has-reference-position` trait.
# Table of Contents
# Motivation
Certain motors have use for both an absolute position (defined hardware) and a relative position (defined by the experiment).
For example, a rotational stage may have an internal angle as specified by the orientation of the stage, but an experimenter may want to specify the angular position relative to a special angle of the system (e.g. Brewster's angle).
Hardware Limit 1 |---------*---------------| Hardware Limit 2
Absolute position 0 ... ... x ... ... max
Relative position -/+x ..... 0 ... ... +/-(max-x)
# Specification
This trait requires `has-limits` (<a href="../303">YEP-303</a>.
This trait wraps an offset and/or a sign change around hardware-defined positions so the clients will set and see a relative position.
This trait overwrite `get_position`, `set_position` such that positions are returned in their relative coordinates.
The principle feature of this trait is the new state item `reference_position`.
## config : invert_relative_position (bool)
Whether to invert sign of the relative position coordinate.
## state : reference_position (float)
The reference position, expressed in coordinates of the absolute position.
Default is `0.0`.
## message : set_reference_position
request : float
set reference position (in absolute position coordinates).
## message : get_reference_position
response : float
## message : get_reference_limits
response : {"type": "array", "values" : ["float]}
Returns limits in the relative coordinate system.
## property : reference_position
getter : "get_reference_position"
setter : "set_reference_position"
limits_getter : "get_reference_limits"
control_kind : "normal"
record_kind : "metadata"
# Backwards Compatability
This trait has no effect on `has-limits` when `invert_relative_position = False` and `reference_position = 0.0`
# Rejected Ideas
# Discussion
# Copyright
This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment