LLExec CANopen Master: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 227: Line 227:
     The value read must be equal to the one specified. If value is different, slave configuration is aborted.
     The value read must be equal to the one specified. If value is different, slave configuration is aborted.
     Default value: 0. The value read from EDS file for Custom slave is indicated between brackets. If 0 ''Serial'' is not checked.
     Default value: 0. The value read from EDS file for Custom slave is indicated between brackets. If 0 ''Serial'' is not checked.
This CANopen configurator feature allow the user to automatically generate PDOs configuration.


   '''PDO Mapping'''
   '''PDO Mapping'''
Line 242: Line 244:
     If ''PDO Auto Mapping'' is unchecked:
     If ''PDO Auto Mapping'' is unchecked:
       - Configurator do not modify current parametrization generated at the time.
       - Configurator do not modify current parametrization generated at the time.
    If you need to modifiy SDOs sequence in Parametrization tab, or add some other parametrization object into this sequence for any reason remember to uncheck ''PDO Auto Mapping''


  If you need to modifiy SDOs sequence in Parametrization, add some other param object into this sequence for any reason remember to uncheck ''PDO Auto Mapping''.


[[Category:LLExec]]
[[Category:LLExec]]

Revision as of 14:57, 22 October 2020

Overview

LLExec CANopen master integrated configuration tool allow you to configure a network of slaves compliant to the DS301 CANopen standard.

Supported features

  • Import EDS
  • Automatic PDO mapping configuration generation
  • Two distinct networks supported
  • Slave parametrization definition
  • Mandatory slaves management (stop entire network in case of loss)
  • Not mandatory slave can be re-attached after its loss
  • Node guarding protocol supported
  • Heartbeat protocol supported in both directions: master to slaves, slave to master
  • Sync PDO data exchange
  • Cyclic PDO data exchange
  • Event PDO data exchange
  • Sync network based on sync
  • SDO scheduling
  • Diagnostic structures for master and slave
  • PLC function calls to send SDO requests

Master configuration

General settings configuration

  • Click on CANopen node on the tree view to see "CANopen Configuration" main page
 Mode
 
 Not used
   Select this option to disable the CANopen master
 
 Master
   Enable CANopen master. Configuration to be applyed will be downloaded together with PLC download
  • Click on Master option to see other configuration boxes
 Baudrate
 
 Static Baudrate
   Select CANopen network baudrate from the available baudrate list (1 Mb/s, 500Kb/s, 250 Kb/s, 125Kb/s, 50Kb/s)
 
 Parametric Baudrate (*)
   Baudrate is specified at runtime.
   Define in your project an UDINT PLC variable and bind in Baudrate Var (UDINT) box.
   The value (bits/s) in of the variable at PLC startup will be used for network baudrate
 
 (*) This option is not always available
 Master Settings
 
 Static Node ID
   Univoque network node id is assigned to Master in static way.
   Default value: 127. Allowed values: 1 to 127.
 
 Parametric Node ID(*)
   Master node id is specified at runtime.
   Define in your project an USINT PLC variable and bind in Node ID Var (USINT) box.
   The value in the variable at PLC startup (1 to 127) will be used as master node id.
 
 Heartbeat time (ms)
   The master producer heartbeat time in ms.
   If zero no heartbeat is sent by master.
 
 Sync COBID
   The COBID value if sync mode is configured for master.
   Default value is 128 (0x80)
 
 Sync Cycle (ms)
   The period between to sync.
   Must be equals to or multiple ot task I/O period.
   Default value is 0. Sync is not sent by master.
 
 (*) This option is not always available

Add slaves to master

First of all select Master option in Mode fieldset. Then it is possible to add slaves to the master network. This can be done in two ways:

 A) Right click
 - Right click on the resources tree on CANopen node
 - Click on Add option
 - Catalog box with all available slaves will be shown
   This includes Generic CANopen device and other CAN custom slave device (see Import EDS section)
 - Click on the slave you want to add, then click on Select button
 - A child node of the CANopen node will appear on the resources tree
 B) Drag & drop
 - Be sure Catalog box is shown (View -> Tool windows -> Catalog)
   This includes Generic CANopen device and other CAN custom slave device (see Import EDS section)
 - Drag an item from Catalog over CANopen tree node
 - A child node of the CANopen node will appear on the resources tree

