General Information

  • Upon execution of a wire scan, data collection will process through the Motion Controller and Digital Scope. Our Aerotech data collection is complete when the Aerotech Digital Scope graphs are finished plotting, and a “Ready” can be seen in the bottom left of the Digital Scope application screen.
  • Throughout the Aerotech interface data collection and allocation processes, our Motion Controller and Data Reader will actively be passing through IGLOBAL flags to identify where in the process Aerotech is at. Our Python retrieval program can be run in the background, waiting for a flag from Aerotech.
    • IGLOBAL(94) is our “Listening” flag, utilized to transition between data acquisition processes.
    • IGLOBAL(98) is our “Request” flag, utilized to identify what data type and how many plots will be pushed into EPICS IOC.
  • Upon completion of data collection in our Digital Scope, a “Request” flag is inputted into either the GUI or set into EPICS IOC. This will trigger Aerotech data allocation into DGLOBALS for Python to retrieve, once Python has been flagged to do so.
    • Once Aerotech data allocation is complete, IGLOBAL(94) “Listening” will flag for Python to retrieve data and plot EPICS PV data into our PyDM GUI.



Aerotech and Python Programs


  • Upon completion of Aerotech Digital Scope plots being completed and ready, we will need a “REQUEST” input to force the “Request made?” Aerotech Judgement to proceed with data allocation.
    • IGLOBAL(98) is our “Request” global integer flag. Its values can be 1 or 2, for position feedback or command. 14 or 15, for current command or feedback. 30 or 31, for position and current feedback or command. 32 or 34, for position or current feedback and command. 34, for all four datatype plots.
      • For full operation, IGLOBAL(98) = 34 is typically set.
    • IGLOBAL(97) is our “Down-sample” global integer condition. For the sake of operation, this integer is already DURING a wire scan, depending on the expected time duration of the wire scan.
      • Aerotech collects one data point per millisecond of a wire scanner via SCOPETRIGPERIOD. This is a crucial value for data acquisition to be of satisfactory runtime, its purpose being to take 1 scope data value every “down-sample” milliseconds. Thus, a data type is expected to be of length “down-sampled length”, being [ds_length] = [milliseconds of wire scan] / [down-sample integer]. This “down-sampled length” is commonly referred to as “downlen” and pushes data allocation and retrieval processes to correct lengths.
  • Once IGLOBAL(98) is processed into Aerotech, via EPICS IOC or PyDM GUI, this will run a particular for-loop condition for data allocation into DGLOBALS, from 100 to up to 4 down-sampled lengths.
    • If DGLOBAL data allocation is still running, IGLOBAL(94) = 0 , meaning Python will not proceed with data retrieval processes.
    • If DGLOBAL data allocation is complete, IGLOBAL(94) = 1, and Python will proceed to pull data with data retrieval processes.
    • If a wire scan is actively collecting (Digital Scope graphs aren’t ready), IGLOBAL(94) = -1, and neither Aerotech now Python can define scope data. This IGLOBAL(94) = -1 condition is set in ws_motion.ab, forcing IGLOBAL(98) to always be zero while active.
      • In the condition that the wire scan has completed, IGLOBAL(98) is set to -1 to execute continuous running in ws_scope_data.ab (our governing program body) and IGLOBAL(94) = 0 , which holds Python retrieval processes from executing, but allows us to know that the wire scan is complete.



  • Our Python program, running in the background, is actively waiting for IGLOBAL(94) = 1. This flag condition only holds when Aerotech ws_scope_data.ab has processed an IGLOBAL(98) request and has completed a data allocation in DGLOBALS.
    • We utilize existing functions within comm.py to define a class for EnsembleComm and its IGLOBAL and DGLOBAL functions, related to “getting” and “setting” these values.
    • We actively “get” IGLOBAL(94) from Aerotech, and once it is = 1, Python will retrieve IGLOBAL(98) request from Aerotech to properly define our data type and number of plots.
    • We “get” data parameters from Aerotech as IGLOBAL(99) “numpoints” (the time duration of wire scan from SCOPESTATUS(2)) and IGLOBAL(97) “downsample”. This will define our time-axis for plotting, alongside the data lengths for “getting” dglobals.
  • Once all these IGLOBALs, our IGLOBAL(94, 98) flags and our IGLOBAL(97, 99) data parameters, have been retrieved from Aerotech, we can mirror the data allocation for-loop processes from Aerotech-side into our “get DGLOBALs” for-loops in Python.
    • These for-loops will pull DGLOBALs and data types, one at a time until we reach the down-sampled length(s).
  • Upon completion, we can tabulate data into .csv files and use EPICS commands in Python to plot our scope data as PVs.
  • At this point, our Python program is entirely complete, and thus the entire data acquisition pipeline is finished. Through our “setting” functions in comm.py, IGLOBAL(94, 98) flags are set back to 0, such that Python is “listening for a trigger” ( IGLOBAL(94) = 0 condition ) and Aerotech is “waiting for a new request to proceed” with data allocation ( IGLOBAL(98) = 0 condition ) .
    • These flag conditions can be altered to different integer values in the future for new case-scenarios. As of now, this simply allows us to repetitively push requests in Aerotech for data allocation and pull data with Python into EPICS PVs. This is contingent on the condition that the wire scan is complete.

  • Assuming seamless execution of both Python and Aerotech programs being executed together, this is the governing control system for the data acquisition program.
    • The only manual input set into this program will be the “Request” flag input. The “Listening” flag is defined rigidly in code to flag transitions.
    • "Execute Python data retrieval” is a pre-existing process, assuming it runs upon execution of the PyDM GUI Start Wire Scan. It is NOT an input and exists in this flow chart to acknowledge its background execution, actively “getting” an IGLOBAL(94) Listening flag.
  • The centerpiece of this control system is “has “Request” been made?” . If a request has been initiated, the rest of the data acquisition processes will flow one after another. If not, nothing after will occur.




  • No labels