1 / 12

SPEC Socket Programming

SPEC Socket Programming. Logan Daum Mentor: David Schuller CLASSE Physics REU August 13, 2010. Goal. Develop a GUI for controlling motors at D1 Combine the current SPEC command prompt with the video feed Utilize SPEC sockets for communication. D1.

sjordan
Télécharger la présentation

SPEC Socket Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SPEC Socket Programming Logan Daum Mentor: David Schuller CLASSE Physics REU August 13, 2010

  2. Goal • Develop a GUI for controlling motors at D1 • Combine the current SPEC command prompt with the video feed • Utilize SPEC sockets for communication

  3. D1 • Used for GISAXS (Grazing-Incidence Small-Angle X-ray Scattering) • Samples typically organic materials Microscope X-Ray Source CCD Detector Sample Stage

  4. MacCHESS Crystal Centering • Controls the microscope video feed and motors at F1 • Used at D1 for the video feed only • Written in Java, based on a client-server model • Server – Interfaces with motors and the video • Client – GUI instances • Each control group in the GUI is installed as a plug-in • Motor controls communicates directly with motors at F1 • At D1, SPEC is used to interface with motors

  5. Features • Buttons and dials to move motors • Click to move • Camera and light controls • Snapshots • Autocentering • Session parameters saved

  6. SPEC Server • Data acquisition and XRD software package by Certified Scientific Software • Command line interface • C-like syntax • Macro support • Server mode • Interact with other software over a network through sockets • TCP sockets – ordered error-free data transfer • Packets follow a specific format defined by SPEC

  7. SPEC Server Communication • SPEC packet format • Header – holds packet parameters and defines the data type • Data – holds the command or values for SPEC • Socket communication was tested in C++, Python, and Java • C++ • Struct class and native data types useful for writing the packet • Python • Easy access to C structs and types • Socket connections simple • Java • Data types different (chars = 2 bytes, no long int) and no struct class • Socket connections simple

  8. Integrating SPEC with Crystal Centering • Existing motor plug-in replaced with SPEC plug-in Dial Moved GUI Clients Dial Updated Create SPEC Packet Server Plug-in Parses SPEC Packet SPEC Motor Moved Motor Moved

  9. New GUI Features • Select motors for each axis • Poll SPEC for motor names • Set motor name and scaling factor • Preset zoom and focus settings • Both settings are usually coupled • 3 possible preset values

  10. Future Work • Shutter Control Button • Toggle button to open and close the shutter • Track shutter state • Automatically controlled at D1 • Camera Button • Sync CCD detector images with microscope video snapshots • Save to the same filename prefix

  11. Acknowledgements • Mentor: David Schuller • DetlefSmigies, Darren Dale • Phil Sorenson • CLASSE REU program • NSF Grant

More Related