PUT
MoveFromAToB
PUT
StopScanImmediately
PUT
StopScanOnEndpoint
PUT
StopScanOnStartingPosition
PUT
CalculateMaxPossibleSpeedForSmoothMovement
PUT
CalculateMaxPossibleSpeedForSmoothMovementRoundTrip
GET
Status

/MoveFromAToB

Http method: PUT

Starts smooth wavelength scan.

Parameters

Parameter Explanation Recommended default value
MaxMotorPositionError Max allowable motor position error on segment end in speed/acceleration calculations in steps. 16
StartWavelength Starting wavelength from which the scan will be performed.
EndWavelength Pair for StartWavelength.
Repeats Value of 1 means to move from StartWavelength to EndWavelength and stop there, 2 – move to EndWavelength and back again, and so on.
Interaction Interaction that will be used (same usage as when setting wavelength). Multi-interaction scan is currently not implemented.
CustomWavelengthStepSize Step size in nanometers used for calibration curve segmentation. In general, use bigger step size for longer wavelengths and faster speeds. 0 (auto select by algorithm)
IgnoreSeparationConfiguration If true, motors that should be moved because of separation calibration will be ignored. false
NanometersPerSeconds Speed of scan. Speed will be slower on range ends, where motors have to accelerate from standing position or stop. Parameter MaxSpeedError allows to have non-constant movement speed. <=Max possible speed
MaxSpeedError Value of x means that any segment can have slower/faster speed, as long as duration difference is smaller than x*DurationWithOptimalSpeed, where DurationWithOptimalSpeed=WavelengthStepSize/ NanometersPerSeconds. If you application requires constant scan speed, use small positive value, otherwise you might be able to reach higher speeds with large value. 0.1 or 20 if constant speed
CollectMotorPositionsDebugInfo Actual motor positions will be collected during scan with high frequency. At the end of each repeat file containing actual and ideal positions for all motors will be written to folder \Temporary\SmoothSetterDebug (relative to server executable). Data can viewed with WinTopas4 Smooth Scanner tool (MISC tab) by dragging file on graph to check whether scan is sufficiently accurate.
SelectMaxSpeedFastOnServerSide Select max possible speed on server side. Shortened binary search is used, so selected speed might be up to 25% slower than fastest possible. Behavior likely to change in future versions. false

Returned properties

Name Explanation
IsSuccess True if requested scan can be performed.
ErrorMessage If IsSuccess is false, contains reason why scan can not be performed.

Request JSON body example:
{
  "CollectMotorPositionsDebugInfo": false,
  "CustomWavelengthStepSize": 0,
  "EndWavelength": 0,
  "IgnoreSeparationConfiguration": false,
  "Interaction": "art",
  "MaxMotorPositionError": 16,
  "MaxSpeedError": 0.03,
  "StartWavelength": 0,
  "NanometersPerSeconds": 0,
  "Repeats": 1,
  "SelectMaxSpeedFastOnServerSide": false,
  "TempPerformMotorPositionReadDebug": false
}

Response JSON body example:
{
  "CantSetWavelength": false,
  "ErrorMessage": "",
  "IsSuccess": false
}

/StopScanImmediately

Http method: PUT

Stops currently running scan immediately.

Request body is empty.

Response body is empty.

/StopScanOnEndpoint

Http method: PUT

Stops currently running scan on either end of range.

Request body is empty.

Response body is empty.

/StopScanOnStartingPosition

Http method: PUT

Stops currently running scan on starting position.

Request body is empty.

Response body is empty.

/CalculateMaxPossibleSpeedForSmoothMovement

Http method: PUT

Calculates max possible speed for scan with passed parameters, from start wavelength to end wavelength. See parameters description at \MoveFromAToB for more information.

Request JSON body example:
{
  "CollectMotorPositionsDebugInfo": false,
  "CustomWavelengthStepSize": 0,
  "EndWavelength": 0,
  "IgnoreSeparationConfiguration": false,
  "Interaction": "Brooklyn",
  "MaxMotorPositionError": 16,
  "MaxSpeedError": 0.03,
  "StartWavelength": 0
}

Response JSON body example:
{
  "IsSuccess": true,
  "LimitingFactorErrorMessage": "",
  "MaxSpeed": 0
}

/CalculateMaxPossibleSpeedForSmoothMovementRoundTrip

Http method: PUT

Calculates max possible speed for scan with passed parameters, from start wavelength to end wavelength and back again. See parameters description at \MoveFromAToB for more information.

Request JSON body example:
{
  "CollectMotorPositionsDebugInfo": false,
  "CustomWavelengthStepSize": 0,
  "EndWavelength": 0,
  "IgnoreSeparationConfiguration": false,
  "Interaction": "cleanse",
  "MaxMotorPositionError": 16,
  "MaxSpeedError": 0.03,
  "StartWavelength": 0
}

Response JSON body example:
{
  "IsSuccess": true,
  "LimitingFactorErrorMessage": "",
  "MaxSpeed": 0
}

/Status

Http method: GET

Get status of smooth wavelength setter.

Request body is empty.

Response JSON body example:
{
  "IsRunning": false,
  "IsStopScheduled": false,
  "NanometersPerSecondIncludingStartStop": 0,
  "RepeatsLeft": 97
}