1 / 27

JRM DAQ: XSYS and VMS

JRM DAQ: XSYS and VMS. Kevin Carnes April 19, 2000. Overview. History of JRM DAQ Hardware description of VMEDAQ Timing issues Software description of VMEDAQ XSYS VMS Future upgrade possibilities. History of JRM DAQ. MCA’s DEC PDP15 PDP11/34, Canberra SCORPIO, Kevent ~1980

misu
Download Presentation

JRM DAQ: XSYS and VMS

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. JRM DAQ: XSYS and VMS Kevin Carnes April 19, 2000

  2. Overview • History of JRM DAQ • Hardware description of VMEDAQ • Timing issues • Software description of VMEDAQ • XSYS • VMS • Future upgrade possibilities

  3. History of JRM DAQ • MCA’s • DEC PDP15 • PDP11/34, Canberra SCORPIO, Kevent ~1980 • DEC MicroVAXen, MBD’s, XSYS ~1988 • DEC VAXStations, VMEDAQ, XSYS ~1997

  4. Removable Disks VMEDAQ Hardware Event Trigger(s) CC ADC TRIG CAMAC Branch Highway 8 mm SCSI VME CBD-8210 MVME-167 Local Taping Serial Line (Not currently Ethernet Network implemented) Bridge Local Ethernet 8 mm VAXSt VAX or Remote SCSI 4000/96 Taping UNIX SCSI Display X-Window Keyboard

  5. Timing • 29 µsec processor overhead per event • 3 µsec per CAMAC command • 2 µsec transfer time to VAX per word • Example: 12 parameters read from 2 Ortec ADCs (80 µsec conversion time) • 29 + 12*(3+2) +80=169 µsec , or a maximum data rate of 5.9 kHz for a pulser

  6. VMEDAQ Software • Front-end 68040 processor uses UNIX-like RTOS called pSOS+. • Front-end code written in 68040 assembler and C. • Experiment-specific parameters and logic are contained in C include files, user*.h. • A build ftp’s these files to a Sun UNIX machine where they are included in the VMEDAQ code, cross-compiled and linked and then ftp’ed back to the VAX.

  7. VMEDAQ Software, cont. • When the front-end software is running, the user communicates with the front-end via an ethernet application called vrctl. All run control commands, such as begin, suspend, resume, and halt are issued here. The vrctl commands are case-sensitive! • A restart coldin the vrctl window(or pressing the red Reset button on the MVME-167 front panel) downloads the cross-compiled executable code to the front-end. A restart warm restarts the code already in the front-end. • Low-level communication with the front-end pROBE+ debugger is via a serial line using Kermit. In Kermit, start the code with gs (initialize) and go(execute). • XSYS manual contains VMEDAQ Primer and Manual.

  8. user*.h include files These are all C include files, and are case-sensitive • userconfig.h—Title, CAMAC LAM slots, scaler interval • userinit.h — executed once at init • userbegin.h — executed at beginning of run • userend.h — executed once at end of run

  9. user*.h include files, cont. • userscalers.h — scaler read commands, executed at scaler interval • userevents.h — executed at each LAM • usersuspend.h — executed at suspend command • userresume.h — executed at resume command

  10. userconfig.h udb.usrverstr_p = "<Version 1>"; udb.usrtitstr_p = "<2D PSD Ortec AD811 ADC>"; udb.maxevtsiz = 0; /* uses default if 0 */ udb.btbmasks[0] = (1<<1); udb.lamcrmask = (1<<1); /* LAM trigger crate mask (BD crates) */ udb.lamslmask = (1<<16)| (1<<20); /* LAM trigger glr mask (BD slots) (slot#-1)*/ udb.trigbranch = 0; udb.trigcrate = 0; udb.trigslot = 0; udb.triglamn = 0; /* may be 0 if same as trigslot */ udb.trigmask = 0; udb.st0tik = 500; /*Automatic scaler read interval in 10ms ticks: 500=5s*/ udb.st1tik = 0; udb.st2tik = 0; udb.st3tik = 0;

  11. userinit.h /* C N A F Crate, Number (slot), Address, Function */ CNAFX (1, 18, 0, 30); /* Enable Xilinx programming mode */ do { CNAFX (1, 18, 0, 12); /* Wait until Xilinx ready (q=1) */ } while (!QPRESENT(0)); /* B C N A F D Branch,….,Data */ WRITEW (0, 1, 18, 0, 22, 0); /* Select Common Stop Double Word */ CNAFX (1, 18, 0, 25); /* Begin Xilinx programming */ do { CNAFX (1, 18, 0, 13); /* Wait until Xilinx programming done (q=1) */ } while (!QPRESENT(0)); CNAFX (1, 18, 0, 9); /* Reset required after programming */ WRITEW (0, 1, 18, 0, 17, 0x00FF); /* Set module ID to FF, rest default */ WRITEW (0, 1, 18, 1, 17, 0x0000); /* Default */ WRITEW (0, 1, 18, 2, 17, 0x2000); /* Full time scale of 32 microsec. */ WRITEW (0, 1, 18, 3, 17, 0x0000); /* Default: no offset and no delay */

  12. userbegin.h /* $Id: userbegin.h,v 1.1 1995/09/28 19:48:49 kdc Exp kdc $ */ /* $Log: userbegin.h,v $ * Revision 1.1 1995/09/28 19:48:49 kdc * Initial revision * */ /* DEC/CMS REPLACEMENT HISTORY, Element USERBEGIN.H */ /* *1 23-SEP-1994 15:25:57 YODER "DAQ User Begin run include code" */ /* DEC/CMS REPLACEMENT HISTORY, Element USERBEGIN.H */ /* userbegin.h */ /************************************************************************/ /* User initialization of modules at beginning of run. */ /* This is called before data flow is enabled. */ /* A BiRa2206 is automatically initialized before this code. */ /* To abort begin run, execute "return -1;" here. */ /***********************************************************************/ CNAFX (1, 17, 12, 26); /* set enable LAM for AD811 ADC*/

  13. userevents.h int eventid; if(tlamregs & (1<<16)) /*If LAM was from slot 17...Ortec AD811 ADC */ { eventid = 2; READW(0, 1, 17, 5, 2); /* Read & clear AD811 */ READW(0, 1, 17, 6, 2); /* Read & clear AD811 */ READW(0, 1, 17, 7, 2); /* Read & clear, reset AD811 */ } else if (tlamregs & (1<<20)) /* If LAM in slot 21... DPR Q count normalization */ { CNAFX(1, 30, 9, 26); /* Set crate inhibit */ CNAFX(1, 21, 0, 10); /* Reset down counter */ eventid = 4; HALTRUN; /* Predefined macro simulates halt */ } ev_p->hdr.evtid += eventid;

  14. XSYS • VMEDAQ front-end packs data into buffer and sends over Ethernet to XSYS sorting program. • XSYS is a collection of executable programs, not a single program, including disp for viewing spectra, evop for interacting with the online sorting program, tpe for offline sorting, and wrt for storing histograms. • The XSYS manual contains an EVAL sorting language section and a section on individual XSYS commands, also found in online help.

  15. XSYS files • VMS DCL Command file, *.com • Creates data areas for spectra, gates, variables • Creates xdata.sec and xscom.sec files on disk, which preserves information between sessions • EVAL sorting program, *.evl • FORTRAN-like sorting language • Single 32-bit accumulator • Keep simple for online sorting, more complex for offline • Use evop for online, tpevop (tpe) for offline sorting

  16. hdgsd.com file $! HDGSD.COM $ DMEM ALL GLOBAL FILE $ AMEM NEW 6000 PAGES* $ AMEM 1 TAC1 4096 $ AMEM 30 RX1 4096 $ AMEM 31 RX2 4096 $ AMEM 32 RY1 4096 $ AMEM 33 RY2 4096 $ AMEM 40 XY 256 256 $ AMEM 41 PROJX 256 $ TDG ALLOC 1 RXYgate SPEC 40

  17. hdgsd.com file, cont. $ GATE NEW 64 1 5 30 5 $ SCAL NEW 2 $ SCAL HEAD 1 "projectile" "recoil" $ SCAL BOX 1 1 2 $ SCAL CLEAR ALL $ CLEAR FLAGS $ CLEAR ALL

  18. hdgsd.evl ! HDGSD.EVL OPTION TAPE INTEGER HILIM=4095 ! Overflow limit (2**12) INTEGER CNT REAL dChannel FORMAT ST1 1 12 1 !REAL DATA IS 11 BITS. HERE 12TH BIT IS INCLUDED FOR FORMAT SX1 2 12 1 ! OVERFLOW DETECTION FORMAT RATEp1 1 24 1 $LONG FORMAT RATEr1 2 24 1 $LONG ! Gate TOF1G TAC1 1 !1-D gate name TOF1G associated with gate 1 in spectra TAC1 ! EVENT BEGIN TAPE

  19. hdgsd.evl, cont. ! EVENT 2 TAPE GET ST1 ! Get TAC1 signal SUB HILIM CHS STA TOF1 TINC TAC1 ! Increment the time amplitude spectrum ! EVENT 50 TAPE SCALERS 2

  20. XSYS commands • lmem all lists all memory areas and the total memory used. • evop setup hdgsd compiles the *.evl file and starts the sorting subprocess. Look for compilation errors in the information printed out. This also opens up a data connection via ethernet to the front- end. • evop tape xdatdir: causes event buffers to be written to a file on disk in the data directory, with name prognnnn.evt. A Waiting message can be removed by a flush in vrctl. • evop exit exits the sorting program but does not close the connection to the front end. Two flush commands in vrctl will close the connection to avoid double connections on the next evop setup.

  21. XSYS commands, cont. • *.evt files may later be resorted, offline, using the same or a more elaborate *.evl file and tpe. • status displays the event rate, total number of events, elapsed run time, scaler counts, etc. every 3 seconds. • wrt stores some or all data areas, including spectra, in files on disk with names prognnnn.dat These may later be read back in with rd for display using disp. • move 1 out run1.out pcgraph -- for transfer to PC.

  22. VMS • Our XSYS currently runs only on VAXen, and our VAXen use only VMS as an operating system. • Extensive manuals available in main JRM computer room (gray snake), plus online help, plus bookreader on zeeman, balmer, lamb, and rydbrg (Session Manager Applications BookreaderOpenVMS). • Volume 2A, Introduction to VMS, Guide to Using VMS, or, on Bookreader, User’s Manual.

  23. VMS Editor • Invoke with ed for old VMS standby, edt. • Invoke with edit for more powerful editor that still works like edt for the most part. • In either editor, CTRL/Z changes to command mode – At command: or * prompt, quit exits without saving, exit saves file and exits. • In edt, must type c at the * prompt to get back into full screen mode.

  24. VMS Editor Keypad DELETE Delete character LINEFEED Delete to beginning of word BACKSPACE Backup to beginning of line CTRL/A Compute tab level CTRL/D Decrease tab level CTRL/E Increase tab level CTRL/K Define key CTRL/R Refresh screen CTRL/T Adjust tabs CTRL/U Delete to beginning of line CTRL/W Refresh screen CTRL/Z Exit to line mode FNDNXT FIND DEL L UND L GOLD HELP PAGE COMMAND SECT FILL APPEND REPLACE DEL W UND W ADVANCE BOTTOM BACKUP TOP DEL C UND C CUT PASTE WORD CHNGCASE EOL DEL EOL CHAR SPECINS ENTER SUBS LINE OPEN LINE SELECT RESET

  25. Useful VMS Commands • set password • mou/share data: label • show device/full data: (Note: 1 disk block = 512 bytes, so 2048 blocks = 1 MB) • dir/size/date data:[user…]*.evt • set default [-.nov99] • copy/since=1-jan-2000 data:[user]*.evt;* [.sub1]*.*;* • search/exclude=*.exe data:[*…]*.evl tdgsd1 • type/page myevl.evl

  26. Useful VMS Commands, cont. • init tape: mydata • backup data:[user…]*.*;* tape:myback.bck/label=mydata • backup/image data: tape:myback.bck/label=mydata • backup/list tape:myback.bck/label=mydata • backup tape:myback.bck/select=[user…]/label=mydata data:[user…] • print/queue=hp4 xdisp.eps • purge data:[user…]xdisp.eps

  27. The Future • Need to overcome front-end bottlenecks, such as the 29 µsec interrupt overhead, slow ADC conversion, and the slow CAMAC cycle time (1 µsec clock period). • List Processors: intelligent crate controllers executing CAMAC command lists directly, plus buffer memory • LeCroy FERAbus ADC’s and/or VME memory, fast conversion, buffering • Computer obsolescence: replace VAXen with LINUX or Solaris PC’s using CERN’s PAW as an analysis package.

More Related