6. DSSC Motion System¶
6.1. The DSSC Motion Mechanics¶
In order to operate the quadrants, it has to be understood, how the axes of EACH quadrant are defined, which is shown in the Fig. 6.1
6.1.1. Understanding Opening and Closing the aperture¶
Every positional change from one position into another is done using two opening and two closing sequences, as shown in Fig. 6.2.
Allowed motions are shown with green arrows and prohibited motions with red arrows. The black clockwise and counterclockwise arrows indicate the overall motion direction of all quadrants (but NOT the order of their movement in case of the closing motion).
The order of the two opening sequences is chosen such that:
- The first opening motion (with probably a tight gap <<1mm) is only of 1mm length, to minimize the risk of a quadrant collision (and to avoid the collision switch snapping of its counterpart)
- Consecutive motions are always perpendicular to the each other (so the bigger gap size ≥1mm between the last and the current quadrant has already been established and the current quadrant is moved “along” this gap)
- The last motion finishes the first motion (which was only 1mm and now goes to target)
In the same way the two closing sequences are chosen such that:
- The first closing motion does not fully go to target but leaves a gap that is 1mm wider than the final gap
- Consecutive motions are always perpendicular to the each other and the current quadrant moves towards the quadrants that were just moved into their final position (and thus are not moved anymore in the sequence)
- The last closing motion closes the gap created by the first motion of the sequence
By this we make sure that we close gaps to quadrants only if they are not moved anymore. The only movement along a tight gap (<<1mm) is 1mm long.
Now we have four sequences in total. If we execute two of these sequences one after another we can get any hole size and gap size we want, as shown in some examples in the following sections.
6.2. Operation Instruction¶
6.2.1. Powering and restartting encoders and motors¶
- Use the following combination of commands to prepare the encoders:
- Power ON Encoders
- Reset Encoder
- All encoders should now go to green state. If one or more encoders remain in redstate:
- Check the encoder cable connections
- Verify that non of the encoders are giving error (in case of ERROR: a LED will be flashing in RED on the encoder)
- Read the log file (see Section 6.2.2)
Note
If all cables are connected and RED light stil remains do not move any quadrant and contact detector respinsible person!
The interlock conditions of the motors should all be removed by now. If not, read the section about interlock conditions in the troubleshooting chapter.
- As a last step, if no interlocks are active:
- Reset motors
- Power OFF motors (should be OFF anyway, but just in case)
All motors should be now in greenstate and OFF.
6.2.2. Opening motion system log file¶
The DSSC motion system middle layer device creates a log file. In the log file each step of motion is written in. It is highly recomended that log file is displayed using one of mossible ways bellow and actively monitored motion steps. In addition log file information is needed to be used to undastand/verify current postion of quandants.
- Method 1: Monitoring log in a bash terminal
- connect to the DSSC Karabo control server as xctrl and do:
# cd karabo/var/log/middlelayerserver_sqs_dssc_mov/ # tail -25f current
this will allow you to have live monitoring of the log file.
- Method 2: Monitoring log using firefox from contol netwok
- simply open firefox
- cottect to URL:
exflcon202:8080
if it does not work - connect to
192.168.158.55:8080
- In the brower you will see all log files of DSSC, click on
live
among themiddlelayerserver_sqs_dssc_mov
entry.
Method 3: Monitoring log using firefox from office netwok
Open an ssh tunnel this way: .. code-block:
# ssh -L 8321:localhost:28222 yourusername@bastion.desy.de -t ssh -L 28222:exflcon202:8080 exflgateway
Remove backslesh if copying the command!
Open a firefox and then connect to
localhost:8321
Click on
live
among themiddlelayerserver_sqs_dssc_mov
entry.
6.2.3. Checking positional state of the quadrants¶
Before we can move the quadrants, we have to make sure, that they are in a DEFINED position. With respect to the positions file, this means that the quadrants have to be in one of the 7 positions, defined in the positions file (see Figure 1). In order to do so, proceed as following:
- Check, if the positions file is loaded correctly:
- Make sure that encoderConfig.Read/writeModeisset to
read_from_file
- Click the button
read/write quadrant positions
- See Motion system log update on the Karabo control server (). You should see the positions as shown in
- Make sure that encoderConfig.Read/writeModeisset to
Check if all axes are in a defined state:
- Click the button show encoder values
- see log file in the rerminal window
- You should seea Boolean matrix with one line of all True values
- You should see a statement i.e. “Current Position is Position 7”
If the last 2 points are not shown as described (i.e. if the statement displayed is “Current Position is Position -1”), not all axes are in a defined position.
Note
if you see Current Position is Position -1
contact DSSC DOC or DSSC responsible person.
If all went well, you are now readyfor quadrant motion.
In theory, quadrant motion is straight forward. It consists solely of the following 3 steps:
- Choose the desired position, go to the
DSSC_Motion
scene and select one of the 7 posiions- Click on Go To Position absolute
- Monitor the process in the log terminal
The motion middle layer will now move all 4 quadrants, performing 10 motions:-4 quadrants, 2 directional motions per quadrant plus 2 “gap” movements
Unfortunately, due to the close proximity of the quadrants to the limit switches, it might occur that one of the quadrants hits one of the limit switches and system will be interlocked.
Warning
If motion system gets interlocked, do not try to solve issue by yourself. Contact DOC or DSSC responsible and report what happened, it is very important to know last execudet commands.