Slaves

Generic slave

  • Generic slave node Generic CANopen device has no object dictionary.
  • Objects to exchange are completely defined by user in parametrization and PDO data exchange configuration.
  • Any available data exchange and configuration property can be selected by user.
  • To perform slave configuration user must know slave object dictionary, data exchange and configuration limitations.

Custom slave

  • Custom slave node contains all the object dictionary definitions and data exchange informations.
  • Objects to exchange are already defined and can be selected for parametrization and PDO data exchange configuration.
  • Only available data exchange and configuration property can be selected by user.
  • It can be created by user in two ways:

Import EDS

EDS file is a standard descriptor of the slave usually released by CANopen slave vendor See Import EDS section for details

CAN custom editor

User can define by his own slave object dictionary See CAN custom editor section for details

Slave configuration

Slave configuration depends on the main type of the slave (generic or custom)

General basic configuration is quite the same on both types and it is here described.

General slave configuration

Click on CANopen child node on the tree view to see "xxx Configuration" main page

 Network settings
 
 Static Node Number
   Univoque network node id is assigned to current slave in static way.
   Default value: 1. Allowed values: 1 to 127. This number must be unique in the network.
 
 Parametric Node Number(*)
   Node number is specified at runtime.
   Define in your project an USINT PLC variable and bind in Node Number Var (USINT) box.
   The value in the variable at PLC startup (1 to 127) will be used as current slave node id.
 
 Node Guard Period (ms)
   Enter a value > 0 to use node guarding as network control protocol (this requires Life time Factor > 0 too).
   Using this kind of configuration master sends a 0x700+$NODEID RTR message every Node Guard Period (ms) to slave node to get slave status.
   Default value: 200. If 0 value is specified node guarding is not configured for this node.
 
 Life time Factor
   Enter a value > 0 to use node guarding as network control protocol (this requires Node Guard Period (ms) > 0 too).
   If master has no node guarding answer from slave node for Life time Factor consecutive times, master set node to missing status.
   Default value: 3. If 0 value is specified node guarding is not configured for this node.
 
 Boot time elapsed (ms)
   At startup parametrization phase master sends NMT reset command to slave node.
   Slave node can take some time to reboot and be able to reply master requests.
   This is the time to wait for slave bootup. If slave is not booted up after this amount of time is considered missing.
   Default value: 10000.
 
 Wait boot-up message
   Bootup message should be sent by slave after each reboot by CANopen standard.
   If flag is checked, master notice that slave is online on the network when receive its bootup message.
   Some old/not CANopen standard compliant slaves do not send bootup message.
   In this case master polls the device id (0x1000.0) object until receive an answer from the slave (or specified boot time is elapsed and node is considered missing).
   Default value: checked.
 
 Node heartbeat producer time (ms)
   Heartbeat can be used as network control protocol.
   To use heartbeat instead of node guarding set Node Guard Period (ms) = 0 and Life time Factor = 0.
   This setting is mandatory to enable heartbeat network control protocol.
   Enter a ms value t > 0 into this field. The slave will send an heartbeat message with its status to the master every t ms.
   Default value: 0. No heartbeat control protocol configured.
   N.B.: the other mandatory configuration to use heartbeat network control protocol is to configure Master heartbeat consumer time (ms) with a value greater than t.
 
 Node heartbeat consumer time (ms)
   This setting can be used by slave to detect master loss.
   To use heartbeat instead of node guarding set Node Guard Period (ms) = 0 and Life time Factor = 0.
   It is not mandatory for master configuration, can be left set to 0.
   To enable this feature put a value that is greater than master Heartbeat time (ms).
   Default value: 0. No heartbeat control protocol configured.
   N.B.: master Heartbeat time (ms) must be set greater than 0.
 
 Master heartbeat consumer time (ms)
   Heartbeat can be used as network control protocol.
   To use heartbeat instead of node guarding set Node Guard Period (ms) = 0 and Life time Factor = 0.
   Node heartbeat producer time (ms) must be set with a value greater than 0.
   This setting is mandatory to enable heartbeat network control protocol.
   Enter a ms value t > 0 into this field. Master is expecting to receive an heartbeat message from current slave with its status every t ms.
   Default value: 0. No heartbeat control protocol configured.
   N.B.: this value must be set greater than Node heartbeat producer time (ms).
 
 Mandatory
   This flag is used to configure the master behavior in case of slave missing or slave loss.
   a) Not mandatory slave, slave not available on the network at startup.
      Master configures other available nodes and enter operational.
   b) Not mandatory slave, slave available on the network at startup. Slave is lost after some time.
      Master detect slave loss. Master continues in operational states with other active nodes.
   c) Mandatory slave, slave not available on the network at startup.
      Master detect that mandatory slave is not available. Network configuration aborted. Master does not enter operational.
   b) Mandatory slave, slave available on the network at startup. Slave is lost after some time.
      Master detect that mandatory slave is no more available. Entire network is stopped.
   Defaul value: unchecked, not mandatory slave.
 
 Identity Object Check(**)
   It is possible to read from slave standard identity objects.
   Master can ask to slave these informations and check the values returned are the expected ones.
   If checked Device Info box is shown. Otherwise is hiddened.
   Defaul value: unchecked, no Device Info information are retrieved.
  
 (*) This option is not always available
 (**) Generic slave configuration only

