Scan System Update
Scan System Update Kay Kasemir, May 2015. Set and loop commands, direction of nested loops, other commands, and features of the system update. Automation via Channel Access, managing commands, loops, and scripts. Managed by UT-Battelle for the U.S. Department of Energy. Enhancing control and monitoring capabilities for data acquisition and logging processes.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Scan System Update Kay Kasemir, May 2015
Scan Server Sample Sample Environment Environment Equipment Sample Environment Equipments Equipments GUI: CSS REST Scan Server Script EPICS IOCs Channel Access 2 Managed by UT-Battelle for the U.S. Department of Energy
What it is and isnt* Is Automation via Channel Access Scan = Batch of commands Queue multiple scans Basic value logging Submit, monitor, pause, resume, abort Isn t Synchronization of actions beyond Channel Access Data Acquisition (log every event, catalog, keep forever) 3 Managed by UT-Battelle for the U.S. Department of Energy * .. depends on your definition of is
Set, Loop Commands Set some_pv = 3.14 Loop some_pv = 1..10, step 0.5 Optionally Await completion (put-callback) Check read-back to match written value (same or other pv) .. With numeric tolerance Timeout 4 Managed by UT-Battelle for the U.S. Department of Energy
Direction of (Nested) Loops Loop( x , 0, 5, 1) 0, 1, 2, 3, 4, 5 Loop( y , 5, 0, -1) 5, 4, 3, 2, 1, 0 Loop( x , 0, 5, 1, Loop( y , 0, 5, -1)) Alternate direction on mismatch 5 Managed by UT-Battelle for the U.S. Department of Energy
Other Commands Wait for pv1 > 100 Wait for pv2 to increment by 200 Get-callback for initial value, then monitors Log pv1 , pv2 , pv2 Get-callback for current value, to RDB Invoke MyScript Jython-based custom commands 6 Managed by UT-Battelle for the U.S. Department of Energy
Like Sequencer? Yes: Read/write Channel Access No compilation Monitor & control progress of scan Basic data log Schedule multiple scans No arbitrary C code No if-then-else command 7 Managed by UT-Battelle for the U.S. Department of Energy
Like Scan Record? Loop y=1..10: Loop x=1..5: Set det_trigger =1 with completion, Log x.RBV , y.RBV , det_counts Monitor, pause, resume, abort. Save, edit, resubmit scans vs. save/restore scan records. Add 3rd loop without rebooting IOC to add 3rd scan record Queue multiple scans Logs to RDB w/ REST readout. No MDA/XDR/Nexus. 8 Managed by UT-Battelle for the U.S. Department of Energy
REST Interface 9 Managed by UT-Battelle for the U.S. Department of Energy
Scan Editor Add commands Open, save Set parameters 10 Managed by UT-Battelle for the U.S. Department of Energy
Python API 11 Managed by UT-Battelle for the U.S. Department of Energy
Site-Specific Settings class BeamlineScanSettings(ScanSettings): def __init__(self): self.defineDeviceClass("chopper:.*", completion=True) self.defineDeviceClass("motor.*", completion=True, readback=True) def getReadbackName(self, device_name): if "motor" in device_name: return device_name + ".RBV return device_name Set( x , 42) Set( motor_x , 42) Set( x , 42 ) Set( motor_x , 42, completion=True, readback= motor_x.RBV) 12 Managed by UT-Battelle for the U.S. Department of Energy
GUI for Routine Beam Line Task 13 Managed by UT-Battelle for the U.S. Department of Energy
Under the hood Scan Server 14 Managed by UT-Battelle for the U.S. Department of Energy
Alignment Scan 15 Managed by UT-Battelle for the U.S. Department of Energy
Table Scan Load/save *.csv, *.xls 16 Managed by UT-Battelle for the U.S. Department of Energy
Scripted Scan 17 Managed by UT-Battelle for the U.S. Department of Energy
Parallel Command 18 Managed by UT-Battelle for the U.S. Department of Energy
Sequence Command 19 Managed by UT-Battelle for the U.S. Department of Energy
Scan Monitor Scan Monitor 20 Managed by UT-Battelle for the U.S. Department of Energy
Scan Plot Plot variables logged by scan Get data from Running or Finished scans 21 Managed by UT-Battelle for the U.S. Department of Energy
Summary Scan System helps automate SNS since 2013 Scan Server: REST instead of JNI Python API: Pure Python instead of Jython Thanks to Qui Yongxiang, Guobao Shen, Dylan Maxwell New Parallel & Sequence commands Biggest Issue: Can t use numpy (Fortran) inside Script command (Jython) 22 Managed by UT-Battelle for the U.S. Department of Energy