Presentation is loading. Please wait.

Presentation is loading. Please wait.

ATLAS DCS S. KhomoutnikovDDC Tutorial1 DAQ – DCS Communication Tutorial ( DDC v. 4.1, online-00-21-02 ) 58 slides with comments printing note pages before.

Similar presentations


Presentation on theme: "ATLAS DCS S. KhomoutnikovDDC Tutorial1 DAQ – DCS Communication Tutorial ( DDC v. 4.1, online-00-21-02 ) 58 slides with comments printing note pages before."— Presentation transcript:

1 ATLAS DCS S. KhomoutnikovDDC Tutorial1 DAQ – DCS Communication Tutorial ( DDC v. 4.1, online-00-21-02 ) 58 slides with comments printing note pages before looking the presentation is recommended

2 ATLAS DCS S. KhomoutnikovDDC Tutorial2 Content  Introduction: DDC functionality Data Transfer DCS Message Transfer TDAQ Command Transfer  System requirements  User tools To run and test the system To use DDC by TDAQ applications  DDC view in configuration DB  Training Configuring DDC Running play_daq Testing DDC

3 ATLAS DCS S. KhomoutnikovDDC Tutorial3 DDC Data Transfer (functionality)  Transfer for TDAQ Information Service any DCS data (PVSS’ DPE) on change Data structures -- by leaf elements  Transfer to PVSS database any data from TDAQ IS service on change PVSS DP should exist and be compatible========  To be defined by configuration with PVSS DP names used  Configuration of DCS => DAQ data transfer can be changed during run time with a dedicated DDC API  Handle asynchronous TDAQ requests for single read DCS data (to IS) Any PVSS DPE or list of DPE No preliminary configuring required Supported by DDC API

4 ATLAS DCS S. KhomoutnikovDDC Tutorial4 TDAQ request for DCS data TDAQ data for DCS on change DCS data for TDAQ on change DDC Data Transfer (interfaces) Subscribe Notify Get data Set data DCS PVSS Application Online Information Service DDC Data Transfer Notify Subscribe Get data Set data TDAQ World DCS World

5 ATLAS DCS S. KhomoutnikovDDC Tutorial5 DDC Data Transfer (compatibility) PVSS typeISType::Basic typesC/C++ types bitBooleanbool bit32U32unsigned int charS8, U8char, unsigned char intS16, S32short, int unsigned intU16, U32unsigned short, unsigned int floatFloat, Doublefloat, double stringStringstring, char[] Simple data types Data structures: Order and types of PVSS structure nodes must be compatible with those of IS record to be transferred from DAQ to DCS

6 ATLAS DCS S. KhomoutnikovDDC Tutorial6 DDC Message Transfer (functionality)  Transfer PVSS’ alert messages for TDAQ’ Error reporting service Either ALL or originated from specified DP set  Transfer for TDAQ’ ERS specified DP of type text on change (to be interpreted like messages) ========  To be specified by configuration with PVSS DP names used

7 ATLAS DCS S. KhomoutnikovDDC Tutorial7 DDC Message Transfer (interfaces) DCS PVSS Application Online Error Reporting DDC Message Transfer Notify Subscribe Send message TDAQ World DCS World

8 ATLAS DCS S. KhomoutnikovDDC Tutorial8 DDC Message Transfer (severity) PVSS alert priority conversion: Priority in PVSS applicationMessage severity p ≤ 10 MRS_INFORMATION 10 < p ≤ 20 MRS_DIAGNOSTIC 20 < p ≤ 50 MRS_WARNING 50 < p ≤ 80 MRS_ERROR 80 < p MRS_FATAL Text DP: Severity is to be defined by configuration

9 ATLAS DCS S. KhomoutnikovDDC Tutorial9 What is TDAQ Command for DCS?  DCS is the only system that defines what is the set of commands may be launched by TDAQ and how those commands will be executed  DCS developer has to implement command facilities in PVSS project  TDAQ may define parameter values, initiate command, declare timeout and accept feedback (via DDC Command Transfer facility) (via DDC Command Transfer facility)

