2014/09/01 - caQtDM manual

32
caQtDM Custom Widgets Manual Anton Mezger February 2014 Paul Scherrer Institute CH-5232 Villigen Switzerland This manual This manual has been written in HTML and after conversion introduced in the Qt assistant in order to get help for the caQtDM system. It has to be noted that caQtDM is though as a replacement of the very known EPICS Display Manager MEDM, therefore this manual is of course also inspired of the existing MEDM manual. Introduction caQtDM is a package based on Qt developed at PSI as a successor of MEDM, a well known package used in the EPICS community for building synoptic displays. The caQtDM package uses the standard Qt GUI (Qt designer) for designing synoptic displays, containing all the controls graphical elements necessary to visualize and control a facility. Qt designer uses the custom widgets designed for this purpose and writes a description file (.ui file) that will be used by the synoptic viewer caQtDM. A reload function in caQtDM allows to rapidly see the changes made by the editor in order to accelerate the process of editing and viewing. The heart of the package are the graphical objects (Widgets) plugged into the Qt designer. These widgets will be described in detail with their properties below. Many objects have been built and more are introduced as soon as they are needed. The Qt system allows in a very easy way to add continuously new objects or to modify these. Technically the package consists of 3 class libraries with the graphical objects, a class library used by the viewer or other applications and the viewer (caQtDM) itself as well as 3 libraries with the plugin definitions for the Qt designer. The editor (Qt designer) is part of Qt. It has to be noted that the graphical objects are not control system aware. The graphical objects have properties and methods used by the editor. The control system knowledge is then integrated and handled by the viewer. This architecture allowed us to handle easily three control systems: epics, epics4 and an older in house control system. These are all handled by the viewer. This distribution supports per default epics 3. Epics4 can be integrated when building it, but only a few tests could be done while not many process variables could be tested so far. Part of the package is also a converter (adl2ui) that can convert MEDM .adl files into .ui files used by the caQtDM package. In most cases this converter gives good results. caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual 1 of 32 08/29/2014 06:27 PM

Transcript of 2014/09/01 - caQtDM manual

Page 1: 2014/09/01 - caQtDM manual

caQtDM Custom Widgets Manual

Anton MezgerFebruary 2014

Paul Scherrer InstituteCH-5232 VilligenSwitzerland

This manual

This manual has been written in HTML and after conversion introduced in the Qtassistant in order to get help for the caQtDM system. It has to be noted that caQtDMis though as a replacement of the very known EPICS Display Manager MEDM,therefore this manual is of course also inspired of the existing MEDM manual.

Introduction

caQtDM is a package based on Qt developed at PSI as a successor of MEDM, a wellknown package used in the EPICS community for building synoptic displays. ThecaQtDM package uses the standard Qt GUI (Qt designer) for designing synopticdisplays, containing all the controls graphical elements necessary to visualize andcontrol a facility. Qt designer uses the custom widgets designed for this purpose andwrites a description file (.ui file) that will be used by the synoptic viewer caQtDM. Areload function in caQtDM allows to rapidly see the changes made by the editor inorder to accelerate the process of editing and viewing.

The heart of the package are the graphical objects (Widgets) plugged into the Qtdesigner. These widgets will be described in detail with their properties below. Manyobjects have been built and more are introduced as soon as they are needed. The Qtsystem allows in a very easy way to add continuously new objects or to modify these.

Technically the package consists of 3 class libraries with the graphical objects, a classlibrary used by the viewer or other applications and the viewer (caQtDM) itself aswell as 3 libraries with the plugin definitions for the Qt designer. The editor (Qtdesigner) is part of Qt. It has to be noted that the graphical objects are not controlsystem aware. The graphical objects have properties and methods used by the editor.The control system knowledge is then integrated and handled by the viewer. Thisarchitecture allowed us to handle easily three control systems: epics, epics4 and anolder in house control system. These are all handled by the viewer. This distributionsupports per default epics 3. Epics4 can be integrated when building it, but only a fewtests could be done while not many process variables could be tested so far.

Part of the package is also a converter (adl2ui) that can convert MEDM .adl files into.ui files used by the caQtDM package. In most cases this converter gives good results.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

1 of 32 08/29/2014 06:27 PM

Page 2: 2014/09/01 - caQtDM manual

Besides the already mentioned .ui files the viewer can also uses in house developed.prc files. These last files represent asci files to be edited with any text editor usingare in house syntax.

The Qt system is widely used today on many platforms and is therefore an idealsystem to develop new applications. The advantage of Qt is therefore that anapplication using this architecture will run on many platforms, so that caQtDM willrun on linux as well as on windows systems.

Designer: editor

The designer coming with Qt is the editor used for developing the synoptic screens. Inthis manual we will not describe this editor exhaustively, while the editor has it ownmanual that can be called by pressing the F1 key. The editor allows by dragging anddropping the graphical objects to be used into the synoptic display. The properties ofthe graphical objects can then be customized in the property editor. The mostimportant property is normally the device that is monitored or controlled and isrepresented by the property channel. An exhaustive description of the graphicalobjects and their properties will be given below.

Install

Since version 3.1.4 of caQtDM a new build and installation procedure working forseveral linux platforms are available.

First you will have to unpack the tar archive, which will create the necessarydirectories and files. In the upper directory you will find the necessary procedures tobuild the package, run it locally without installing and also an installation procedure.

you will have to install Qt-4.8 and qwt-6 when they are not already installed. Onmodern systems Qt4 should already be installed, but the qt4-designer notnecessarily and you should install it (eventually with sudo apt-get installqt4-designer). qwt is normally not installed and you should install this too.

1.

you will have to install EPICS2.all the environment variables used for the installation will be defined in thescript caQtDM_Env. When some of the variables are already defined in yourenvironment, the script will use them, otherwise they will be defined. It is up toyou to edit this file and adapt the variables to your environment.

3.

the script caQtDM_BuildAll will build you the package now into the directory./caQtDM_Binaries. You should obtain there adl2ui, caQtDM, libqtcontrols.so andlibcaQtDM_Lib.so as well as a designer directory containing 3 fileslibqtcontrols*_plugin.so. if you encounter a problem when building due to someenvironment variable problem or while not everything was installed before, youmay correct your problem and run the script again. In case you want to cleanupyou use the script caQtDM_CleanAll, which will also delete the resultingbinaries.

4.

you may try to install the package: the package should normally be installed inthe EPICS extensions and the environment variables are pointing to them.

5.

running caQtDM: when the package has been successfully build into thedirectory ./caQtDM_Binaries, you can start caQtDM by using the script

6.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

2 of 32 08/29/2014 06:27 PM

Page 3: 2014/09/01 - caQtDM manual

startDM_Local and the qt4-designer by the script qtdesigner (all located in themain directory where you expanded the tar file). These scripts will set someimportant environment variables in order to set the path, the plugin_path and topoint to the test directory provided with the package (./caQtDM_Tests). In thisdirectory also the stylesheets are located to be used for a nice rendering. Youmay call the test.ui file with the above mentioned scripts. In order to test thedisplay some EPICS channels have to be defined. This can be done by running asoft-ioc shell called with run-epics also provided in the test directory.in case you have qwt 6.1 you will have to use in caQtDM_QtControls/src the filesqwt_thermo_marker_61.* instead of qwt_thermo_marker.*

7.

in case you already use Qt5.1 with qwt6.1 the building should also be straightforward.

8.

Instructions for compiling caQtDM on Windows Requirements:Qt 4.8.2Qwt 6.0.1EPICS 3.12.2MS Visual Studio 2010Wix 3.0.5419.0

With caQtDM_Env.bat you can configure your system. All settings which areneeded will be taken from here.The building can be started with the batchfile : caQtDM_BuildAll.batThe packaging is made with the batch file : caQtDM_Build_Package.batThis will generate a MSI installation file in the folder of caQtDM_Binaries.To clean the Folder you should use caQtDM_CleanAll.bat.

9.

Development history

The following list describe the new features and bug fixes for every release. You canfollow the development history and detect if a bug in the used version has beensolved.

3.7.2

cagraphic lost its linecolor after no connection, correctedcalineedit was not showing alarm colors in alarm_default mode, corrected

3.7.1

improved performance for cartesian and waterfall plot; very long arrays can bedisplayedzoom in cartesian plot was not working well for small values and has beencorrectedepics request for arrays (ca_add_array_event) changed to a request for 0elements in order to get the arrays with their actual lengthadded properties to caLineEdit in order to be able to make a framed border

3.7.0

a spinbox has been integrated in order to be smaller than the wheelswitch. forthe spinbox the digit has to be activated by clicking in order to change it.strings in caLineEdit were trimmed; took that out

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

3 of 32 08/29/2014 06:27 PM

Page 4: 2014/09/01 - caQtDM manual

selection in caTable can be rows or columns now, caTable can execute a specifiedscript with the associated pveliminated sending message in caMessage with right button of mouse.

3.6.4

an empty char waveform was not clearing the caLineEdit: correctedenums with empty strings were not displaying correctly in caLineEditwhen reloading a .prc file, size of display was not minimizeddefault back and foreground colors can be set now for caLineEdit/caTextEntry inui-file stylesheet of mainwindow or in stylesheet.qssnegative precision was leading to an unexpected behaviour, caLineEdit will usethe precision and switch to exponential displayspacebar press has been suppressed for caMessageButton, caShellCommand,caRelatedDisplay, caRowcolMenu, caChoicechanged for caSlider and caNumeric the limits for channel to DRVL and DRVHadded to formread in prc file command and comlab modifiers

3.6.2

caCartesian plot and caStripPlot can have a logarithmic scale now

3.6.1

suppressed slidervaluecallback when setting limits from hopr, lopradded a first attempt of a caWaterfall plot for waveformscorrected for caCamera, position calculated when zooming to small imagesin case of reload, data display is now stopped until all displays are loaded againcamera images can now be zoomed and scrolledreset zoom for caCartesianPlot did not reset correctly in case of channel limitsadded zoom mechanism for caCartesianPlotadded update mechanism choice in main menu in order to switch to directmonitoring or timed monitoringstarting performance optimized for caRelatedDisplay, caChoice, caMenusplashscreen added for loading includes (in some cases loading time can besignificant)

3.5.2

by using CAQTDM_EXEC_LIST as environment variable (as in MEDM with thesame syntax), menu items can be added to the context menusfor caThermo in parser the look was not see as property and caThermo itself wasinitializing itself per default wrong

3.5.1

bug corrected when unfinished enum definitionslider was writing to epics on first call, now it does notcaPolyLine now does not extend its lines when linesize > 1 is used, reproducingthe behaviour of MEDMcaThermo and caSlider resize handle and labels according to the size,foreground and background are working correctly now

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

4 of 32 08/29/2014 06:27 PM

Page 5: 2014/09/01 - caQtDM manual

however with qwt6.1.0 in qwt_slider the routine scaleDraw(); must be setprotected instead of private as was in qwt6.0

3.5.0

caQtDM gives information now about number of monitors/s, number of displays/sand highest monitor

3.4.7

adapted caSlider for qwt6.1

3.4.6

corrected a bug for caGauge with alarms nouse control key for amplifying 10x the increment

3.4.5

caSlider has now a menu to change its increment, in designer increment can bespecified tocaSlider moves also on left mouse click and an wheel scroll; when it has thefocus, up and down keys can be used (when focus outline red gets drawn)gauges have now following properties: alarmLimits : Channel_Alarms,User_Alarms, NonedisplayLimits : Channel_Limits, User_Limitsadl2ui has been corrected for these properties

3.4.4

enhanced performance for caCamera widget

3.4.3

package can also be build with Qt4.6 and qwt6.0, necessary for SL6(caCartesianplot, caDoubletabWidget and plugins slightly modified)epics enums and strings modified for count > 1

3.4.2

caCamera stuff modifiedadded mutex to synchronize data and displayfont bug in caTable solvedfound a datarace in caStripplot, corrected

3.4.1

caCamera displays intensity at x, ycaCamera context menu for grey / spectrum and zoom

3.4.0

caStripplot has been revisitedcaCamera uses now concurrent mode for calculations

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

5 of 32 08/29/2014 06:27 PM

Page 6: 2014/09/01 - caQtDM manual

3.3.1

mainwindow and messagewindow have been merged

3.3.0

caTable gets now the correct font after resizing when values updatecaStripPlot has been corrected for incorrect time behaviour.

3.2.2

in menu you have the possibility to raise the main and message windows

3.2.1

when requesting a display that was already started, it did not popup but made anew instance. this has been correctedthis was working before, but by some modifications was not correct any more

3.2.0

The build mechanism for linux and windows should do on most platforms, seecaQtDM_READMEcaQtDM build for qt4.8 with qwt6.0 and for qt5.1 with qwt6.1caLed can use now the severity to colorizecaThermo was inadvertently using nodeco mode when mode was usedcaCircularGauge will draw a white scale when not connected and bug correctedfor enums without enum string write just the value in caLineEdit

