To efficiently create an application program with multiple (nearly) identical channels, the following procedure is recommended.
Note that this procedure is also supported for ETS3 application programs, though here all channel information is lost when creating the vd* file.
Create the first channel
The first channel is created as usual. To prepare the later steps, the following is recommended:
·Use either "1" or "A" as channel Number, choose a channel name that ends with the channel number (e.g. "Channel 1"/"Channel A")
·Start the names of all Parameters, ParameterRefs, ComObjects and ComObjectRefs referring to the channel with a common prefix, e.g. "CH1_" if the channel has Number = "1".
·Start the names of all global (i.e. shared by all channels) Parameters, ParameterRefs, ComObjects and ComObjectRefs by a distinct prefix, e.g. "G_".
After the first channel is complete and tested, generate additional channels by the following procedure:
·Select the first channel and execute the Copy command
·Select the Dynamic root element and execute the Paste Special command.
·In the Smart Copy Channel dialog, enter replacement rules
oIn the Global section, specify how the copy operation shall recognize the global parameters and communication objects. With the above suggestion, enter "^G_".
oFor the Parameter, ParameterRef, ComObject and ComObjectRef Names, specify a suitable replacement rule, e.g. "CH1_" -> "CH2_"
oSpecify suitable ComObject number offsets and Parameter offsets
·Perform the Paste Special
·Repeat the Paste Special command until the desired number of channels is reached. The settings in the Smart Copy Channel dialog will be suggested automatically depending on the choice in the first Paste Special.