[Next] [Previous] [Up] [Top] [Contents] [Index] |
Chapter 5 Graphics Objects
The name of this subclass, graphics, is a kind of misnomer, for all objects--whether they be monitors, controllers, or plots--are graphics. Yet graphics is still a useful name for this subclass because people generally use these objects to enhance the overall appearance of the display and to provide visual aids for the operators. For instance, you will often want to add a title to the display using the text object in this subclass so that at run-time the operator knows exactly what the display is for--for a certain subsystem or for a specific process variable. Thus, graphics objects are mostly static, that is, they do not connect to channels at run-time, but they can also be dynamic when a color rule modifies them or they are modified by the visibility modifier.
To change a static graphics object to a dynamic one:
To change a dynamic object to a static one:
Remember from the introduction that the term channel can refer to any record or any record's field in an EPICS database that is accessible via Channel Access. However, since Channel Access was untied from the EPICS database, DM can now monitor and control non-EPICS process variables. Therefore, how you specify a channel name depends on the context you are working in. The main thing to remember is that channel names are case sensitive. Also, remember that DM passes to Channel Access the entire name string, including spaces.
Below follows a description of EPICS record names. Though EPICS-specific, it should be relevant even for non-EPICS process variables.
Basically, the format for a channel name is the record name and then the field name. The record name and field name are separated by a period ('.'). In addition, the record name may consist of several elements, identifying which database or subsystem it belongs to, as well as the record's particular name within that subsystem or database. However, record naming conventions vary from project to project and from site to site. An example of a channel name that you might enter in the text-entry line for the 'channel for dynamics' property might resemble the following:
demo:ao1.SEVRDemo:ao1 is a record's name in a database. Demo is an element of a record name that identifies it as a record in a certain database, in this case the demo database. Ao1 is simply the record's particular name within that database. SEVR, on the other hand, refers to a field name in an EPICS record, in this case, an analog output record. The entire name is case sensitive, and the field name must always be uppercase, while the record name must match the case of record name in the database.
Any channel name must consist of a record name. A field name is optional because DM will automatically connect to the VAL field of a channel when no field name is specified. This goes for channel names with macro substitutions as well as other channel names. If you do specify the VAL field in a channel name, DM will still connect to the VAL field properly.
In EDD you can use macros that you can replace at run-time by a real channel name when you run DM. A macro is typically used to replace a record name, since record names vary for each individual record, while the field name is generally not replaced by a macro since field names are the same for each type of record. For example, all analog output records have the same set of fields. The following shows the format for a macro:
This macro could be expanded into a real channel name so that the object that contains this macro could be used to monitor the SEVR field for any EPICS record that contains such a field. The dollar sign and parentheses are characters that DM recognizes as containing a substitution string, the substitution string being any string of characters. In other words,
Macros can also be nested; that is, a macro can be placed within another macro. So, for instance, you could use two macros, one within the other, in place of two elements in a record name. An example of nested macros would be:
All graphics objects have 'edge style' and 'fill style' properties. These properties are inherited from the 'default edge and fill style' attributes in the Display Attribute Window and determine how the foreground and background colors are used. Each graphics object uses these properties differently, so you must refer to the section on each object for more information on edge and fill styles.
If you highlight the 'visibility modifier' property in an object's property window and hold down the right mouse button, a menu with three options appears:
The if zero or if not zero options are the dynamic settings. They turn the visibility modifier on.
The visibility modifier monitors the channel specified in the 'channel for dynamics' property. As you can guess from the option names in the menu, the visibility modifier monitors a channel's values only according to whether it is zero or a number not equal to zero. It does not distinguish between 11 and 44 for example. Thus, you can see that its main use will be to monitor discrete or binary channels, though you could conceivably monitor analog channels to see if the channel is anything other than zero. The if in the options refers to when the visibility modifier will make the object appear: when set to the if not zero option, the object will appear when the channel's value is equal to any number other than zero and disappear when it equals zero; when set to the if zero option, the object will appear when the channel is equal to zero and disappear when equal to anything other than zero.
One thing to note is that when there is a problem with the channel connection--either a mistake in the channel name in the 'channel for dynamics' property or a problem with the IOC or channel access--during run-time a graphics object using the visibility modifier setting will be white and will display the message that all dynamic objects display when their channel connection does not work:
EDD/DM User's Manual, 2.4 - 27 MARCH 1997 [Next] [Previous] [Up] [Top] [Contents] [Index]
L O S A L A M O S N A T I O N A L
L A B O R A T O R Y