1 / 60

SOAR/CTIO

SOAR/CTIO. ArcVIEW CCD Control System. Training. Agenda. - Introduction & schedule - ArcVIEW System Overview - mBuff - AVMemManager - PCI ‘C’ driver functions review - LabVIEW driver: SDSU-II - SOAR Communications - Gscript Scripting Language - Gscript Tools & Manager. Agenda - II.

maeve
Download Presentation

SOAR/CTIO

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. SOAR/CTIO ArcVIEW CCD Control System Training

  2. Agenda - Introduction & schedule - ArcVIEW System Overview - mBuff - AVMemManager - PCI ‘C’ driver functions review - LabVIEW driver: SDSU-II - SOAR Communications - Gscript Scripting Language - Gscript Tools & Manager

  3. Agenda - II - ArcVIEW Main Application - Gscript Extension Functions - ArcVIEW GUIs & Ops review - Camera GUI - CCD Editor - Script Manager - Utility Screen - Status Panel - OCS Queue Manager - FAT Test Procedure - Post FAT Data Report - Integration & Testing Plans

  4. Image Buffer ArcVIEW Architecture Queue files Queue Manager Queue Editor Waveform Generator Macro BTC Type Status GUI Handler & GUI Camera GUI with SOAR Comms Lib & DataSockets ArcVIEW <32KB/packet Waveform files with 4 amplifier links Max of 3.2 MB/sec Inside PC cPCI interface board Outside PC Cmds & clocks SDSU-II CCD Image Data

  5. mBuff & AVMemManager - mBuff driver provided by German - multiple buffers referenced by name & pointer - buffers locked in physical memory - startup methods: manual, or scripted at machine startup - ArcVIEW uses script line in rc.local - ArcVIEW uses “mbuff_attach” function to insure cleanup - pointer to buffer passed to “read_image” LabVIEW & ‘C’ functions - (discussion of any recent changes)

  6. Image /memory data flow Rc.local startup script loads mbuff Create_Buffer.vi Image to LabVIEW SCL Mbuff driver PtrBuf1, PtrBufn Get progress unscramble FITS Readout_image function runs DMA xfr Buffer ’n’ Astro PCI DMA 1 Astro PCI DMA 2 Buffer 1 CCD Leach Controller

  7. PCI ‘C’ Driver - PCI ‘C’ driver provided by CTIO - shared library under Linux: libastro.so int read_reply (int fd, int expected) int get_hctr (int fd) int get_hstr (int fd) int get_readout_progress (fd) int set_destination (int fd, int num_of_args, int board_dest) int open_driver(int flags) int reset_controller (int fd) int close_driver (int fd) int get_info (int fd, unsigned short *info) int load_application (int fd, int app, short dest)

  8. PCI functions (cont) - PCI ‘C’ driver provided by CTIO - shared library under Linux: libastro.so int power (int fd, short flag) int move_shutter (int fd, short flag) int set_exp_time (int fd, unsigned int val) int start_exposure (int fd) int read_exposure_time (fd) int expose (int fd, unsigned int exp_time, int *ret) int abort_exposure (int fd) int abort_readout (int fd) int pause_exposure (int fd) int resume_exposure (int fd)

  9. PCI functions (cont-2) - PCI ‘C’ driver provided by CTIO int test_data_link (int fd, short dest, int data) int manual_command (int fd, int *arg1, int *arg2, int *arg3, int *arg4, int *arg5, int command, short board_dest) int read_memory (int fd, char *type, int address) int write_memory (int fd, char *type, int address, int value) int resume_idle (int fd) int stop_idle (int fd) int set_temperature (int fd, int value) int read_temperature (int fd) int load_file (int fd, char *filename, short dest) int dimensions (int fd, unsigned int ncols, unsigned int nrows)

  10. PCI functions (cont-3) - PCI ‘C’ driver provided by CTIO int set_gain_and_speed (int fd, int gain, int speed) int readout_image (int fd, int bytes_to_receive, char *location) int wait_image (int fd, int bytes_to_receive, char *location) - Discussion of any recent changes to driver

  11. LabVIEW SDSU-II Driver - Semi-Standard form driver provided by Imaginatics - One to One lower level calls to the PCI ‘C’ Driver routines - Intermediate level VIs will do most of the work - Linked with AVMemManager.llb VIs for image readout - Driver “Tree” VI loaded into memory, brings entire driver in at once - Most of the access should be by LabVIEW, but can be called by Gscript - Review Tree and typical VI - Utility Panel for checkout and manual use - Discussion of any desired changes to driver

  12. LabVIEW SDSU-II Driver Tree

  13. LabVIEW SDSU-II Driver - Low Level Diagram Front Panel

  14. LabVIEW SDSU-II Driver - Mid Level Front Panel

  15. LabVIEW SDSU-II Driver - Mid Level Diagram

  16. LabVIEW SDSU-II Utility Panel Setup

  17. LabVIEW SDSU-II Utility Panel Settings

  18. LabVIEW SDSU-II Utility Panel Memory

  19. LabVIEW SDSU-II Utility Panel Utility

  20. LabVIEW SDSU-II Utility Panel Imaging

  21. LabVIEW SDSU-II Utility Panel Errors

  22. Diagram 1 LabVIEW SDSU-II Utility Code

  23. SOAR Communications - II - Type I Server: - Single TCP/IP Links - Polling to get status - “Done” with requested actions - Type II Server - Duplex Links initiated by Client - Cmd - Response + “Callback” on 2nd link - Pending Action Lists - Both Client and Server - Only one pending action per device on Server side - Watcher for Time Out of pending action - Run “Callback” VI on client side when “Done” is received

  24. SOAR Communications - II - Type II Client/Server: - Client initiates 2 TCP/IP Links at sequential port numbers Link I Client Cmd Server Immed Response Post Pending Action both lists Link II Callback Acknowledge Clear Pending Action both lists Run “Callback” VI on client side

  25. Pending Callback Manager - When callback comes in 2nd link, the comm VI inserts the CB request into the Pending Action Queue. The Pending Action Manager retrieves the request and processes. - Search list for entry, deletes - Run Callback VI using VIServer - Send error if callback is not found in pending list - Timeouts on Pending Actions - Wait for pending action requests for 1 sec - search list for pending callbacks that have reached time out - delete and run callback with error

  26. Pending Action Manager

  27. Pending Action Manager

  28. GScript • - What GScript is: • - A “Basic” like scripting tool to give flexible automation to running LabVIEW VIs. • - A way to allow non-labview programmers to change the way a LabVIEW application behaves without an extensive “GUI” • - What it is not: • - A complete application programming language • - It should not be used to do the work that LabVIEW and your application program is meant to do.

  29. GScript - Capabilities • - Normal control constructs: • - FOR, WHILE, loops. • - IF / THEN / ELSE, GOTO LABEL • - CALL (subscript Proc) RETURN • - <#INCLUDE> other subscripts • - Synchronize scripts and external VIs • - Load, Run and unload VIs • - Read / Write LabVIEW global variables • - Extension Functions: • - Additions to the functions available in the base package to support application specific tasks • - Write it once in LabVIEW, call it from GScript.

  30. GScript - Limitations • - Interpreted language, not the same performance as LabVIEW or ‘C’ • - No switch construct. • - No arrays or structures. Simple data types only. • - NUM, STRING, BOOL(ean) • - No direct GUI / windowing tools or functions • - Can these be added? Yes. Why are they not in now? • 1 To insure that scripting language bloat does not occur • 2 To insure that the work being done stays in LabVIEW

  31. GScript - Main Components QuickScript GScript Editor Preprocessor GQ GScriptRUN Multi Script Manager Reentrant Run Time Engine

  32. GScript Preprocessor - Runs as GUI or SubVI- Inputs Scripts or files- Source (*.SVW)- Run Option- Output Files-”P” code - Report (*.RPT) - Included (*.SVM) - Flat (*.SVR)

  33. GScript Diagram

  34. GScriptRUN Front Panel

  35. GScriptRUN Diagram - I

  36. GScriptRUN Diagram - II

  37. GScript Multi-Script Manager

  38. GScript Extension Functions • - Add “Prototype” definition to two arrays: • - Fake_Equations.vi and Equations.vi • - Use three basic data type search expressions for arg def’s- • - Add frames to case statements in both of the above VIs • - Fake_Equations.vi inserts data types to check for data consistency • - Equations.vi processes the equations at runtime • - Insert labview processing VIs here • - Test using single-step mode and Watch Variables

  39. GScript Recent Additions • - Math functions: • - Trig: SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2, LOG, LOG10, MOD, DIV • - Will add more functions as part of training & integration- • - Synchronization • - GSYNC function sync two or more scripts or VIs • - Queue Input/Ouput - Can read and write to LabVIEW Queues • - Most SOAR TCS / ArcVIEW devices are independent and use queues as their inputs. • - RUN “VI” - Allows running in “fire & forget” mode • - SOARComm - Allows using the SOARComm send message, with callback => access to any text command at any node

  40. GScript Fake_Equations - Insert new functions into beginning of array- Uses only three data types => three search “regular expressions”- Must have subset names after longer names to insure search

  41. Equations GScript

  42. GUIs & Operations - ArcVIEW GUIs & Ops review - Camera GUI - CCD Editor - OCS Queue Manager - Utility Screen (Already seen) - Status Panel - Script Manager

  43. Camera GUI Ops & Discussion - LabVIEW 6i Look- Added Filters- Script operation- “Plug-Ins” menu- OCS controls- Setup Panel- Array/CCD area is based on LabVIEW Picture Control- Detectors Menu- DataSocket status

  44. CCD Editor GUI Ops & Discussion - LabVIEW 6i Look- Single ROI- Script operation- Amp Config- ROI units menu- Binning selection- Array/CCD area is based on LabVIEW Picture Control- Clickable Amps

  45. TCS Simulator GUI Ops & Discussion - Communications testing/setup- Link base port- See actual messages- Set timeouts- Set Timeout Action

  46. TCS Simulator GUI Ops & Discussion - Variables from support TCS command list- Three data types

  47. TCS Simulator Code

  48. Comm Lib II VIs & Discussion - Output two clusters of two queues. Each supports a TCS comm link - Command Link - Callback Link- Named queue data types

  49. Comm Server Type II Code (Left)

  50. Comm Server Type II Code (Right) - Two clusters of two queues.- Callbacks do send/ack cycle and report to calling VI

More Related