mxcubecore.HardwareObjects.MultiplePositions#

TITLE MultiplePositions Hardware Object

DESCRIPTION This object manages the movement of several motors to predefined positions.

<username> : name of the multiplepositions object <mode> : there is two ways of managing the change of predefined positions

absolute: change the value of a predefined position by another

absolute position

relative: do not change the absolute value of the predefined

position but the user value of the motors concerned

<motors>

<object role=”role1” … :list of motors to be moved to reach a predefined <object role=”role2” … position. the “role” will be used to referenced

… the motors in the definitions of the predefined

<motors> positions

<deltas>for each motor you define the windows used to

<role1>val1</role1> determine that a motor as reach a position <role2>val2</role2> …

</deltas>

<positions>
<poisition>

<name> : name of a predefined position. Must be unique in the file <role1>val1 : position of the motor “role1” for the predefined position

“name”

<role2>val2position of the motor “role2” for the predefined position

“name”

<resoy>8.69565217391e-07</resoy> : for all the position, independant <beamx>100</beamx> value with keyword can be added,

saved, read …

</position> …

</position>

METHOD

name: get_state input par.: None output par.: state description: return an and on the state of all the motor used in the

object

name: moveToPosition input par.: name output par.: None description: move all motors to the predefined position “position”

name: get_value input par.: None output par.: position description: return the name of the current predefined position.

return None if all motors are not in their psotion

name: setNewPositions input par.: name, newPositions output par.: None description: For the position “name”, change the motors positions set

in “newPositions”, a dictionary with motor role as keys and new motor position as values. Save the new values in the xml file

name: getPositionKeyValue input par.: name, key output par.: value description: return the value of the independant “key” field of

the predefined position “name”

name: setPositionKeyValue input par.: name, key, value output par.: None description: Change in the object and in the xml file the value of the

independant field “key” in the predefined position “name”

name: getRoles input par.: None output par.: roles[] description: return the list of motor’s role used in the objects

SIGNAL

name: stateChanged parameter: state description: send the new state of the object when it changes

name: noPosition parameter: None description: sent when after a position change of any of the motor

the object is not in any of the predefined positions

name: positionReached parameter: positionName description: sent when after a position change of any of the motor

the object has reach a predefined position. The parameter is the name of this position.

TEMPLATE <object class=”MultiplePositions”>

<username>VLM Zoom</username> <mode>absolute</mode> <motors>

<object role=”zoom” hwrid=”/berru/zoom”></object>

</motors>

<deltas>

<zoom>0.1</zoom>

</deltas>

<positions>
<position>

<name>1X</name> <zoom>0</zoom> <resox>-4.16666666667e-07</resox> <resoy>7.35294117647e-07</resoy> <beamx>537</beamx> <beamy>313</beamy>

</position> <position>

<name>6X</name> <zoom>1</zoom> <resox>-5.52486187845e-07</resox> <resoy>8.69565217391e-07</resoy> <beamx>100</beamx> <beamy>100</beamy>

</position> <position>

<name>12X</name> <zoom>2</zoom> <resox>0.0000004</resox> <resoy>0.0000004</resoy> <beamx>200</beamx> <beamy>200</beamy>

</position>

</positions>

</object>

Classes

MultiplePositions(rootName)

class mxcubecore.HardwareObjects.MultiplePositions.MultiplePositions(rootName: str)[source]#

Bases: HardwareObject

Parameters:

rootName (str) –

get_state()[source]#

Getter for state attribute.

Implementations must query the hardware directly, to ensure current results.

Returns:

Current state.

Return type:

HardwareObjectState

init()[source]#

Hardware object init.