10 ATLAS DCS S. KhomoutnikovDDC Tutorial10 Command Representation in DCS Command Name bool trigger string parameters int response DPE structure DdcCommand PVSS Script  To start on CommandName. trigger = true  To execute control actions (using CommandName.parameters ) (using CommandName.parameters )  To set CommandName. response by final status of command execution final status of command execution optional others Note:  DdcCommand DPE can be a sub-structure of a DP type  Three first leaves are mandatory (with the names fixed), while any additional sub-structures or leaves may be there

11 ATLAS DCS S. KhomoutnikovDDC Tutorial11 DDC Command Transfer (functionality)  Transfer for DCS commands of TDAQ run control FSM transitions (with feedback) ========  To be defined by configuration  Transfer asynchronous (non-transition) commands of TDAQ applications to control DCS (with feedback) ========  Can be either defined in configuration DB or not  Supported by API  Does not affect state nor transitions of DAQ run control FSM

12 ATLAS DCS S. KhomoutnikovDDC Tutorial12 Transfer Run control command Transfer non-transition command DDC Command Transfer (interfaces) DCS PVSS Application Parent Run Controller DDC Command Transfer Notify Subscribe RC-interface Notify Set data RunCtrl Information Server RC-interface TDAQ World DCS World

13 ATLAS DCS S. KhomoutnikovDDC Tutorial13 System Requirements (Linux computer where DDC is to be running)  Operating system Linux RH 7.3  Software default C++compiler gcc 2.95 release online-00-21-02, configuration i686-rh73-gcc295-opt PVSS version 3.0 + symbolic links in $PVSS_PATH/bin unifying PVSS library names and pointing to the libraries of that patch like libManager.so ../api/lib.linux.rtti/libManagerV30_148.so  Environment to set/modify PVSS_PATH - Root directory of PVSS installation LD_LIBRARY_PATH = $PVSS_PATH/bin:$LD_LIBRARY_PATH TDAQ_DB_DATA – full path for Configuration DB of your working partition

14 ATLAS DCS S. KhomoutnikovDDC Tutorial14 User’s Tools (1) to manage DDC  Configuring DDC configuration editor OR oks_data_editor Provided by Online software XML template files ddc_test.data.xml- Definitions of DDC segment ddc_playdaq.data.xml- Physics partition references to DDC  Running play_daq script (of Online software) for control Physics partition also controls DDC applications

15 ATLAS DCS S. KhomoutnikovDDC Tutorial15 User’s Tools (2) to manage DDC  Test applications ddc_daqsim sends (on behalf of TDAQ) any data for DDC, issues request for DCS data, extends/reduces list of DCS data to be transferred for TDAQ on change ddc_msg_receiverreceives DCS messages, then prints ddc_sendcmdsends non-transition commands for DDC and prints response DdcW2kTestPVSS test project for W2K/WXP. Contains DPs to be transferred for TDAQ & accepted from there by DCS; Has DdcCommand datapoint defined DDC users have to be acquainted with PVSS Online Software’ IS, ERS, RC, play_daq concepts Online Software’ Configuration DB concept and techniques (only for configuring DDC with oks_data_editor)

16 ATLAS DCS S. KhomoutnikovDDC Tutorial16 User’s Tools (3) to use DDC at TDAQ domain  To publish data, to receive DCS data from IS IS’ API provided by Online software Data object templatesheader file ddc/DdcData.hxx)  To send request for DCS data DDC’ API libddc.so (header file ddc/DdcRequest.hxx)  To change configuration of DCS-to-DAQ data transfer DDC’ API libddc.so (header file ddc/DdcRequest.hxx)  To receive DCS messages ERS’ (MRS) API provided by Online software IGUIprovided by Online software  To send commands for DCS Run control commands – like for any Run Controller (Online software) DDC’ API for non-transition commands - libddc.so (header file ddc/DdcCommander.hxx)

17 ATLAS DCS S. KhomoutnikovDDC Tutorial17 DDC in Configuration DB (top layer) Segments Physics: Partition DDC : Segment Online Schema File DDC Schema File ddcDt1:DdcDtApplicationddcMt1:DdcMtApplicationddcCt1:DdcCtApplication Contains IsControlledBy Name Name ddc_test Other Segments Segments User’s ddc.data.xml Physics.data.xml XXX:Environment Needs Environment Computer Default Host Include File

18 ATLAS DCS S. KhomoutnikovDDC Tutorial18 DDC in Configuration DB (target layer) PvssWorkstation ddcDt1:DdcDtApplication ddcMt1:DdcMtApplication ddcCt1:DdcCtApplication DCSStationToConnect string Name User’s ddc.data.xml Computer HW_Tag i686-rh73 RunsOn string ISServer list Datapoints DdcDataTargetList list Datapoints DdcTargetList string PvssDpeName string MessageSeverity DdcTextMessage string RunControlTransition string DcsCommand string CommandParameters unsigned int Timeout DdcCommand DcsExportDcsImport 0..N DcsAlarms 0..N DcsTextMessages 0..N Transition Commands 0..N Physics.data.xml Alarm:PvssDatapoint string DpName int PollInterval detector AlarmDef 0..1

19 ATLAS DCS S. KhomoutnikovDDC Tutorial19 Training  PVSS Test application  Configuring DDC  Starting DDC with play_daq  Testing DDC

20 ATLAS DCS S. KhomoutnikovDDC Tutorial20 DDC Test Project  Project for MS Windows 2000 / Windows XP Slightly modified project of PVSS “Getting Started” course Comprises DP to be transferred for TDAQ (float, bool, structure including dynamic and fixed length arrays) DP to get the TDAQ data (int) DP of the type DdcCommand to execute DAQ commands DP for Not_Ready_for_DAQ flag (bool) Does not require any hardware  Available for download as /afs/cern.ch/atlas/project/tdaq/dcs/ddc/ddcW2kTest.zip See notes for this slide for details See notes for this slide for details

21 ATLAS DCS S. KhomoutnikovDDC Tutorial21 Create Configuration Database of Working Partition First setup Online software by command line source /setup.[c]sh and set PVSS_PATH = Then copy, perhaps with renaming (do not rename the files for the DDC testing purpose), the database template files into your working directory cp $TDAQ_INST_PATH/share/data/ddc/ddc_playdaq.data.xml demo-partition.data.xml cp $TDAQ_INST_PATH/share/data/ddc/ddc_test.data.xml ddc.data.xml and make these files readable for everybody and writable for yourself

22 ATLAS DCS S. KhomoutnikovDDC Tutorial22 Root Window of oks_data_editor Set TDAQ_DB_DATA = Then call oks_data_editor $TDAQ_DB_DATA & Close template file and open its copy to be edited

23 ATLAS DCS S. KhomoutnikovDDC Tutorial23 oks_data_editor: edit reference to data file 1 2 3 The same window after steps 2 and 3

24 ATLAS DCS S. KhomoutnikovDDC Tutorial24 oks_data_editor: change name of top-level partition

25 ATLAS DCS S. KhomoutnikovDDC Tutorial25 oks_data_editor: edit workstation definitions 1 2 3

26 ATLAS DCS S. KhomoutnikovDDC Tutorial26 oks_data_editor: create DdcDataTargetList 1 2 Template object Cору Target list of datapoints to be transferred 3

27 ATLAS DCS S. KhomoutnikovDDC Tutorial27 oks_data_editor: create DdcDtApplication (1/2) 1 2 Target lists of datapoints to be transferred 4 3

28 ATLAS DCS S. KhomoutnikovDDC Tutorial28 oks_data_editor: create DdcDtApplication (2/2) 1 3 2 5 4

29 ATLAS DCS S. KhomoutnikovDDC Tutorial29 oks_data_editor: create DdcTextMessage objects 1 2 Template object Cору DCS message to be transferred 3

30 ATLAS DCS S. KhomoutnikovDDC Tutorial30 oks_data_editor: create DdcTargetList (alarms) 1 2 Template object Cору New DCS alarm list

31 ATLAS DCS S. KhomoutnikovDDC Tutorial31 oks_data_editor: create DdcMtApplication (1/2) 1 2 4 3 5

32 ATLAS DCS S. KhomoutnikovDDC Tutorial32 oks_data_editor: create DdcMtApplication (2/2) 1 3 2 5 4

33 ATLAS DCS S. KhomoutnikovDDC Tutorial33 oks_data_editor: create DdcCommand definitions 1 2 Template object Cору DCS run control command 3 5 4 Available DDC transitions load config prepareRun startTrigger checkpoint pause resume stopTrigger stopFE stopDC stopEF stopRecording unconfig unload final reset clear updateRunParam

34 ATLAS DCS S. KhomoutnikovDDC Tutorial34 oks_data_editor: define Not_Ready_for_DAQ flag 1 2 PvssDatapoint object template Cору DCS flag Not_ready_for_DAQ 3

35 ATLAS DCS S. KhomoutnikovDDC Tutorial35 oks_data_editor: create DdcCtApplication (1/2) 1 2 4 3 5

36 ATLAS DCS S. KhomoutnikovDDC Tutorial36 oks_data_editor: create DdcCtApplication (2/2) 1 3 2 5 4

37 ATLAS DCS S. KhomoutnikovDDC Tutorial37 oks_data_editor: check controller and applications of segment 1 2

38 ATLAS DCS S. KhomoutnikovDDC Tutorial38 And eventually… Save the databases of both partition and ddc segment in extended format

39 ATLAS DCS S. KhomoutnikovDDC Tutorial39 PVSS Test Application Panel

40 ATLAS DCS S. KhomoutnikovDDC Tutorial40 play_daq Call and IGUI export TDAQ_DB_DATA= Generic call: play_daq For the test: play_daq integ_ddc_test

41 ATLAS DCS S. KhomoutnikovDDC Tutorial41 Booting Partition

42 ATLAS DCS S. KhomoutnikovDDC Tutorial42 Loaded & Configured Partition

43 ATLAS DCS S. KhomoutnikovDDC Tutorial43 Results of config Transition

44 ATLAS DCS S. KhomoutnikovDDC Tutorial44 Transferring DCS Alert Message to DAQ

45 ATLAS DCS S. KhomoutnikovDDC Tutorial45 Partition Is Running

46 ATLAS DCS S. KhomoutnikovDDC Tutorial46 Not_Ready_for_DAQ Flag (1/2)

47 ATLAS DCS S. KhomoutnikovDDC Tutorial47 Not_Ready_for_DAQ Flag (2/2)

48 ATLAS DCS S. KhomoutnikovDDC Tutorial48 DCS text message for DAQ

49 ATLAS DCS S. KhomoutnikovDDC Tutorial49 is_monitor View (Check Data Transfer)

50 ATLAS DCS S. KhomoutnikovDDC Tutorial50 Simulating DAQ Data Transfer (1/3) DDC utility ddc_daqsim to simulate TDAQ data transfer, requests for read or subscribe/unsubscribe DCS data DDC utility ddc_daqsim to simulate TDAQ data transfer, requests for read or subscribe/unsubscribe DCS data Usage: ddc_daqsim -p partition-name -n application- name -C config-file Options/Arguments: -p partition-name partition to work in. -p partition-name partition to work in. -n application-name name of application. -n application-name name of application. -C config-file path of configuration file -C config-file path of configuration file (daqsim.config). (daqsim.config). Configuration file (daqsim.config) [DAQ-to-DCS] IS_SERVER = RunParams DAQ1.statusDAQ2.status[DAQ-REQUESTS] IS_SERVER = RunCtrl

51 ATLAS DCS S. KhomoutnikovDDC Tutorial51 Simulating DAQ Data Transfer (2/3) [vhom@srvlib data]$ ddc_daqsim -p integ_ddc_test -n MyDaq -C $HOME/working/data/daqsim.config MyDaq_INFO: DAQ request is configured DP name DAQ1.status Allowed type codes are the following: 1- bool, 2 - char, 3 - unsigned char, 4 - short, 5- unsigned short, 6 - int, 7 - unsigned int, 8- float, 9 - double, 10 - string, 13 - struct DAQ1.status.type ( 1-10, 13 ): 6 DAQ1.status.dimension ( >0 ): 1 Making initial value of DAQ1.status Type value : 1 Check-in of RunParams.DAQ1.status DP name DAQ2.status Allowed type codes are the following: 1- bool, 2 - char, 3 - unsigned char, 4 - short, 5- unsigned short, 6 - int, 7 - unsigned int, 8- float, 9 - double, 10 - string, 13 - struct DAQ2.status.type ( 1-10, 13 ): 6 DAQ2.status.dimension ( >0 ): 1 Making initial value of DAQ2.status Type value : 2 Check-in of RunParams.DAQ2.status ############# Simulation ############## ####### of DAQ parameter export ####### ## and issuing requests for DCS data ## ####################################### DAQ parameters are being simulated: 1. DAQ1.status Type: int Dimension: 1 2. DAQ2.status Type: int Dimension: 1 DCS data requests are being simulated 3. READ_DATA_REQUEST 4. SUBSCRIBE_REQUEST 5. UNSUBSCRIBE_REQUEST Type a parameter number : 1 Preparing new value of DAQ1.status Type value : 0 Check-in of RunParams.DAQ1.status Type a parameter number : 2 Preparing new value of DAQ2.status Type value : 0 Check-in of RunParams.DAQ2.status

52 ATLAS DCS S. KhomoutnikovDDC Tutorial52 Simulating DAQ Data Transfer - Results (3/3)

53 ATLAS DCS S. KhomoutnikovDDC Tutorial53 Simulating DAQ Data Request (1/2) Type a parameter number : 3 Type the request for DCS data: RunParams.fdp.fda More data:. Request accepted: RunParams.fdp.fda

54 ATLAS DCS S. KhomoutnikovDDC Tutorial54 Simulating DAQ Data Request - Results (2/2)

55 ATLAS DCS S. KhomoutnikovDDC Tutorial55 Subscribing/Unsubscribing DAQ Data Type a parameter number : 4 Type a subscription request for DCS data: RunParams.chdp.cha More data:. Request accepted: RunParams.chdp.cha Type a parameter number : 5 Type a subscription request for DCS data: v1.response.status.opened More data:. Request accepted: v1.response.status.opened Type a parameter number : -1 [vhom@srvlib data]$

56 ATLAS DCS S. KhomoutnikovDDC Tutorial56 Testing Non-transition Command (1/2) DDC utility ddc_sendcmd to issue non-transition command Usage: ddc_sendcmd -p partition-name -c controller-id [-M controller-id] [-N controller- id] [-O controller-id] Options/Arguments: -p partition-name partition to work in. -p partition-name partition to work in. -c controller-id controller to work with -c controller-id controller to work with -M controller-id controller to work with -M controller-id controller to work with -N controller-id controller to work with -N controller-id controller to work with -O controller-id controller to work with -O controller-id controller to work with [vhom@srvlib vhom]$ ddc_sendcmd -p integ_ddc_test –c ddcct1 We deal with 1 controllers:ddcct1 ############# Simulation ############## ####### of DAQ sending ####### ## non-transition commands for DCS ## ####################################### Type the name of a command to be issued: setOpening Is the command defined in configuration (y/n)? n Has the setOpening any parameters (y/n)? y Type the command parameters (p1|p2|...): 44.5 Type the timeout value (sec): 2 Type the controller name to be addressed to (*|ddc_test.ddcct1): ddcct1 DdcCtSender: Result of the setOpening command on ddc_test is OK Type the name of a command to be issued: // Ctrl-C to exit [vhom@srvlib vhom]$

57 ATLAS DCS S. KhomoutnikovDDC Tutorial57 Testing Non-transition Command - Results (2/2)

58 S. KhomoutnikovDDC Tutorial58 The End You can now use DAQ - DCS communication package in your applications


Download ppt "ATLAS DCS S. KhomoutnikovDDC Tutorial1 DAQ – DCS Communication Tutorial ( DDC v. 4.1, online-00-21-02 ) 58 slides with comments printing note pages before."

Similar presentations


Ads by Google