Skip to content

The program rotates sample with Owis rotation stage and for each rotation angle it takes image with Pilatus detector. .

Notifications You must be signed in to change notification settings

karolvegso/Owis_rot_stage_with_Pilatus_C_sharp_console

Repository files navigation

Owis_rot_stage_with_Pilatus_console

The program rotates sample with Owis rotation stage and for each rotation angle it takes image with Pilatus detector. The rotation axis is perpendicular to the sample surface.

This console program was developed in C# for phi-scans using GIWAXS method. In this experiment, the sample was rotated with Owis rotation stage (product number, DMT 40-D20-HiDS) and for each rotation position it takes image with Pilatus detector.

The console application asks for COM port of Owis rotation stage, for example COM port = 4. Then, it asks for axis of Owis rotation stage, for example axis = 1. The positioning velocity of Owis rotation stage is set to default value 50000 Hz. The console application asks for initial scanning value, for example 0 deg. The final position of scanning with Owis rotation stage, for example 360 deg. The console application finally asks for step of Owis rotation stage, for example 1 deg. It means that rotation stage will scan for example from 0 deg to 360 deg with step 1 deg.

Then, console application asks for Pilatus detector information. First, console application asks for IP address of Pilatus detector, for example 147.213.112.19. It asks for port of communication with Pilatus detector, for example 41234. It asks for number of images to take with Pilatus detector, for example is equal to 1 image (in the most applications). The console apllication asks for exposure time in seconds, for example 60 seconds. It asks for exposure period, which must be number larger than exposure time. In the most applications take expsoure time value and add 1 second, for example 61 seconds. Finally, you need to set image name, for example image name like image. The image extension is automatically set to tif extension.

The communication with Owis rotation stage is done through motorized stage controller PS10-32-DC. Therefore, the ps10.dll is added to the C# solution. In the line 62, the new object CPS10Win is created with name PS10. Between lines 72 and 84, the connection with PS10 is done. In the line 87, the rotation stage is initialized. Then, the movement of motor is set to absolute values or absolute mode, and velocity of rotation stage is set to default value of 50000. In the line 97, the rotation stage is firstly moved to reference position. In the line 106, the rotation stage is moved to initial postion. In the line 117, the first image is taken with Pilatus detector using Pilatus_exposition function. Between lines 123 and 144, the scanning with rotation stage with step is done. In the line 144, the communication with rotation stage is disconnected.

Between lines 147 and 234, the function Pilatus_exposition for taking Pilatus images is defined. The function opens through TCPClient new session with camserver of Pilatus detector at IP address and port number. the new stream is created or initialzied at the line 153. The commands are written in the stream for setting number of images, exposure time, exposure period and doing exposure with image name. The responses of Pilatus detector are read from stream for setting number of images, exposure time, exposure period and doing exposure with image name. The responses of Pilatus detector to sended commands are printed into the console application. The stream is finally flushed and closed, and session with Pilatus detector is closed.

About

The program rotates sample with Owis rotation stage and for each rotation angle it takes image with Pilatus detector. .

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages