[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 4 Creating and Manipulating Objects

12. Modifying Channel Names

There are two ways you can specify the channels that dynamic objects will connect to at run-time: by entering the channel in an object's property sheet or by choosing the modify channel names option, which is in the Modify menu. Usually, you will want to use the modify channel names option when you must change the channel name or names of several different objects because it would be tedious to have to bring up the property sheet and change the channel name in each object. Instead, you can select all the objects for which you want to change the channel name, then choose the modify channel names option. The Channel Name Modify window, illustrated in Figure 4-19, appears.

The Channel Name Modify window contains two columns that list the old and new channel names of all the selected objects. The 'new' column contains text-entry lines in which you can enter the new channel names after deleting the old channel names that also appear on the line. You must know which channel name belongs to which object in the list, because there is no order by which you can tell which name belongs to which object.

The Channel Name Modify Window.

The following is a brief discussion on specifying channels for dynamic objects.

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 to non-EPICS process variables.

Basically, the format for a channel name is the record's name in the database and then the field name. These elements are divided 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. An example of a channel name that you might enter in the 'new' column in the Channel Name Modify window might resemble the following:

Demo: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, i.e. an analog output record.

Record names are case sensitive. The field name is always uppercase and the record name can be of both cases, but it must match the case of the record name.

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.

All of the channel names in the Channel Name Modify window of Figure 4-19 contain macros. In EDD you can use a macro, and then expand it at run-time into a real channel name when you run DM. For example, the Channel Name Modify window in the figure is from a display that is used to monitor and control an analog output record. Instead of specifying a specific record name, it uses a macro for each record name, followed by a field name. Because field names are the same for each type of record while the record name is specific to each individual record, usually only the record names are substituted by macros.

Thus, the following channel name in the Channel Name Modify window:

could be used to monitor or control the SEVR field for any EPICS record that contains a SEVR field. All you have to do is expand the macro into a real channel name at run-time. The dollar sign and parentheses are characters that DM recognizes as containing a macro, the macro being any string of characters. In other words, <chan> in the above example could be <channel> or <name> or <channame1> or whatever.

Macros can also be nested; that is, a macro can be placed within another macro. 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:

Macros are expanded to real channel names on the command line when DM is started. In addition, there are related display callup objects with which related displays can be opened from another display simply by selecting the display name. These objects also provide a way for the macros in a display to be expanded to real channel names. Generally, the format for a macro expansion looks like this:

chan = analog1
Where chan is the macro string and analog1 is the record name that replaces it. This expansion can be specified on the command line from where DM is started or in the property sheet of a related display callup object.

EDD/DM User's Manual, 2.4 - 27 MARCH 1997
[Next] [Previous] [Up] [Top] [Contents] [Index]

| LANL | Lansce | UC | DOE |

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
Operated by the University of California for the US Department of Energy

Copyright 1996 UC   Disclaimer   

For problems or questions regarding this web site contact George Vaughn.