The Epl_CNServer object configures Powerlink when the ProviewR system acts
as a controlled node (CN).
Configuration
The Epl_CNServer object is placed in the node hierarchy under the node object.
The CNServer object requires that the powerlink process is configured with an
EplHandler object, see example 1.
Example 1, Epl_CNServer settings
Shows network device and CN node NodeId number (14) etc.

The Server object needs also a Epl_ServerModule object as a child, and
under Epl_ServerModule object, channel objects are configured. The channel
objects reflect the IO mapping between the CN and MN nodes, see example 2.
Example 2, CN and Module with channels
Shows IO channels i.e. the IO interface. The meaning of name bit8, int32 etc.
are the setting for attribute "Representation" and nb0, nb1 etc. is the attribute
"Number" setting.

Powerlink Configuration in openCONFIGURATOR
When the configuration is finished, it is possible to create an xdd-file from
"GenerateXttFile" in the popup menu for the Epl_CNServer object. The name and
location for the generated file is $pwrp_cnf/cnserver.xdd. The xdd file is
used when configuring the Powerlink circuit for the MN. See also class Epl_MN
for more information about openCONFIGURATOR xdd/xdc files and how to create a
cdc-file for a Powerlink configuration.

Fig Generate an xdd file
openCONFIGURATOR
Example 3 to 5 below shows screenshots from openConfigurator tool and the influence
the imported xdd file from ProviewR have on the IO mapping.
The xdd file is generated with the same settings as in example 2 i.e. nine digital
inputs divided in two bytes, two analog inputs, two digital outputs and three analog
outputs.
Note the digital bit settings in ChanDi and ChanDo attribute "Number" is important
for a correctly generated xdd file. In the example 2 the number is named nb0, nb1
nb3 etc. Attribute "Representation" reflect the byte/word length of the channel.
In the example below the CN node (Epl_CNServer) has id number 14.
Example 3
RPDO memory mapping in openCONFIGURATOR based on the xdd file generated from ProviewR.
The MN receives data from CN that are outputs in ProviewR CNServer (Do00, Do01, Ao00,
Ao01 and Ao04 in that order, see example 2)

Example 4, TPDO memory mapping in openCONFIGURATOR
based on xdd file generated from ProviewR.
MN node transmit data to CN node, inputs in ProviewR CNServer
(Di00 to Di09, Ai04 and Ai00 in that order, see example 2)

Example 5, Structfile xap.h autogenerated by openCONFIGURATOR tool
If you compare your node hierarchy (example 2) with the xap.h file, they
should match.
openCONFIGURATOR will align 16 bit words on 16 bit bounary, and 32 bit words
on 32 bit boundary. The ProviewR channels will automatically be aligned in
this way and there is no need for padding.
The example 2 over is an example of a node hierarchy that matches the
xap.h file below. Note that no padding variables are inserted in the
node hierarchy in example 2. Note also that input is output and output
is input in CN slave node.

See also