Class Epl_CNServer
Redaktör je
Version 1.0
Modified 08-JUL-2013 10:32:46.08
 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



RtBody attributes pwr_sClass_Epl_CNServer
String80 Description   Optional description.
String80 Device   Ethernet device.
String80 IpAddress  
String80 IpNetmask  
UInt16 NodeId   Node id for the controlled node.
IoProcessMask Process   Process that handles the module. Should be set to Powerlink.
Objid ThreadObject   Not used for powerlink process.
StallActionEnum StallAction   Action when stall is detected.
UInt32 Priority   Priority of Powerlink process.
UInt16 StartupTimeout  
UInt16 Timeout  
EplNmtState NmtState  
Status Status  
UInt16 ErrorCount  
UInt16 ErrorSoftLimit  
UInt16 ErrorHardLimit  
UInt32 InputAreaSize  
UInt32 OutputAreaSize  


Template Object
Device eth0
Process 128
Priority 20
StartupTimeout 30
Timeout 2
ErrorSoftLimit 25
ErrorHardLimit 50


Attributes detail


Description Attribute
Klass Attribute
Typ String80
Flags
Kropp RtBody
Optional description.

Device Attribute
Klass Attribute
Typ String80
Flags
Kropp RtBody
Ethernet device.

IpAddress Attribute
Klass Attribute
Typ String80
Flags
Kropp RtBody

IpNetmask Attribute
Klass Attribute
Typ String80
Flags
Kropp RtBody

NodeId Attribute
Klass Attribute
Typ UInt16
Flags
Kropp RtBody
Node id for the controlled node.

Process Attribute
Klass Attribute
Typ IoProcessMask
Flags
Kropp RtBody
Process that handles the module. Should be set to Powerlink.

ThreadObject Attribute
Klass Attribute
Typ Objid
Flags
Kropp RtBody
Not used for powerlink process.

StallAction Attribute
Klass Attribute
Typ StallActionEnum
Flags
Kropp RtBody
Action when stall is detected.

Priority Attribute
Klass Attribute
Typ UInt32
Flags
Kropp RtBody
Priority of Powerlink process.

StartupTimeout Attribute
Klass Attribute
Typ UInt16
Flags
Kropp RtBody

Timeout Attribute
Klass Attribute
Typ UInt16
Flags
Kropp RtBody

NmtState Attribute
Klass Attribute
Typ EplNmtState
Flags State|Noedit
Kropp RtBody

Status Attribute
Klass Attribute
Typ Status
Flags State|Noedit
Kropp RtBody

ErrorCount Attribute
Klass Attribute
Typ UInt16
Flags State|Noedit
Kropp RtBody

ErrorSoftLimit Attribute
Klass Attribute
Typ UInt16
Flags
Kropp RtBody

ErrorHardLimit Attribute
Klass Attribute
Typ UInt16
Flags
Kropp RtBody

InputAreaSize Attribute
Klass Attribute
Typ UInt32
Flags State|Noedit
Kropp RtBody

OutputAreaSize Attribute
Klass Attribute
Typ UInt32
Flags State|Noedit
Kropp RtBody