Device info box is always available for Custom slaves. For Generic slave check Identity Object Check in Network box.

 Device Info
 
 Device Type
   This value is related to standard CANopen object 0x1000.0
   If any value is specified in this field, 0x1000.0 object is read at node startup configuration.
   The value read must be equal to the one specified. If value is different, slave configuration is aborted.
   Default value: 0 for Generic slave/the value read from EDS file for Custom slave. If 0 Device Type is not checked.
 
 Vendor ID
   This value is related to standard CANopen object 0x1018.1
   If any value is specified in this field, 0x1018.1 object is read at node startup configuration.
   The value read must be equal to the one specified. If value is different, slave configuration is aborted.
   Default value: 0 for Generic slave/the value read from EDS file for Custom slave. If 0 Vendor ID is not checked.
 
 Product Code
   This value is related to standard CANopen object 0x1018.2
   If any value is specified in this field, 0x1018.2 object is read at node startup configuration.
   The value read must be equal to the one specified. If value is different, slave configuration is aborted.
   Default value: 0 for Generic slave/the value read from EDS file for Custom slave. If 0 Product Code is not checked.
 
 Revision
   This value is related to standard CANopen object 0x1018.3
   If any value is specified in this field, 0x1018.3 object is read at node startup configuration.
   The value read must be equal to the one specified. If value is different, slave configuration is aborted.
   Default value: 0. The value read from EDS file for Custom slave is indicated between brackets. If 0 Revision is not checked.
 
 Serial
   This value is related to standard CANopen object 0x1018.4
   If any value is specified in this field, 0x1018.4 object is read at node startup configuration.
   The value read must be equal to the one specified. If value is different, slave configuration is aborted.
   Default value: 0. The value read from EDS file for Custom slave is indicated between brackets. If 0 Serial is not checked.

This CANopen configurator feature allow the user to automatically generate PDOs configuration.

 PDO Mapping
 
 PDO Auto Mapping
   If is possible to enable PDO Auto Mapping configuration only if slave node support Variable PDO mapping.
   Variable PDO mapping is the CANopen feature in which master sends configuration SDO to configure PDOs objects to be exchanged.
   In Generic slave this field is always checkable. User must know if slave actually support Variable PDO mapping.
   In Custom slave this field is available only if Variable PDO mapping is actually supported by slave.
   If PDO Auto Mapping is checked:
     - Configurator automatically generates parametrization SDO to configure PDOs data exchange.
     - Configuration is generated to configure what is entered into PDO Tx - Input and PDO Rx - Output grids.
     - Only objects involved in PDOs data exchange configuration are automatically changed.
     - Other parametrization objects are not affected.
   If PDO Auto Mapping is unchecked:
     - Configurator do not modify current parametrization generated at the time.
 If you need to modifiy SDOs sequence in Parametrization, add some other param object into this sequence for any reason remember to uncheck PDO Auto Mapping.