Skip to content

This C# console program scans with single axis of the hexapod and for each step it takes image with Pilatus detector.

Notifications You must be signed in to change notification settings

karolvegso/Hexapod_single_axis_scan_with_Pilatus_C_sharp_console

Repository files navigation

Hexapod_single_axis_scan_with_Pilatus_C_sharp_console

This C# console program scans with single axis of the hexapod and for each step it takes image with Pilatus detector.

This C# console program first asks for IP address of the hexapod, for example 147.213.112.19. Then, it asks for operating port of the hexapod, for example 50000. In the line 26, the session with hexapod is opened using TCPClient. The network stream with the hexapod is get in the line 27. Then, the console application asks for scanning axis. It can be X, Y, Z, U, V, W. The console application then asks for the initial absolute position of the hexapod axis, the final absolute position of the hexapod axis and relative step of the hexapod axis. The console application gives you possibility to set an idle time, during which the hexapod moves to the initial position. It can be for example 60 seconds. The console application gives you possibility to set an idle time, during which the hexapod performs relative movement. It can be for example 1 second. Then, the console application asks for the IP addres of the Pilatus detector, for example 147.213.112.21. It asks for the port of the camserver of the Pilatus detector, for example 41234. Finally, the console application allows you to set number of images you want to take, exposure time of the Pilatus detector (for example 60 seconds), exposure period of the Pilatus detector (for example 61 seconds, expsoure time + extra time 1 second) and image name (for example image). The exposure period must be value always bigger than exposure time. The image name is without extension, tif extension is added automatically. The function for taking images with Pilatus detector is named Pilatus_exposition and is between lines 120 and 207. The session with Pilatus detector is opened on the IP address and port in the line 123 using TCPClient. The network stream with the Pilatus detector is get in the line 126. The commands for setting number of images, exposure time, exposure period, image exposure are written into the stream of the Pilatus detector. The responses of the Pilatus detector are printed into the console application. Finally, the network stream with the Pilatus detector is flushed and closed in the lines 202 and 203. The session with the Pilatus detector is closed in the line 204. The movement of the hexapod to the initial position is done in the line 82. The first image for the initial position is taken in the line 89. The scanning of the single axis with realtive movement is done between lines 95 and 112 in while loop. The scanning is ended when the final position as achieved. The network stream with the hexapod is flushed and closed in the lines 114 and 115. The session with the hexapod is closed in the line 116.

About

This C# console program scans with single axis of the hexapod and for each step it takes image with Pilatus detector.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages