Top Banner
1
37

CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

Oct 09, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

1

Page 2: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

2

Page 3: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

3

Page 4: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

TheControlSystemStudio(CSS)isanEclipseRCPbaseddevelopmentpla?ormandthefundamentformanyapplicaAonslikeEPICS,TANGOetc.AsmostoftheseapplicaAonsdealwithprocessvariablesandconnecAonstocontrolsystems,theCSSCoreprovidesthenecessaryAPIsforaconvenientstart.TheintegrateddevelopmentenvironmentofCSSprovidesfacilityfordatabasedevelopment,alarmmanagementsystem,displaydevelopmentandconversion,datatrending,diagnosActoolsetc.

ProcessvariableaddresssyntaxThegeneralsyntaxofaprocessvariableaddressisdefinedasfollows.ThisusesthemetasyntaxbasedontheExtendedBackus‐NaurForm[1]address::=[protocol]id[type][2]protocol::=('dal‐epics'|'dal‐Ane'|'dal‐tango'|'local')'://'[3]id::=(leXer|specialcharacter)+[4]type::=','('double'|'int'|'long'|'string'|'enum')[5]leXer::='A'|...|'Z'|'a'|...|'z'[6]specialcharacter::=':'|'/'|'\'|'.'|'['|']'[7]number::=digitWithoutZero(digit)*[8]digit::='0'|...|'9'[9]digitWithoutZero::='1'|...|'9'Thereare3opAonaland1mandatoryfragmentsthatconsAtuteafullprocessvariableaddress(line1).Theprotocol(line2)isopAonalanddefinestheconnecAonprotocol.Ifaprefixisnotspecified,adefaultprotocolischosenaccordingtothesefngsoftheCSS‐Core/Control‐Systempreferencepage.Theid(line3)ismandatory.ItmustbeagloballyuniquenameidenAfyingtheinformaAonyouwanttoaddress.Thetype(line5)isopAonal,too.Itcanbeusedtospecifytheexpectedreturntypeforchannelvaluesexplicitly.

4

Page 5: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

SyntaxforEPICSWhenEPICSchannelsareaddressed,line3isasfollows:[3a]id::=recordname['.'fieldname][characterisAc][10]recordname::=(leXer|specialcharacter)+[11]fieldname::=(leXer)+[12]characterisAc::='['(leXer)+']'AnEPICSprocessvariableisalwaysidenAfiedbyitsrecordname(line10)whichisthereforemandatory.OpAonallyafieldnamecanbeprovidedtoaddressasinglefieldofarecord(line11).Ifnofieldnameisprovidedtheaddressdefaultstothe.VALfield.ThecharacterisAc(line12)isopAonalaswell.IfdefineditallowsforaccessingaddiAonalinformaAonofarecordwithoutestablishinganewconnecAon.AllcharacterisAcsofthesamerecordsharethesameconnecAon.SoingeneralitisagoodideatousecharacterisAcswheneverpossibletosavesystemresources.Thesecanbe

[PosiAon]‐posiAon[DescripAon]–longdescripAon[displayName]–shortdescripAon[propertyType]‐type[resoluAon]–numberofbitsusedforADCconversionofanalogvaluewhensampled[minimum]–minimumallowedvalue[maximum]–maximumallowedvalue[graphMin]–minimumallowedvaluewhendisplayed(e.g.inachart)[graphMax]–maximumallowedvaluewhendisplayed(e.g.inachart)[format]–Cprint‐fstyleformatthatisusedtorenderthevalue[units]–unitsofthevalue[scaleType]–scaletypeforplofng(linearorlogarithmic)[warningMax]–upperwarninglimit[warningMin]–lowerwarninglimit[alarmMax]–upperalarmlimit[alarmMin]–loweralarmlimit[sequenceLength]–sequencelength[enumValues]–enumvaluearray(returnsObject[])[enumDescripAons]–enumvaluedescripAons(returnsString[])[bitDescripAons]–bitdescripAons(returnsString[])[condiAonWhenSet]–acAvebitsignificance[condiAonWhenCleared]‐inacAvebitsignificance[bitMask]–bitsrelevance

5

Page 6: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

SimpleDALallowstouseacertainsyntaxforaccessingPVs.

TheDataAccessLayer(DAL)isthecoreoftheconnecAonAPIs.ItcommunicatestoEPICSthroughCAJ(ChannelAccessJava),whichisapureJavaimplementaAonoftheCAprotocol.Inthe(near)futureitwillbepossibletoconnecttoTINEandTANGOcontrolsystemsthroughDALaswell.ATINEintegraAonisalreadyavailableasBeta.DALisaninherentpartoftheCSSCorebutcanalsobeusedasalibraryinanyotherJavaapplicaAon.SimpleDALisaconnecAonlayerbuiltontopofDAL.Itprovidesaslim,lesscomplexAPIthatallowsforamucheasierstartfordevelopersdealingwithprocessvariablesintheirapplicaAons.UsingSimpleDALimpliesacertainsyntaxforprocessvariableaddressesthatenablesapplicaAonstomakeuseofthefollowingfeatures:•accessdifferentcontrolsystems(e.g.TINEandEPICS)inoneapplicaAon•usecharacterisAcs,aconceptforresourcesavingaccesstorecordfields•queryprocessvariablesindifferenttypes•usesimulatedchannels•addresssystemfuncAonsasprocessvariable

6

Page 7: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

ItisrecommendedthatthestandardversionofCSSshouldbedownloadedforthefirstuse.ItconsistsoftheCSSpla?ormandcommoncontrolsystemapplicaAons.

Pre‐requisites‐Javaversion1.6orhigherisrequiredDownload‐ThelinktothisishXp://css.desy.de/content/e413/index_eng.htmlPleasechoosetheversionaccordingtoyouroperaAngsystem.Extrac<ng–extractthedownloadedzipfileinadirectoryofyourchoice.Star<ng

Windows–Runthefilecss.exeunderCSS<Top>.Linux–Setexecutablemodeforthefile‘css’underCSS<top>andrun

Login‐TheXMPPlogincanbecancelledforiniAaluse.ThisloginsyouasanonymoususerintotheXMPPserverspecifiedinthepreferences.TheXMPPserverisusedforremotemanagement.OnecanalsosetuphisownXMPPserver.

7

Page 8: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

CSSConsoleTheCSScontainsitsownconsole.ThisconsoledisplaysystemmessagesofcertaineventsandinformaAonaboutoccurrederrors.

FileNew‐Createanewfolder,resource,SwitchWorkspace‐ChangetheworkspaceoftheCSSinstance.Exportpreferences‐WritecurrentpreferencesoftheCSSinstanceinafile.OpenWorkspaceNavigator‐Opentheview'Workspace'.Import‐ImportresourcefromCVSintheworkspace.Exit‐ShutdownyourCSSinstallaAon.

Quickstart‐TheQuickstartmenuholdslinkstoSynopAcDisplaysintheworkspace.Theycanbeaddedviacontextmenuofadisplay.

WindowOpeninNewWindow‐OpenanewCSSwindow.OpenPerspecAve‐SelectandopenaparAcularCSSperspecAve.IntheCSScontext,aperspecAveisasetofuserinterfaceelementsthatareposiAonedinacertainway.ShowView‐OpenaparAcularCSSview.IntheCSScontext,aviewisanelementoftheuserinterfacethatdisplayssomethingandcanbefreelyarrangedbytheuser.

HelpWelcomeAboutCSS‐Openthe“About”dialogthatcontainstheCSSlicenseagreement.HelpContents‐OpentheCSShelpsystem.ThereyoumayfindamoredetaileddescripAonofthebasicuserinterfaceconceptsandallsystemsefngs.KeyAssist‐Openanoverviewofallshortcuts.CheatSheets‐ShowsavailableCheatSheets.CheatSheetsarestepbystepdocumentaAons.So}wareUpdates‐ManagethelocalCSSinstallaAonbyinstallingandupdaAngfeatures.‐>findandinstall‐>searchfornewfeaturestoinstall

8

Page 9: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

• UsedtospecifytheEPICSIOClocaAonandotheraXributes• GotoCSSMenu‐>CSS‐>Preferences‐>CSScore‐>Controlsystem• SetthedefaultcontrolsystemasEPICS• Under‘CSScore’menuitem,goto‘EPICS’• SettheEPICSpreferenceshere.

9

Page 10: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

CSSpluginsarethevarioustoolsavailablewithit.ToaddtheseintotheCSS:

• GotoCSSmenu‐>Help‐>So}wareupdates‐>FindandInstall• Select“Selectfornewfeaturestoinstall”• Selectthecheckboxfor“Controlsystemstudioupdatesite”• Click“Finish”• Expandthetreefor“Controlsystemstudioupdatesite”• Selectthepluginyouwanttoinstallandclick“selectrequired”buXon.• Go“next”andacceptlicenseagreement.• Nextandclick“Finish”• TheinstalledpluginwillnowappearintheCSSmenuunderappropriatecategory

10

Page 11: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

Tomakeanewproject• GotoFile‐>New‐>other‐>General‐>Project• Nametheproject• Youcanmakenewfoldersorfilesinsideaproject• Tomakeafolder,rightclicktheprojectinthenavigator‐>New‐>other‐>General‐>folder• Tomakeanewfile,rightclicktheprojectinthenavigator‐>New‐>other‐>chooseaccordingly

11

Page 12: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

Synop<cDisplayStudioSynopAcDisplayStudio(SDS)isagraphicaloperatorinterfacethatrepresentsthestructureandcurrentstateofaplant.Thestructureiscomposedofbasicelementssocalledwidgetslikelabels,metersorbargraphs.TobuildupapartofaplantthewidgetscanbearrangedintheeditmodeofSDSondisplays.Intheexecuteorrunmodetheoperatorscancontroltheprocessesviathedisplays.

NavigatorThenavigatorviewshowstheCSSprojectsintheworkspace.ACSSprojectholdstheconfiguraAonfilesforSDSdisplaysandfilesofotherCSSapplicaAons.Editor/PaleGeTheEditorshowsthedisplaysintheeditmodeandprovidesgrid,align,ruler,etc.OntherightsideisthepaleXewithallavailablewidgets.ThereisadraganddropsupportthatconnectsaprocessvariablefromanotherCSSapplicaAonautomaAcallywithawidget.WidgetProperAesForeachselectedwidgetintheeditorthewidgetpropertyviewshowsallavailableproperAes.Itispossibletodynamise*LINK*eachproperty.Thatmeansthatapropertyisconnectedtoaprocessvariableandchangeswiththevalueofthevariable.

12

Page 13: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

Therearetwokindsofproperty• StaAc‐fixedduringexecuAonmode• Dynamic–changesduringexecuAonmode

Singlele}clickonapropertyonthePropertyViewtosetastaAcproperty.

Singlele}clickonapropertyopensaneditor.Therearesixgeneraleditors:‐‐Enteratext‐‐Enteranumber‐‐Chooseacolor‐‐Chooseafont‐‐Setaboolean‐‐Selectacomboitem

Andthreespecialeditors:‐‐Add/changealiases ‐‐Add/changeacAons‐‐GeneratetoolAp

13

Page 14: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

• OpentheLayerManagementMenu:Window‐>ShowView‐>Other…‐>SynopAcDisplayStudio‐>LayerManagement• Insidethelayermanagementview,rightclicktoaddnewlayer,ormoveexisAng• Visibilityandorderofalayercanbechanged• Visibilityofalayercanbetoggleddynamically• Rightclickawidgettochangeitslayer

14

Page 15: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

• Thepropertywith‘gearwheel’symbolisdynamic• Rightclickonpropertytoconfigureorremovedynamicaspects• Channelnamecanbetypeddirectly• AliascanbeusedinsteadofaPVname• DynamicproperAescanbeconfiguredbyrules(explainedlater)• EachwidgethasaPrimaryPV,itisusedwhenyouuse

• CopyPVtoclipboard• ForwardedtotheapplicaAonscalledbycontribuAonmenu• Tiptext

SoitisnecessarytodefineaprimaryPV

15

Page 16: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

• AliasisamacrothatcanbeusedinsteadoflongPVnameorsyntax• Eachwidgetcanhaveseveralaliases(e.g.fordisplayingseveralplotsonstripchart)• Aliascanbeforwardedtoanewdisplay

16

Page 17: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

• Colorcanbecustomizedforthese• RightclickonbackgroundcolorproperAestoconfiguredynamicaspects• GotoNext• Colorscanbesethere

17

Page 18: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

• RulescanbeusedtodefinethedynamicbehaviorofwidgetproperAes• Therearetwotypesofrules

• Java• ECMA/JavaScript

• Scriptedrulefilesshouldbekeptat‘SDSScriptRules’folderundertheworkspace• ItisrecommendedthatJavaScriptrulesshouldbeusedforconfiguringdynamicproperAesinsteadofJava,asnocompilaAonisneededinthiscase

18

Page 19: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

AcAondatasefngdefinestheacAonwhichisperformedwhenawidgetisacAvated(i.esayabuXonisclicked)

AcAonscanbeoftwotypes• Sendingvalue• Openadisplay

Eachwidgetcanhavearbitraryno.ofacAondata

AcAoncanbeexecutedfromthecontribuAonmenuaswell.ThecontribuAonmenuisinvokedbyrightclickingawidget‐>CSS‐><contribuAonmenu>

19

Page 20: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

Cursorcanbechangedasthemousepointermovesoversomewidget

WidgetproperAeshaveafieldforchangingcursor

Therearetwokindofcursors

1. Systemcursors2. Other–acAonenabled,acAondisabled

20

Page 21: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

21

Page 22: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

22

Page 23: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

23

Page 24: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

24

Page 25: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

25

Page 26: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

26

Page 27: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

27

Page 28: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

28

Page 29: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

29

Page 30: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

30

Page 31: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

31

Page 32: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

DetaileddocumentaAonisfoundat

hXp://css.desy.de/content/e1576/e2369/SDS_Widgets_V0.10‐1.pdf

32

Page 33: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

1.  DefaultdisplayisthedefaultSDSfilewhichopensthroughthecontribuAonmenu(opendisplay)

2.  Tosetthedefaultdisplaygotomainmenu‐>CSS‐>Preferences‐>CSSApplicaAons‐>Display‐>DefaultDisplay

3.  Setthedefaultfileandthealiasname

4.  QuickstartmenuisusedtoaddshortcuttoruntheSDSfilesdirectly.5.  TheSDSfilesaddedtoquickstartmenuwilldirectlyopeninexecutemode6.  Toaddfilestoquickstartmenu,rightclicktheSDSfileinnavigatorpane‐>addto

quickstart7.  Toinvokedisplaysdirectlyfromquickstart,gotomainmenu‐>quickstart‐>(click

filename)8.  Toeditquickstartpreferencesgotomainmenu‐>CSS‐>Preferences‐>CSS

ApplicaAons‐>UAliAes‐>Quickstart

33

Page 34: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

WhatistheADLConverterTheADLConverterisaCSSPlugInthatconvertsControlSystemDisplays.ThisconvertsonlyfromADL‐FormattotheSynopAcDisplayStudioformatfromtheControlSystemStudio.

UsetheADLConverterThehandlingoftheADLConverterisverysimple.Firstclickthe“File"buXontochoosetheADL‐Fileswhichyouwanttoconvert.Thechosenfilesaredisplayedatthelistandareallselected.Secondclickthe"SelectPath"buXontochoosethetargetpathattheWorkspace.Andatlastclickthe"Convert"buXontoconverttheADL‐Files.OnlytheselectedFilesinthelistareconverted.

NewConversionToconvertothersetofADL‐Files,clearthelistby"Clear"buXonandchoosethenewADL‐Filesandanewtargetworkspacepath.Thenstartthenewconversion

34

Page 35: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

ThePVTableprovidesatabularviewofPVnamesandtheircurrentvalue.Onecanstartandstoplivevalueupdates.InaddiAon,onecantakea"snapshot"ofcurrentvalues,whichgetssavedwhensavingthePVtabledocument.ThePVtabledisplayindicatescurrentvaluesthatdifferfromthe"snapshot"valuesinred.

OnecanconfiguretheupdaterateaswellasthethresholdforindicaAngdifferencesbetweenthecurrentvaluesandthosefromthesnapshot.

TostartwithPVtable1. Gotomainmenu‐>CSS‐>Display‐>PVTable2. Rightclicktheemptyareainthetable‐>3. WritethePVnametobemonitored,goonaddingnames4. AgreenLEDsymbolatthetopiconbarisforstarAngtheupdatesinPVtable.5. TheupdateratecanbeconfiguredbyrightclickonthePVtable‐>config

35

Page 36: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

OverviewTheProbetoolallowsbasicreadingandwriAngofPVs.

Usage1. EnteranameintothePVnametextboxandenter.ThetoolwilldisplaythecurrentvalueofthegivenPVtogetherwithAmestampandstatus.2. The'Adjust'checkboxopensadialogforwriAnganewvaluetothePV.3. Thestatusbarprovideserrormessages.IfallisOK,itdisplaysaslowlyaveragedupdaterateofthePV.4. Italsodisplaysalarmzonesonthemeter5. Themetercanbedisabledalsofromthe‘Meter’checkbox

36

Page 37: CSS traininghandout - KEK · CSS view. In the CSS context, a view is an element of the user interface that displays something and can be freely arranged by the user. Help Welcome

37