3.1.1

The main characteristic of this version is that you can resize the caQtDMsynoptic display windows without using Qt layouts. You can build a displaynormally and everything will be resized when you resize the window.In order to make the resizing correctly, you should specify for the fontscalemodeof caLabel and caLineEdit the parameter "WidthAndHeight".When you convert MEDM displays with the utility adl2ui, this is doneautomatically.When you do not want a window to be resized, you can specify -noResize on thecommand line.Another enhancement existing since version 2.8 is the fact that you can hook adigit of the wheelswitch to the keyboard in order to modify it with the up anddown keys.

2.8

All the changes have been documented in qtdefs.pri

2.5

Scales of Stripplot can now be changed during runtime. The caQtDM applicationnormally limits the update rate of monitors to 5 Hz,however now a JSON string can be written behind the channel name.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

6 of 32 08/29/2014 06:27 PM

Page 7: 2014/09/01 - caQtDM manual

An example is given in the presentation "introduction to caQtDM".Color mode for calabel is now working (was forgotten). Also an icon is presentedon the window bars.A Windows distribution package allowing to work immediately with the designerand caQtDM has been build and can be downloaded here(this package does not contain any sources, merely executables, work done byH.Brands at PSI).

2.3

Timebase of Stripplot was wrong and has been corrected. Some other compilerwarnings have been eliminated and the building process was slightly modified.

2.1

When using correctly the layout possibilities offered by Qt, one can resize awindow (you will find an example in work/caQtDM/parser/proscanFiles/phaseslitsnew.ui).Up to now when using "includes" only a placeholder could be seen in thedesigner. Now the included ui file is displayed inside the designer.For polylines and polygones, a graphical editor is integrated into the designer.One can create segments by pressing the left mouse button when moving themouse and one can delete the last created segment by pressing the right mousebutton.The graphical entities (rectangles, circles, ellipses, lines, arrows, triangles) canbe rotated by specifying a tilt angle.

2.0

The major changes in this version are changes for stability (in the previousversion sometimes crashes occurred) and the introductionof soft pv's. A variable can be defined, calculated and used as a normal pv.All the features of medm used for the cartesian plots are implemented now. ThecaCartesian plot background can be transparent so that a camera image can beunderlaid. The limits of the x and y axes can be changed by specifiying pv'sinstead of values when using channel limits. The stripplot widget has beenmodified while the behaviour was not quite correct. The message button andtextentry were not working well and have been corrected. Labels can betransparent too.A camera widget has been introduced. At PSI we can now display are usualcameras bw and color. You can easily modify the code to treat other formatsof camera waveforms.caQtDM gives the number of connected and unconnected channels, furthermorea list of unconnected channels with their file location can be shown.caQtDM is now protected against ui description file syntax errors;caQtDM supports the command line parameters -attach -noMsg -display -macro-x -noStyles -dg. -x has no effect but suppresses the error message whenkeeping the medm command line parameters.caQtDM runs in native mode on linux as well as on microsoft windows.

caQtDM Custom Widgets

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

7 of 32 08/29/2014 06:27 PM

Page 8: 2014/09/01 - caQtDM manual

The custom widgets used in caQtDM have been divide in three categories as wasdone in MEDM. MEDM users are used to these cartegories and we have thereforekept the categorisation in Graphics, Controller and Monitors. As in MEDM, Graphicsare items such as frames, labels, graphical entities like rectangles, triangles, lines, ...,images and composite objects (called here includes, while included from other ui files.Monitors are objects that monitor the state or values of process variables throughdisplay of values, plots, tables, thermometers, dials, ... Controllers are objects thatchange the values of process variables through many different objects. you will findhere an exact description of them with their properties: For all objects, you havenormally their geometry (position and size),, sizepolicy and some other properties liketooltips. It has to be noted that for many widgets their stylesheet will be overwrittenin order to get the representation that is requested when specifying for examplebackground, foreground, border colors or other properties. The stylesheet can beinfluenced in some cases by specifying a stylesheet for the mainwindow or instylesheet.qss, a stylesheet found in the caQtDM path. The adl2ui converter usesnormally this stylesheet to integrate these defaults into the generated ui file. You maydelete this stylesheet or change it to your convenience. However as mentionedbefore, many styles will be overwritten.

The following table gives you an overview of all objects that are actually available:

Graphics Monitors Controllers

caGraphics:Rectangle, Circle,Arc, Triangle, Line,Arrow

caLineEdit caChoice

caPolyline: polylineand polygon

caLed caMenu

caLabel: text caCartesianPlot caMessageButton

caFrame caLinearGauge,caCircularGauge

caRelatedDisplay

caImage: any imageformat, mostly usedfor animated gif

caThermo caShellCommand

caInclude: theequivalent tocomposite of MEDM

caStripPlot caSlider

caDoubleTabWidget:a general purposewidget

caByte caTextEntry

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

8 of 32 08/29/2014 06:27 PM

Page 9: 2014/09/01 - caQtDM manual

caCamera caNumeric,caApplyNumeric

caWaterfallPlot caToggleButton

caBitNames caScriptButton

caCalc caSpinBox

caTable

Their main properties are described below. It has to be noted that throughinheritance of Objects, other properties exist, that are not necessary relevant here.

all monitor objects

caLineEdit, the most used graphical object for data monitoring

is the equivalent of the Text Update in MEDM.

Geometry is used for any object

Description:

channel:QString: this string represents the control system process variable

foreground:QColor: color used for the foreground

background:QColor: color used for the background

colorMode:Default Show the object in colors given by stylesheets.

Static Show the object in colors given by the propertiesbackground and foreground.

Alarm_Default Show the object in alarm colors based on the severityof the associated process variable. (green, yellow, red,white or gray). The foregound or the background aregiven by the stylesheets depending on thealarmHandling specifying if alarm handling is done onthe foreground or on the background.

Alarm as Alarm_Default, but the foreground or backgroundcolor is taken from the properties background orforeground

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

9 of 32 08/29/2014 06:27 PM

Page 10: 2014/09/01 - caQtDM manual

framePresent:boolean: specifies if a border will be drawn around the object,frameLineWidth must be different from zero in order to see the border

frameColor:QColor: color used for the border

frameLineWidth:Integer: linewidth of the border

alarmHandling:when colormode is set to alarm, it can be specified here if theforeground or the background will show alarm colors.

precision:Integer: precision in case of precisionMode=User

precisionMode:Channel Precision specified by the control system will be used

User Precision specified by the user will be used

limitsMode:Channel Limits specified by the control system will be usd (HOPR,

LOPR for EPICS)

User Limits specified by the user will be used.

maxValue:float: maximum value used in case of limitsMode=User

minValue:float: minimum value used in case of limitsMode=User

fontScaleMode:None No scaling will be done

Height Text will be scaled to the height of its containing box

WidthAndHeight Text will be scaled to the height and width of itsscaling box; this should be used for a correctresizing of the display

unitsEnabled:boolean: when checked will append the unit to the value

formatType:decimal value encoded in f format using

precision from user or channel, in caseof negative precision will switch to eformat

exponential, engr_notation value encoded in e format usingabsolaute precision from user or channel

compact value encode in e or f format usingabsolaute precision from user orchannel, format will switch to e formatfor values < 1.0e-4

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

10 of 32 08/29/2014 06:27 PM

Page 11: 2014/09/01 - caQtDM manual

truncated, sexagesimal,sexagesimal_hms,sexagesimal_dms

not supported yet

hexadecimal value will be encoded in hexadecimalformat

octal value will be encoded in octal formatoct

string will be treated as decimal formal

Description:

caThermo

is the equivalent of the Bar Monitor in MEDM.

Geometry is used for any object

Description:

channel:QString: this string represents the control system process variable

foreground:QColor: color used for the foreground

background:QColor: color used for the background

colorMode:Default Show the object in colors given by stylesheets.

Static Show the object in colors given by the properties backgroundand foreground.

Alarm Show the object in colors given by the properties backgroundand foreground, but change the color of the pipe in case ofalarm

direction:Up, Down, Left, Right

look:noLabel, noDeco, Outline, Limits, ChannelV; These property values arefor compatibility with MEDM, and should be implemented later.Actually Outline, Limits and ChannelV will give you a scale whenscalePosition is different from noScale; noLabel and noDeco will haveno scale.

logScale:boolean: true or false

limitsMode:Channel Limits specified by the control system will be usd (HOPR,

LOPR for EPICS)

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

11 of 32 08/29/2014 06:27 PM

Page 12: 2014/09/01 - caQtDM manual

User Limits specified by the user will be used.

type:Pipe, marker, PipefromCenter

scalePosition:Noscale, LeftScale, RightScale, TopScale, Bottomscale

maxValue:float: maximum value used in case of limitsMode=User

minValue:float: minimum value used in case of limitsMode=User

caLed

has no equivalent in MEDM.

Geometry is used for any object

Description:

channel:QString: this string represents the control system process variable

bitNr:Integer: the bit that has to be considered

falseColor:QColor: color used when the bit is not set

trueColor:QColor: color used when the bit is set

colorMode:Static Show the object in colors given by the properties background

and foreground.

Alarm Show the object in colors given by the properties backgroundand foreground, but with alarm handling

caLinearGauge

is the equivalent of the Bar Monitor in MEDM.

Geometry is used for any object

Description:

caCircularGauge

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

12 of 32 08/29/2014 06:27 PM

Page 13: 2014/09/01 - caQtDM manual

is the equivalent of the Meter Monitor in MEDM.

Geometry is used for any object

Description:

caCartesianPlot

is the equivalent of the Cartesian plot in MEDM and will plot up to 6 curves

Geometry is used for any object

Description:

TitleQString: Titel of the plot

TitleXQString: Title of the X-axis

TitleYQString: Title of the Y-axis

channels_1, channels_2, channels_3, channels_4, channels_5,channels_6

QString: these strings represents the control system process variables;each channelpair is composed of two channels separated by asemicolumn.When specifying only one channel, you will have to put a semicolumnin fron or at the end of the string in order to specify x or y, you will findin the table below how the cartesian plot behaves in case of array orscalars or when only one channel is specified.

Style_1, Style_2, Style_3, Style_4, Style_5, Style_6:NoCurve no curve, only symbols will be drawn when they are

specified

Lines normal curve drawn with lines

Sticks curve draw with sticks from the x base

Steps curve drawn with steps

Dots curve only dots are drawn

FillUnder curve will be filled from the x base

ThinLines curve draw with thin lines

HorSticks curve drawn with sticks from the y base

symbol_1, symbol_2, symbol_3, symbol_4, symbol_5, symbol_6:NoSymbol no symbol will be drawn

Ellipse

Diamond

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

13 of 32 08/29/2014 06:27 PM

Page 14: 2014/09/01 - caQtDM manual

Triangle

DTriangle

UTriangle

LTriangle

RTriangle

Cross

XCross

HLine

VLine

Star1

Star2

Hexagon

color_1, color_2, color_3, color_4, color_5, color_6:QColor: color used for the curve

countNumOrChannelQString: The Count for the Cartesian Plot may be an integer or thename of a process variable. If the value starts with a non-digit, then itis considered to be a process variable name, and the value of Countwill come from the process variable. If the process variable is not foundor its value is less than 1, Count will not be executed

triggerChannelQString: The Trigger Channel is a process variable that causes theentire plot to be updated. If there is a trigger channel, the plot isupdated whenever the value of that process variable changes.Otherwise, each individual trace is updated whenever any of the datafor that trace changes.

eraseChannelQString: The Erase Channel is a process variable that causes erasing ofthe plot. If there is an Erase Channel, the plot erases when the processvariable turns either zero or non-zero, depending on the Erase Mode .The Erase Mode is only relevant if there is an erase channel.

eraseMode:ifnotzero Erase the plot if the erase-channel process variable is not

zero

ifzero Erase the plot if the erase-channel process variable is zero

plotMode:PlotNPointsAndStop Plot n points corresponding to the first n

changes of the process variable, then do not plotany more points

PlotLastNPoints Plot n points corresponding to the last n changesof the process variable, overwriting previouspoints.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

14 of 32 08/29/2014 06:27 PM

Page 15: 2014/09/01 - caQtDM manual

XaxisType/YaxisType:linear Use a linear axis

log10 Use a log axis

XaxisScaling/YaxisScaling:Auto Let the graph routine decide on the axis range depending on

the data

Channel Get the axis range from the process variable

User Specifically specify the minimum and maximum values forthe axis.

background:QColor: color used for the background

foreground:QColor: color used for the foreground

scaleColor:QColor: color used for the scale if scales are specified

gridColor:QColor: color used for the grid if grid is specified

XaxisEnabled:bool: specifies if the x axis should be drawn

YaxisEnabled:bool: specifies if the y axis should be drawn

grid:bool: specifies if a grid should be drawn

XaxisLimits:QString: minimum value used in case of limitsMode=User; the valuesmust be separated by a semicolumn

YaxisLimits:QString: minimum value used in case of limitsMode=User; the valuesmust be separated by a semicolumn

in caQtDM curve can be zoomed with the mouse by pressing the left mousebutton and selecting the area that has to be zoomed. The area is shown by arubberband rectangle. Reset zoom can be chosen through the contextmenu. Translation can be done by pressing the middle mouse button andmoving the mouse. Pressing the right mouse button will bring up a contextmenu (for pvInfo, resetting zoom and changing axes)

A caQtDM Cartesian Plot has the same conventions as a MEDM CartesianPlot. This plot is a very important tool used in control systems and itsbehaviour was taken from MEDM. The Cartesian consists of an X and one ortwo Y axes on which data can be plotted. The sets of data are called tracesand consist of a set of (x, y) pairswith the properties shown above. Thetraces correspond to curves on the plot. Currently there can be up to sixtraces on a plot. Each trace can (but does not have to) have a processvariable from which to get the x values and another from which to get the yvalues. These process variables can be array process variables, such asWaveforms, or they can be scalar process variables with only a single value.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

15 of 32 08/29/2014 06:27 PM

Page 16: 2014/09/01 - caQtDM manual

The variables have to be separated by a semicolumn (see above).

There are eight possible kinds of traces as seen in the following table. Thetraces for a given plot do not all have to be of the same kind – they can bemixed. (In the table Nx is the number of elements in the process variablespecified for x, and Ny is the number of elements in the process variablespecified for y. The letter n denotes a number greater than one, and a blankindicates no process variable is specified. The axis limits LOPR and HOPRdenote the limits obtained from Channel Access for the process variable.Typically, these are the fields LOPR and HOPR in the associated record, butcan be specified by the user with the properties XaxisScaling andYaxisScaling. Count is the specified Count for the Cartesian Plot, which isdescribed in more detail below.)

Kinds of XY Traces

Nx Ny Type Points Xmin Xmax Ymin Ymax NPoints

n n X,Y Vector x(i),y(i) LOPR HOPR LOPR HOPRMin(Nx,Ny)

n 1X Vector, YScalar

x(i),y LOPR HOPR LOPR HOPR Nx

1 nY Vector, XScalar

x, y(i) LOPR HOPR LOPR HOPR Ny

n X Vector x(i),i LOPR HOPR 0Count -1

Nx

n Y Vector i,y(i) 0Count -1

LOPR HOPR Ny

1 1 X,Y Scalar x(i),y(i) LOPR HOPR LOPR HOPR Count

1 X Scalar x(i),i x(i),i LOPR HOPR 0 Count - 1

1 Y Scalar i,y(i) 0Count -1

LOPR HOPR Count

If one of the process variables is an array with more than one element and ifCount is a number greater than zero, then the specified Count is ignoredand the value shown in the last column of the table is used. Under the samecircumstances, if Count is a name, then it is used only if it is greater than 0and less than what would be used if it were a number. That is, Count from aprocess variable can only restrict NPoints to a lower number than it wouldbe otherwise. The points are plotted from i = 0 to NPoints - 1 and update asthe values change. In the cases where one of the process variables is notspecified, the history is plotted on that axis against values from 0 to NPoints– 1 on the other axis.

If one of the process variables is an array with more than one element andthe CA server of the process variable supports dynamic arrays, then when azero is specified for Count, the number of array elements will be set to thecurrent number of valid elements in the array which may vary withsubsequent array update events.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

16 of 32 08/29/2014 06:27 PM

Page 17: 2014/09/01 - caQtDM manual

In the remaining cases, where neither process variable is an array withmore than one element, Count corresponds to a history of the processvariable. (These are the cases where NPoints is shown as Count in thetable.) Each time the process variable changes (or when either one changes,in the case of X, Y Scalar) a new point is plotted until there are Countpoints. The points are plotted from i = 0 to the lesser of Count -1 and thenumber of updates. When the Plot Mode is “plot n pts & stop,†no morepoints are plotted. When the Plot Mode is “plot last n pts,†the earliestpoint is discarded, the others are moved down, and the latest is plotted atthe end. In the cases where one of the process variables is not specified, thehistory is plotted on that axis against values from 0 to Count – 1 on theother axis.

The above behaviour still has to be tested thoroughly. It appeared alreadythat perhaps Count must be twice the value described above ?

caStripPlot

is the equivalent of the StripChart Monitor in MEDM.

Geometry is used for any object

Description:

TitleQString: Titel of the plot

TitleXQString: Title of the X-axis

TitleYQString: Title of the Y-axis

channelsQString: this string represents the control system process variables;the channels have to be separated by a semicolumn.

unitsMillisecond The update period is in milli-seconds.second The update period is in seconds.minute The update period is in minutes.

PeriodInteger: the timespan of the plot for the specified units

XaxisTypeTimeScale The scale of the x-axis is given with hours:minutes:secondsValueScale The scale of the x-axis is given with the values based on the

period value

YaxisType:linear Use a linear axis

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

17 of 32 08/29/2014 06:27 PM

Page 18: 2014/09/01 - caQtDM manual

log10 Use a log axis

XaxisScalingMax_1 .....7/YaxisScalingMin_1, .....7:Channel Get the axis range from the process variable

User Specifically specify the minimum and maximum values forthe axis.

Style_1 ....7:Lines normal curve

FillUnder curve will be filled from the x base

color_1 ....7:QColor: color used for the curve

XaxisLimitsMax_1 .....7/YaxisLimitsMin_1, .....7:QString: minimum/maximum value used in case of limitsMode=User

YaxisLimits:QString: minimum value used in case of limitsMode=User; the valuesmust be separated by a semicolumn

background:QColor: color used for the background

foreground:QColor: color used for the foreground

scaleColor:QColor: color used for the scale if scales are specified

gridColor:QColor: color used for the grid if grid is specified

XaxisEnabled:bool: specifies if the x axis should be drawn

YaxisEnabled:bool: specifies if the y axis should be drawn

LegendEnabled:bool: specifies if the legend should be drawn

caByte

is the equivalent of the Byte Monitor in MEDM.

Geometry is used for any object

Description:

caCamera

has no equivalent in MEDM.

Geometry is used for any object

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

18 of 32 08/29/2014 06:27 PM

Page 19: 2014/09/01 - caQtDM manual

Description:

caCalc

has no equivalent in MEDM.

Geometry is used for any object

Description:

caWaterfallPlot

has no equivalent in MEDM.

Geometry is used for any object

Description:

caBitNames

has no equivalent in MEDM.

Geometry is used for any object

Description:

caTable

has no equivalent in MEDM.

Geometry is used for any object

Description:

all graphical objects

caLabel

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

19 of 32 08/29/2014 06:27 PM

Page 20: 2014/09/01 - caQtDM manual

is the equivalent of Text in MEDM.

Geometry is used for any object

Description:

caGraphics

is the equivalent of all primary graphical objects (like circles, lines, arcs, triangles,arrows, ...) in MEDM.

Geometry is used for any object

Description:

caFrame

has no equivalent of Text in MEDM.

Geometry is used for any object

Description:

caImage

is the equivalent of image in MEDM.

Geometry is used for any object

Description:

Qt supports many graphics format, try yours to see if it will be displayed.The most interesting format is however the animated GIF format. These GIFimage files may include multiple frames, transparency, and most otherfeatures supported by the GIF format. If the GIF image file has multipleframes, caQtDM can choose to animate the images or to display a specifiedframe. The default is to animate if there is more than one frame. To displaya specific frame, enter an expression for the Image Calc that returns aframe number. Frame numbers start with 0. The syntax for the Image Calcexpression is the same as that for the Visibilty property, and it useschannels A-D in the Dynamic Attribute. The only difference is that the CALCexpression should return a frame number, not True or False. The value willbe rounded to the nearest integer. Frame numbers that are too high will usethe last frame, and frame numbers that are too small will use the firstframe. The Image will be black in EXECUTE mode if the Image Calc

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

20 of 32 08/29/2014 06:27 PM

Page 21: 2014/09/01 - caQtDM manual

expression is invalid. The visibility of the Image is determined in the usualway if there is a channel specified. A multiple-frame Image even with noprocess variables specified for the Dynamic Attribute does update withsome speed. Use the Image Calc expression and the process variables in theDynamic Attribute to specify when to display each color. There is an EPICSextensioncalled Simple GIF Animator (SGA) that allows you to create andmodify animated GIFs for use in caQTDM. There are also many other GIFanimators available, especially for Microsoft Windows. It does not make anydifference which platform you use to create or manipulate the images. Youcannot use SGA or most of the animators to create the images themselves,only to add, delete, and rearrange them plus modify some of the GIFparameters. There are many drawing and image editing programs thatallow you to create and edit images. For UNIX, the GNU ImageManipulation Program (GIMP)is a good choice and is free.

caPolyLine

is the equivalent of Polyline and Polygone in MEDM.

Geometry is used for any object

Description:

caInclude

is the equivalent of the Composite in MEDM

Geometry is used for any object

Description: Composite objects are created by the designer as a new ui fileto be included in a main file. For many operations they are treated as oneobject. Its uses also visibility (Color Mode, Visibility, Visibility Calc,Channels A-D) properties. One can specify macros. you can specify them byplacing a semi-colon after the file name and entering them as on thecommand line.

caDoubleTabWidget

has no equivalent in MEDM and is not a controls object

Geometry is used for any object

Description:

all controller objects

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

21 of 32 08/29/2014 06:27 PM

Page 22: 2014/09/01 - caQtDM manual

caNumeric

is the equivalent of the Wheelswitch in MEDM

Geometry is used for any object

Description:

The WheelSwitch has arrow buttons above and below the digits that areused to change individual digits, and it also accepts keyboard input. The upand down arrow buttons are the main feature of the WheelSwitch. You clickthem to increment the digit. The arrow buttons can also be navigated andoperated via the keyboard. You have to put the focus on the selected digit,which get surrounded with a red color. The cursor has to remain inside thewidget otherwise the focus will be lost. The up and down arrow keysincrement or decrement the selected digit. Clicking on an arrow button willincrement or decrement the digit. The WheelSwitch will also accept input ofa new value via the keyboard by double clicking on the value. Escape abortsthe input. Type Enter to finish the input.

caApplyNumeric

is the equivalent of the Wheelswitch in MEDM

Geometry is used for any object

Description:

The same behaviour as the Wheelswitch, with the difference that the valuewill be applied when pressing the apply button.

caSlider

is the equivalent of the Wheelswitch in MEDM

<Geometry is used for any object

Description:

caShellCommand

is the equivalent of the Shell command in MEDM

Geometry is used for any object

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

22 of 32 08/29/2014 06:27 PM

Page 23: 2014/09/01 - caQtDM manual

Description:

caMenu

is the equivalent of the Menu in MEDM

Geometry is used for any object

Description:

caChoice

is the equivalent of the Choice Button in MEDM

Geometry is used for any object

Description:

column The buttons are arranged in a row. (This appears to be a mistake,which will not be corrected because of existing screens.)

row The buttons are arranged in a column. (This appears to be amistake, which will not be corrected because of existing screens.)

rowcolumn

The buttons are automatically arranged in rows and columns.

caRelatedDisplay

is the equivalent of the Related Display in MEDM

Geometry is used for any object

Description:

create new display Create a new display and leave the current one.replace display Create a new display that replaces the current one.

menu Use a pull down menu for the choices.a row ofbuttons

Use a row of buttons for the choices.

a columnof buttons

Use a column of buttons for the choices.

invisible Do not show anything for the choices. This mode is intended tobe used with a graphic or other object on top of the relateddisplay. The graphic should make the operation of the Related

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

23 of 32 08/29/2014 06:27 PM

Page 24: 2014/09/01 - caQtDM manual

Display clear. In EXECUTE mode, the Execute-Mode Popup Menucontains an item to toggle the makring of hidden buttons in casethe user cannot find them.

caTextEntry

is the equivalent of the Text Entry in MEDM

Geometry is used for any object

Description:

caMessageButton

is the equivalent of the Message Button in MEDM

Geometry is used for any object

Description:

caToggleButton

has no equivalent in MEDM

Geometry is used for any object

Description:

caScriptButton

has no equivalent in MEDM

Geometry is used for any object

Description:

caSpinBox

represents a simplified Wheelswitch

Geometry is used for any object

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

24 of 32 08/29/2014 06:27 PM

Page 25: 2014/09/01 - caQtDM manual

Description:

Requirements

caQtDM requires that Qt, qwt and EPICS are installed. Actually the suported versionare Qt4.6 and above, qwt6.0 and above. Qt5 needs at least qwt6.1. The synopticeditor (designer) is part of Qt and the caQtDM objects are plugged into the designer.This help can be called from the designer by pressing F1 on any object and requiresthe assistant which is a part of Qt. caQtDM runs in principle on any plattform and hasbeen tested for several linux flavours and also on Microsoft Windows. For MAC OSprobably some work has to be done. Qt requires actually on linux normally X11 onMicrosoft Windows the native window system.caQtDM requires that Qt, qwt and EPICS are installed. Actually the suported versionare Qt4.6 and above, qwt6.0 and above. Qt5 needs at least qwt6.1. The synopticeditor (designer) is part of Qt and the caQtDM objects are plugged into the designer.This help can be called from the designer by pressing F1 on any object and requiresthe assistant which is a part of Qt. caQtDM runs in principle on any plattform and hasbeen tested for several linux flavours and also on Microsoft Windows. For MAC OSprobably some work has to be done. Qt requires actually on linux normally X11 onMicrosoft Windows the native window system.

Command Line Options

caQtDM can be executed with the same options as MEDM; this to be compatible withits options. the following options are supported:

[-help | -h | -], gives a description of the options[-x], has no effect[-attach], will attach to a running caQtDM[-noMsg], will iconize the main window[-noStyles], no stylesheet will be loaded, works only when not attaching[-print], will print file and exit[-noResize], will prevent resizing, works only when not attaching[-macro "xxx=aaa,yyy=bbb, ..."], will apply macro substitution to replace occurrencesof $(xxx) with value aaa.[-dg [xpos[xypos]][+xoffset[+yoffsets]], specifies the geometry (location and size) ofthe synoptic display.

Parameters in square brackets [] are optional.

Examples:

Start up, performing macro substitution of all occurrences of $(a) and $(c) in thedisplay file, xyz.ui:caQtDM -macro "a=b,c=d" xyz.adl &Start up in execute mode; resize the display window corresponding to abc.adl to 100by 100 pixels and move it to the location, x = 100 and y = 100; and move the display

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

25 of 32 08/29/2014 06:27 PM

Page 26: 2014/09/01 - caQtDM manual

window corresponding to def.adl to x = 400 and y = 150:caQtDM –dg 100x100+100+100 abc.ui&

Description Files

With the Qt designer you produce xml files with the extension .ui. These files are usedas input for the synoptic viewer caQtDM. These xml ascii file can be edited by hand,but care has to be taken while caQtDM and Qt designer do not forgive any error. Qtdesigner will however tell you at what line the mistake is produced.The files are normally loaded from the current directory and/or from the directoryspecified by the environment variable CAQTDM_DISPLAY_PATH. The directories arespecified with the separator : for linux and ; for microsoft windows.

Connection Problems and Access Rights

When caQtDM cannot connect the specified process variable normally white colorswill be drawn. A list of unconnected process variables can be called through the menuof the main window of caQtDM. When a process variable is not writeable the cursorwill change to some special sign.

Fonts

The custom widgets make extensively use of the Qt font "Lucida Sans Typewriter". Ifthis font does not exist in some cases it will fall back to a font called "Monospace".However the "Lucida" font is really the appropriated font to display numbers and it iswarmly advised to have this font installed.

General Properties

Geometry

All the widgets have geometry properties that can be set by the designer;these properties are normally at the top of the property sheet:

XPosition

x coordinate of the top left corner of the objectrelative to thedisplay.

YPosition

y coordinate of the top left corner of the object relative to thedisplay.

Width Width of the object.

Height Height of the object.

Visibility

For the graphical objects except caDoubleTabWidget which is not a controlwidget

ColorMode

Color Mode for the object. only for caGraphics, caLabel andcaPolyLine, See the ColorMode property

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

26 of 32 08/29/2014 06:27 PM

Page 27: 2014/09/01 - caQtDM manual

Visibility Visibility mode for the object. See the Visibility property

VisibilityCalc

A CALC expression that determines whether the object isdisplayed or not. The expression should return 0 for False andanything else for True. See CALC Expression .

ChannelA

Name of the main process variable associated with the object.An A in the CALC expression is replaced by the value of thisprocess variable, and the values corresponding to G through Lare obtained from this process variable.

ChannelB

Name of the second process variable associated with the object.A B in the CALC expression is replaced by the value of thisprocess variable.

ChannelC

Name of the third process variable associated with the object. AC in the CALC expression is replaced by the value of thisprocess variable.

ChannelD

Name of the fourth process variable associated with the object.A D in the CALC expression is replaced by the value of thisprocess variable.

Color Mode

static Show the object in its normal colors.

alarm Show the object in alarm colors based on the severity of theassociated process variable. The alarm colors are Green forNO_ALARM, Yellow for MINOR_ALARM, Red for MAJOR_ALARM,White for INVALID_ALARM, and Gray if the alarm has an unknownvalue (because of an error in the record, for example).

Visibility Mode

static The object is displayed always. Updating objects are alwaysabove non-updating objects.

if notzero

The object is displayed if the process variable is not zero.

if zero The object is displayed if the object is zero.

calc Use calc expression to determine the visability.

Direction

For the Bar Monitor , Byte Monitor , Scale Monitor , and Slider

up Direction for the object is up or up/down.

right Direction for the object is right or left/right.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

27 of 32 08/29/2014 06:27 PM

Page 28: 2014/09/01 - caQtDM manual

down Only used in the Bar Monitor. Otherwise, MEDM treats this the sameas up.

left Only used in the Bar Monitor. Otherwise, MEDM treats this the sameas right.

Label

For the Meter, Bar Monitor, Scale Monitor, and Slider.

none No extra features, except the limits are shown for the meter.You can eliminate the limits on the meter by resizing itvertically so they do not show.

nodecorations

Same as none except for the Bar Monitor. For the BarMonitor only the background and the bar show. This allowsmaking bar graphs in MEDM.

outline Show limits.

limits Show limits and a box for the value (except there is no boxfor the Slider).

channel Show limits, a box for the value, and the process variablename (except there is no box for the Slider).

Text Align

horiz. left Align the text at the top left of the object. (Capital letters willline up with the top of the object, and the text will start at theleft of the object.)

horiz.centered

Align the text at the top center of the object. (Capital letterswill line up with the top of the object, and the text will behorizontally centered in the object.)

horiz.right

Align the text at the top right of the object. (Capital letters willline up with the top of the object, and the text will end at theright of the object.)

vert. top No longer used. In ADL files MEDM treats this the same ashoriz. left (as it used to) for backward compatibility.

vert.centered

No longer used. In ADL files MEDM treats this the same ashoriz. center (as it used to) for backward compatibility.

vert.bottom

No longer used. In ADL files MEDM treats this the same ashoriz. right (as it used to) for backward compatibility.

Text Format

For the Text Entry and Text Monitor . For all of the formats, the resultdepends on the number itself and the precision as returned from channelaccess for the process variable. The precision is typically the PREC field for

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

28 of 32 08/29/2014 06:27 PM

Page 29: 2014/09/01 - caQtDM manual

the associated record. The PREC field is only determined when the processvariable is connected, so subsequent changes to the PREC do not affect theformat until the synoptic display is reloaded.

CALC Expressions

CALC expressions are used to determine visibility for graphical objects andto determine the frame number for the caImage , which also has a DynamicAttribute. For visibility the expression should return 0 for False andanything else for True. For the frame number for the Image it should returna number, which will be rounded to the nearest integer. Frame numbersstart with 0. The complete syntax of the CALC expression is described indetail in the Record Reference Manual found in the Epics Documentationunder IOC software for any version of EPICS base, through at least Base3.13. It is a case-independent C expression that can include functions suchas ABS, SQR, MIN, MAX, CEIL, FLOOR, LOG, LOGE, EXP, SIN, SINH, ASIN,COS, COSH, ACOS, TAN, TANH, and ATAN, as well as the usual C operators,except that != is replaced by # and == is replaced by =. The letters A-Lobtain their values from the Channels A-D and are replaced as follows.

A The value of Channel A.

B The value of Channel B.

C The value of Channel C.

D The value of Channel D.

E Reserved.

F Reserved.

G The COUNT of Channel A.

H The HOPR of Channel A.

I The STATUS of Channel A.

J The SEVERITY of Channel A.

K The PRECISION of Channel A.

L The LOPR of Channel A.

Examples are:Show the object whenever the value of Channel A is zero: !AShow the object whenever the value of Channel A is not zero: AShow the object whenever the value of Channel A is 12: A=12Show the object whenever the value of Channel A is not 12: A#12Show the object whenever the values of Channel A, Channel B, and ChannelC are all negative: A<0&&B<0&&C<0Show the object whenever the main process variable is within 90% of itsHOPR or LOPR limits: A<.9*L||A>.9*HShow the object whenever the SEVERITY of the main process variable is not0: !J

Macro Substitution

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

29 of 32 08/29/2014 06:27 PM

Page 30: 2014/09/01 - caQtDM manual

Strings of the form $(name) in an ADL file can be replaced by some other string, bothon the command line and when calling a related display. Specific directions for eachof these cases are given in the correspoonding sections of the manual. In general,there is an argument string of the form “name1=value1[,name2=value2]…”. Alloccurrences of “$(name1)” in the ADL file are replaced with “value1”, then alloccurences of $(name2) are replaced by value2, etc. The substitition is recursive; thatis, if value1 contains an occurrence of $(name2), then when name2=value2 isprocessed, that occurrence will be replaced by value2.

Drag-And-Drop

you may drag and drop an item to some destination, however there is no drag anddrop possible between Qt and X11. When using KDE you may drag and drop to akonsole. For simple cut and paste you can call the pv info box and get the variable youwant to paste.

Main Window

The main window of caQTDM present messages, a menu bar and a status bar.

The menu bar has the following items:

Menu OpenFile

calls a dialog box for opening a .ui or .prc file (.prc filesrepresent psi special ascii files for rapid prototyping)

Reload will close and reload all displays; very handy during editing

Exit will exit caQTDM

About gives some information about the build and author

PV will display a list of unconnected PV's

UpdataType Direct Wenn caQtDM is in this mode, all the monitors will be displayedas soon as they come

Timed Wenn caQtDM is in this mode, all the monitors will be displayedwill be displayed with a highest rate of 5Hz, however this ratecan be set on a individual base by a JSON string after thechannel (in designer) with the following syntaxchannel{"monitor":{"maxdisplayrate":20}}, where you canchoose your display rate.

the Status bar will display the following information: memory used by caQtDM, thenumber of connected and unconnected PV's, the number of monitors per second, thenumber of displays per second and the monitor with the highest rate.

Context Menu

By pressing the right mouse button over an object you will get a context menu. Thismenu contains at least an item called PV info in order to get information about all theprocess variables associated with that object. For some other objects you will findother items for example for changing axes of the caStripplot and caCartesianplot orfor interaction with caCamera.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

30 of 32 08/29/2014 06:27 PM

Page 31: 2014/09/01 - caQtDM manual

Context Menu Customization

The context menu can be configured by adding other items with their actions. Thisconfiguration is specified in the CAQTDM_EXEC_LIST environment variable. Thisvariable is of the form: name1; program1[[:name2; program2]…].The items betweencolons represent each menu item. All of the characters up to the first semi-colon ineach item are the text that appears on the menu. The remaining characters representthe system command that will be executed when the item is selected. The systemcommand can include the following special characters:

&P The process variable will be automatically taken from the object.

&A The full path name of the ui file associated with the display.

&T The short name of the file.

&X The X window id of the ui screen. This can be used with commands like Xwd, forexample. only for linux

Examples are:export CAQTDM_EXEC_LIST='Probe;probe &P &:PV Name(s);echo &P'export MEDM_EXEC_LIST='Full Name;echo &A:Short Name;echo &T'export MEDM_EXEC_LIST='XTerm;xterm -fg black -bg white &'export CAQTDM_EXEC_LIST=' Dump;xwd -id &X | xwdtopnm | pnmtops | lpr &'

Help

You may obtain help for any widget in the designer by pressing F1. For the caQtDMcustom widgets the help file generated from this html file should be registered by theQt assistant.

Resizing Displays

Displays With caQtDM you can resize the synoptic display windows without using Qtlayouts. You can build a display normally and everything will be resized when youresize the window. Furthermore you could try Qt designer layouts (for experts only)

Printing

By pressing the right mouse button on the background of your synoptic display youmay get a context menu with the item "Print". Normally you should get a print dialog.

Environment Variables

MEDM uses the following environment variables:CAQTDM_DISPLAY_PATH A colon-separated (semi-colon-separated on

Mircosoft Windows) list of directories in whichto look for display files. Only looks in thecurrent working directory if not specified.Related Displays have to be in your currentdirectory or in this path

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

31 of 32 08/29/2014 06:27 PM

Page 32: 2014/09/01 - caQtDM manual

CAQTDM_EXEC_LIST A list of commands for the Context Menu . Seethe Context Menu for the format.

caQtDM Custom Widgets Manual http://epics.web.psi.ch/software/caqtdm/caQtDM_Manual

32 of 32 08/29/2014 06:27 PM