CANopen application Note [v1.0]

These SDOs are Communication Objects to transfer data without real-time ... Two types of PDO transmission modes are distinguished: synchronous and ...
120KB taille 39 téléchargements 448 vues
CN Series / Application Note / CANopen

CN Series of CAN based Products CANopen : CAL-based Communication Profile

INTRODUCTION

The intention of this document is to give a global view of the CANopen profile as provided by the CN Series of CAN Bus based modules.

CN Series of CAN based Products. CANopen : CAL-based Communication Profile

Application Note Update History: Rev. 1.0: 11/96 Initial Version 1.1: 12/97 Updated Version 2.0: 11/99 Revised Version

CONTENTS 1

CANOPEN BASICS ....................................................................................................... 3 1.1 The Object Dictionary .............................................................................................. 3 1.2 Accessing the Object Dictionary .............................................................................. 4 1.3 Process Data Objects .............................................................................................. 4 1.4 Identifying a CANopen Slave ................................................................................... 5 1.5 Network Initialisation ................................................................................................ 5 1.6 Node Guarding ........................................................................................................ 5

2

CONFIGURING CANOPEN SLAVE MODULES ............................................................ 6

References ........................................................................................................................... 7 Appendix I: The Communication Profile Object Dictionary .................................................... 9 20CN11 MODULE DATA SHEET ........................................................................................11 20CN12 MODULE DATA SHEET ........................................................................................13 20CN13 MODULE DATA SHEET ........................................................................................16 20CN32 MODULE DATA SHEET ........................................................................................20 20CN55 MODULE DATA SHEET ........................................................................................22

CANopen Application Note

2

1

CANopen BASICS

CANopen is a profile family based on the CAN data link layer and the CAN Application Layer (CAL). It is primarily used in industrial automation applications where devices such as distributed I/O-nodes, drives etc. communicate over a CAN based field bus network. The CAN Application Layer is described in the CiA Draft Standard 201..207 [1]. The CANopen communication profile is described in the CiA Draft Standard 301 [2]. The CANopen communication profile describes the communication model and the protocols which are common to all devices in the CANopen network. The used protocols are a subset of the CAN Application Layer. This document gives a global view of the CANopen functionality. In this document many references are made to the CAN Application Layer documentation DS201-207 [1] and the CANopen (CAL-based) communication profile documentation DS301 [2].

┌──────────┐ ┌──────────┐ ┌──────────┐ │ Device │ │ Device │ │ Device │ │ Profile │ │ Profile │ │ Profile │ │ for I/O │ │ Drives │ │ ........ │ │ DS401 │ │ DS402 │ │ DS40x │ └─────┬────┘ └─────┬────┘ └─────┬────┘ ┌─────┴────────────┴────────────┴────┐ │ DS301 Communication Profile │ │ Subset of CAN Application Layer │ │ NMT / DBT / LMT / CMS │ └──────────────────┬─────────────────┘ ┌──────────────────┴─────────────────┐ │ Data Link Layer │ └──────────────────┬─────────────────┘ ┌──────────────────┴─────────────────┐ │ Physical Layer │ └──────────────────┬─────────────────┘ │ ───────────────┴───────────── CAN bus Figure 1: The Communication Reference Model

The advantage of the CANopen approach are numerous, but most importantly it allows a system integrator to de-couple himself from a specific device manufacturer. A unit of transportation in a CAN network is called Communication Object (COB). The CANopen communication profile defines several methods for transmitting and reception of messages over the CAN bus. Basically there are two kinds of Communication Objects defined in the CANopen communication profile (DS301 [2], §5): Service Data Objects (SDOs) for configuring devices and Process Data Objects (PDOs) for real-time process data (e.g. to set outputs).

1.1

The Object Dictionary

The object dictionary is a grouping of objects accessible via the network (DS301 [2], §4.3). Each object within the dictionary is addressed using a 16 bit index and a 8 bit sub-index. CANopen distinguishes two different kinds of profiles: the communication profile (DS301 [2]) and the device profile(s) (DS40x [3] and [5]). The communication profile defines the entries of the object dictionary for the communication model and protocols, which are common to all network nodes. The device profile(s) defines the entries of the object dictionary for standard manufacturer independent devices, which are only common to the network nodes with similar I/O functionality. In Appendix I the communication profile objects available on the CN modules are listed. The enclosed data sheets list the device profile objects available on the corresponding CN modules.

CANopen Application Note

3

An example of a number of entries of a object dictionary is shown below: Index 1000h 1008h 6020h 0h 1h ... 12h 6220h 0h 1h

1.2

Name device type manufacturer device name read state single input number of entries status of input 1 status of input n status of input 12 write state single output number of entries write state output 1

Type Unsigned32 Vis-String

Attribute const ro

Unsigned8 Boolean Boolean Boolean

ro ro ro ro

Unsigned8 Boolean

ro rw

Accessing the Object Dictionary

CANopen devices can be configured via the network using the Service Data Objects (SDOs) (DS301 [2], §5.1). Using these SDOs the object dictionary can be accessed for example to read the device type or the manufacturer device name. These SDOs are Communication Objects to transfer data without real-time capabilities and with a low arbitration priority. SDOs are confirmed Communication Objects. A SDO uses the CAL “Multiplexed Domain” protocol according to the CAL standard (DS202-2 [1], §6). SDOs have the following contents: Arbitration field: Message Identifier COB-ID

Control field: Data Length 8 bytes in data field (fixed)

Data field: 0 Command Specifier

1 .. 2 Index (2 bytes)

3 Sub-Index (1 byte)

4 Data (4 bytes)

..

7

The message identifier is one of the identifiers reserved for SDO Communication Objects (i.e. COBIDs 1409-1535 for transmit SDOs and COB-IDs 1537-1663 for receive SDOs; DS301 [2], §8.4). This identifier is node dependent and related to the node identifier. The message identifier is also referenced to as COB-ID. The data length is the number of bytes in the data field. The data field of a SDO Communication Object is fixed and contains 8 bytes. The data field of a SDO is composed of the following elements: - The command specifier. This element determines the kind of action (read/write) and is specified by the used protocol as described in the CAL standard (DS202-2 [1], §6). - The index and sub-index. These elements point to an entry in the object dictionary which is written or read. - The data bytes. This element contains the new data for the entry (write action) or is not used (read action).

1.3

Process Data Objects

By means of a Process Data Object (PDO) real-time data transmission is performed (DS301 [2], §5.2). For example an output can be set by using a PDO. These Communication Objects typically have a higher priority on the CAN bus than Service Data Objects. PDOs are unconfirmed Communication Objects. A PDO uses the CAL “Stored Event” protocol according to the CAL standard (DS202-2 [1], §7). A PDO has all the eight data bytes in the data field available for object data, no object dictionary address information is enclosed. The contents of the data field of a PDO can be configured by manipulating entries of the communication profile object dictionary (DS301 [2], §10.1.3). This is called PDO mapping. On small I/O-nodes the mapping of the PDOs is done by the manufacturer and cannot be changed (i.e. fixed).

4

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

The example below shows the PDO mapping of an output node with e.g. 16 outputs: Arbitration field: Message Identifier COB-ID

Control field: Data Length 2 bytes in data field (variable)

Data field: 0 Outputs 0-7

1 Outputs 8 - 15

The message identifier is one of the identifiers reserved for PDO Communication Objects (i.e. COBIDs 384-1407; DS301 [2], §8.4). This identifier is node dependent and related to the node identifier. Note: The Micro-key CN modules support (a maximum of) 8 receive PDOs and 8 transmit PDOs, consequently 63 different node identifiers (node-IDs 1-63) can be distinguished when using PDOs.

Two types of PDO transmission modes are distinguished: synchronous and asynchronous (DS301 [2], §5.2.1 and §10.1.2). Asynchronous Process Data Objects can be transmitted at any time when the network node is in the “Operational” state (DS301 [2], §8.2). Synchronous process data transfers (transmission and reception) to a network node are locally buffered at the network node and are processed or send immediately after the reception of an synchronisation object. A synchronisation object is a predefined Communication Object with the reserved message identifier (COB-ID) 128 (DS301 [2], §6 and §7.1).

1.4

Identifying a CANopen Slave

In a CANopen network, a slave is identified by its node identifier. This node-ID can be configured by setting DIP switches on the device or by use of CAL Layer Management services (LMT). The node-ID can be read at index 100Bh of the (communication profile) object dictionary. The node-ID is used as a reference for the message identifier of the SDO and PDO messages. For example: a slave node with node-ID 1 uses by default a transmit SDO with message identifier 1409 and a transmit PDO with message identifier 385 to send e.g. the status of the digital inputs.

1.5

Network Initialisation

After power-on and finishing the initialisation, the CANopen slave node enters the “Pre-Operational“ state (DS301 [2], §8.2 and §8.3). During this state device parameterisation and COB-ID allocation via SDO is possible. The node must be switched to operational mode by the network master to enable communications via PDO objects. The “Start Remote Node” service sets all nodes to the operational state (DS203-2 [1], §4.3). Note: The Micro-key CN modules are implemented according to the “Minimum Device Capability” described in §8.3 of DS301 [2].

1.6

Node Guarding

To determine whether nodes are still functional CANopen uses the CAL Node Guarding Protocol (DS203-2 [1], §5.1; DS301 [2], §9.1). Individual nodes are polled using remote-transmit-requests to inquire whether they are still functional. The state of the device is returned in reply to the remote-transmit-request. The node guarding is optional. It starts for the slave when the first remote-transmit-request for its guarding identifier (COBIDs 1793-1919; DS301 [2], §8.4) is received. The slave uses the guard time and life time factor from its (communication profile) object dictionary. If guard time and life time factor are zero, the NMT Slave does not guard the NMT Master.

CANopen Application Note

5

2

CONFIGURING CANopen SLAVE MODULES

In a CANopen network each module or slave is initially identified by its configured module identifier (moduIe-ID or node-ID). The module-ID can be set by e.g. DIP switches on the device or by use of the CAL Layer Management services (LMT) (DS205-2 [1], §5.1). The CN Series of CANopen modules can be configured via LMT services. The configuration can be done in a network or in a standalone situation. To gain access to the LMT configuration parameters the operation mode of the module must be changed from “Operation Mode” to “Configuration Mode” (see figure below). The LMT switch mode services must be used to change the LMT mode (DS205-2 [1], §4). The “Configuration Mode” is entered through a “Switch Mode Global” or “Switch Mode Selective” service (DS205-2 [1], §4.1). In a standalone situation, the “Switch Mode Global” can be used.

Configuration Mode

Switch Mode Global with parameter operation_mode

Switch Mode Global with parameter configuration_mode

Switch Mode Selective with matching LMTaddress parameters

Operation Mode

Figure 2: LMT Modes and Switching Procedure Using the LMT configuration services the module-ID, the module name, the module bit timing parameters can be altered and thereafter stored in non-volatile memory (DS205-2 [1], §5.1). The LMT inquire services can be used to inquire the LMT-address (i.e. the manufacturer name, product name and serial-number) (DS205-2 [1], §6.1). For example to alter the module-ID the LMT master has to request the following services in the following order: 1. “Switch Mode Selective” to enter the “Configuration Mode”, i.e.: Send COB to LMT slave with: COB-ID=2021, cs=1 and manufacturer_name Send COB to LMT slave with: COB-ID=2021, cs=2 and product_name Send COB to LMT slave with: COB-ID=2021, cs=3 and serial_number 2.

“Configure Module ID” to alter the module-ID, i.e.: Send COB to LMT slave with: COB-ID=2021, cs=17 and new module_id

3.

“Store Configuration” to store the new module-ID, i.e.: Send COB to LMT slave with: COB-ID=2021, cs=23

4.

“Switch Mode Global” to return to the “Operation Mode”, i.e.: Send COB to LMT slave with: COB-ID=2021, cs=4, mode=operation_mode

The following LMT services are supported by the CN Series of CANopen modules:

6

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

LMT service Switch Mode Global

Command Specifier 4

DS205-2 [1] Section §4.1

1,2,3

§4.2

17

§5.1

18

§5.1

19 21 23

§5.3 §5.4 §5.5

36 37 38

§6.1 §6.1 §6.1

Switch from Configuration to Operation Mode and vice versa

Switch Mode Selective Switch from Operation Mode to Configuration Mode

Configure Module ID Set the new Module-ID

Configure Module Name Set the new Module Name

Configure Bit Timing Parameters Activate Bit Timing Parameters Store Configuration The new parameters are stored into non-volatile memory

Inquire Manufacturer Name Inquire Product Name Inquire Serial-Number

Set-up and configuration of CANopen devices through the object dictionary (by means of SDOs) and/or the LMT services can easily be done by using standard CANopen configuration tools such as the CANsetter product from Vector Informatik GmbH, also available at Micro-key. CANsetter is an interactive tool providing access to all device parameters, full control of the device state, visualisation of the object dictionary, etc.. CANsetter uses the standardised file format EDS (Electronic Data Sheet). In a EDS file the object dictionary of a specific CANopen device is described. For all the Micro-key CN modules EDS files are available.

CANopen Application Note

7

References [1] CAN Application Layer, Draft Standard 201..207 CiA, Version 1.1, February 1996 [2] CAL-based Communication Profile, Draft Standard 301 CiA, Version 3.0, October 1996 [3] Device Profile for I/O Modules, Draft Standard Proposal 401 CiA, Version 1.4, December 1996 [4] Device Profile for I/O Modules, Work Draft 401 CiA, Version 1.975, May 1999 [5] Device Profile for Drives and Motion Control, Draft Standard Proposal 402 CiA, Version 1.1, October 1998 [6] 80C51-Based 8-Bit Microcontrollers, Data Handbook IC20, Philips Semiconductors, March 1995, Document no. 9397 750 00013 [7] 20CN32 with CANopen, Software User’s Manual Microkey, Revision 1.0, November 1999 [8] 20CN55 with CANopen, Software User’s Manual Microkey, Revision 1.0, November 1999

The CiA documents [1], [2], [3], [4] and [5] are available at: CiA CAN in Automation e.V. International Headquarters Am Weichselgarten 26 D-91058 Erlangen Phone: +49 9131 69086 0 Fax: +49 9131 69086 79

8

http://www.can-cia.de mailto:[email protected]

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

Appendix I: The Communication Profile Object Dictionary The objects below are available on all CN CANopen modules.

Index 1000h 1001h 1002h 1003h 0h 1h 1004h 1005h 1006h 1007h 1008h 1009h 100Ah 100Bh 100Ch 100Dh

Name device type error register manufact status register predefined error field error counter standard error field number of PDO's supported COB-ID SYNC message communication cycle periode synchronous window length manufacturer device name manufacturer hardware version manufacturer software version node-ID guard time life time factor

Type Unsigned32 Unsigned8 Unsigned32 Unsigned32 Unsigned8 Unsigned32 Unsigned32 Unsigned32 Unsigned32 Unsigned32 Vis-String Vis-String Vis-String Unsigned32 Unsigned16 Unsigned8

1400h 0h 1h 2h 3h 4h 1402h 1600h 0h 1h ... 8h 1602 1800h 0h 1h 2h 3h 4h 1802h 1A00h 0h 1h ... 8h 1A02h

1st receive PDO communication parameter number of entries COB-ID used by PDO transmission type inhibit time CMS priority group 2nd receive PDO communication parameter 1st receive PDO mapping parameter number of mapped objects in PDO 1st object to be mapped nth object to be mapped 8th object to be mapped 2nd receive PDO mapping parameter 1st transmit PDO communication parameter number of entries COB-ID used by PDO transmission type inhibit time CMS priority group 2nd transmit PDO communication parameter 1st transmit PDO mapping parameter number of mapped objects in PDO 1st object to be mapped nth object to be mapped 8th object to be mapped 2nd transmit PDO mapping parameter

PDOCommPar Unsigned8 Unsigned32 Unsigned8 Unsigned16 Unsigned8 PDOCommPar PDOMapping Unsigned32 Unsigned32 Unsigned32 Unsigned32 PDOMapping PDOCommPar Unsigned8 Unsigned32 Unsigned8 Unsigned16 Unsigned8 PDOCommPar PDOMapping Unsigned32 Unsigned32 Unsigned32 Unsigned32 PDOMapping

CANopen Application Note

Attribute const ro ro ro ro ro rw rw rw const const const ro rw rw

ro rw rw rw rw

ro ro ro ro

ro rw rw rw rw

ro ro ro ro

9

This page is intentionally left blank.

10

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

20CN11 MODULE DATA SHEET ─────────────────────────────────────────────────────────────────────────── Common CANopen features: CANopen Master: N CANopen Slave: Y Extended Boot-up: N Minimum Boot-up: Y COB-ID Distribution: SDO, Default Node-ID Distribution: LMT No. of PDOs: Depends on module PDO Modes: Sync, Async Variable PDO Mapping: Depends on module Emergency Message: Y Watchdog Message: Y Life guarding: Y No. of SDOs: 1 Device profile: DSP-401

Specific CANopen data: Firmware in module:

CN11CO Vx.x

Manufacturer Name: Product Name: Serial Number: Module Name: Module ID:

MIC_KEY CN11 269.xxx CN11 0 (default)

Device specific entries of the object dictionary: Index 6100h

Name read state twelve input values

Type Unsigned16

Attribute ro

Unsigned8 Boolean Boolean Boolean

ro ro ro ro

Unsigned8 Boolean

ro rw

(input 1 is mapped on the LSBit)

6020h 0h 1h ... Ch 6220h 0h 1h

read state single input number of entries status of input 1 status of input n status of input 12 write state single output number of entries write state relay output

(Note: type Boolean, true is input or output active)

CANopen Application Note

11

PDO Mapping PDO Mapping of 20CN11 is fixed. Only the first two data-bytes of the CAN message are used (x = don't care) and displayed below. Transmit PDO: in8

in7

in6

in5

in4

in3

in2

in1

x

x

x

x

in12

in11

in10

in9

Remarks: -

Module ID Module ID is programmable through LMT/CANopen. Hex Switch on module's front panel is only applicable to CNLIB/CNRIO firmware and not applicable to CN11CO CANopen.

-

Software Reset (Watchdog) If a software reset occurs due to an external or internal disturbance the module notifies the master by sending an emergency message with the corresponding error code (6110h, DS301 [2], §7.3).

-

Hardware Reset (Emergency/Reset Input) The action following the external reset input depends on the jumper setting for Emergency/Reset Input signal (See hardware manual). If this jumper is configured to give an interrupt to the processor, the module disables all outputs, sends an emergency message with the corresponding error code (5000h, DS301 [2], §7.3) and ignores any further action until the Reset Input is released.

-

Boot Message During initialisation of the module a boot emergency message is transmitted with an empty data field.

-

Default CAN bus bit-rate The default CAN bus bit-rate is: 125kBit/s.

12

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

20CN12 MODULE DATA SHEET ─────────────────────────────────────────────────────────────────────────── Common CANopen features: CANopen Master: N CANopen Slave: Y Extended Boot-up: N Minimum Boot-up: Y COB-ID Distribution: SDO, Default Node-ID Distribution: LMT No. of PDOs: Depends on module PDO Modes: Sync, Async Variable PDO Mapping: Depends on module Emergency Message: Y Watchdog Message: Y Life guarding: Y No. of SDOs: 1 Device profile: DSP-401

Specific CANopen data: Firmware in module:

CN12CO Vx.x

Manufacturer Name: Product Name: Serial Number: Module Name: Module ID:

MIC_KEY 20CN12 271.xxx 20CN12 0 (default)

Device specific entries of the object dictionary: Index 6300h

Name write state twelve output values

Type Unsigned16

Attribute rw

Unsigned8 Boolean Boolean Boolean Boolean

ro rw rw rw rw

Unsigned8 Unsigned8 PORTPar PORTPar PWMpar PWMpar

ro rw rw rw rw rw

(output 1 is mapped on the LSBit)

6220h 0h 1h ... Ch Dh 2000h 0h 1h 2h 3h 2001h 2002h

write state single output number of entries write state output 1 write state output n write state output 12 write state relay output PWM port control number of entries PWM frequency Mode of port A Mode of port B PWM port A: duty-cycle and direction PWM port B: duty-cycle and direction

(Note: type Boolean, true is input or output active)

CANopen Application Note

13

Type descriptions: Type description of PWMpar: Byte 0 Byte 1 Name: PWM duty-cycle Direction Type: Unsigned8 Boolean (true is output active) Type description of PORTpar: Byte 0 Name: PORT configuration Type: Unsigned8

‘PWM frequency’: Range: 0..255 Value: 0 corresponds with approx. 31kHz 255 corresponds with approx. 123Hz ‘PWM duty-cycle’: Range: 0..255 Value: 0 corresponds with 0% (i.e. constant low) 255 corresponds with 100% (i.e. constant high) ‘Port configuration’: Range: 0..2 Value: 0 Out1 and Out2 are normal outputs 1 Out1 is a PWM output, Out2 is a normal output 2 Out1 is a PWM output, Out2 controls the direction

The data-format of the ‘PWM frequency’ and ‘PWM duty-cycle’ entry of the object dictionary are identical to the format of respectively the PWMP and PWM0or1 register of the 80C592 micro-controller on-board the 20CN592 Micro Module in the 20CN12. Refer to the “Pulse Width Modulated Outputs” section at page 785 of the 80C51 data book [6].

14

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

PDO Mapping: PDO Mapping of 20CN12 is fixed. Only the first two data-bytes of the CAN message is used (x = don't care) and displayed below. Receive PDO: out8

out7

out6

out5

out4

out3

out2

out1

x

x

x

x

out12

out11

out10

out9

Remarks: -

Module ID Module ID is programmable through LMT/CANopen Hex Switch on module's front panel is only applicable to CNLIB/CNRIO firmware and not applicable to CN12CO CANopen

-

Software Reset (Watchdog) If a software reset occurs due to an external or internal disturbance the module notifies the master by sending an emergency message with the corresponding error code (6110h; DS301 [2], §7.3)

-

Hardware Reset (Emergency/Reset Input) The action following the external reset input depends on the jumper setting for Emergency/Reset Input signal (See hardware manual). If this jumper is configured to give an interrupt to the processor, the module disables all outputs, sends an emergency message with the corresponding error code (5000h; DS301 [2], §7.3) and ignores any further action until the Reset Input is released.

-

Boot Message During initialisation of the module a boot emergency message is transmitted with an empty data field.

-

Default CAN bus bit-rate The default CAN bus bit-rate is: 125kBit/s

CANopen Application Note

15

This page is intentionally left blank.

16

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

20CN13 MODULE DATA SHEET ─────────────────────────────────────────────────────────────────────────── Common CANopen features: CANopen Master: CANopen Slave: Extended Boot-up: Minimum Boot-up: COB-ID Distribution: Node-ID Distribution: No. of PDOs: PDO Modes: Variable PDO Mapping: Emergency Message: Watchdog Message: Life guarding: No. of SDOs: Device profile:

N Y N Y SDO, Default LMT Depends on module Sync, Async Depends on module Y Y Y 1 DSP-401

Specific CANopen data: Firmware in module:

CN13CO Vx.x

Manufacturer Name: Product Name: Serial Number: Module Name: Module ID:

MIC_KEY 20CN13 273.xxx 20CN13 0 (default)

Device specific entries of the object dictionary: Index 6000h

Name read state six input values

Type Unsigned8

Attribute ro

Unsigned8 Boolean Boolean Boolean Unsigned8

ro ro ro ro rw

Unsigned8 Boolean Boolean Boolean Boolean

ro rw rw rw rw

Unsigned8 Unsigned8 PORTpar PORTpar PWMpar PWMpar

ro rw rw rw rw rw

(input 1 is mapped on the LSBit)

6020h 0h 1h ... 6h 6200h

read state single input number of entries status of input 1 status of input n status of input 6 write state six output values (output 1 is mapped on the LSBit)

6220h 0h 1h ... 6h 7h 2000h 0h 1h 2h 3h 2001h 2002h

write state single output number of entries write state output 1 write state output n write state output 6 write state relay output PWM port control number of entries PWM frequency Mode of port A Mode of port B PWM port A: duty-cycle and direction PWM port B: duty-cycle and direction

(Note: type Boolean, true is input or output active)

CANopen Application Note

17

Type descriptions: Type description of PWMpar: Byte 0 Byte 1 Name: PWM duty-cycle Direction Type: Unsigned8 Boolean (true is output active) Type description of PORTpar: Byte 0 Name: PORT configuration Type: Unsigned8

‘PWM frequency’: Range: 0..255 Value: 0 corresponds with approx. 31kHz 255 corresponds with approx. 123Hz ‘PWM duty-cycle’: Range: 0..255 Value: 0 corresponds with 0% (i.e. constant low) 255 corresponds with 100% (i.e. constant high) ‘Port configuration’: Range: 0..2 Value: 0 Out1 and Out2 are normal outputs 1 Out1 is a PWM output, Out2 is a normal output 2 Out1 is a PWM output, Out2 controls the direction

The data-format of the ‘PWM frequency’ and ‘PWM duty-cycle’ entry of the object dictionary are identical to the format of respectively the PWMP and PWM0or1 register of the 80C592 micro-controller on-board the 20CN592 Micro Module in the 20CN13. Refer to the “Pulse Width Modulated Outputs” section at page 785 of the 80C51 data book [6].

18

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

PDO Mapping PDO Mapping of 20CN13 is fixed. Only the first data-byte of the CAN message is used (x = don't care) and displayed below. Receive PDO: x

x

out6

out5

out4

out3

out2

out1

in5

in4

in3

in2

in1

Transmit PDO: x

x

in6

Remarks: -

Module ID Module ID is programmable through LMT/CANopen Hex Switch on module's front panel is only applicable to CNLIB/CNRIO firmware and not applicable to CN12CO CANopen

-

Software Reset (Watchdog) If a software reset occurs due to an external or internal disturbance the module notifies the master by sending an emergency message with the corresponding error code (6110h, DS301 [2], §7.3)

-

Hardware Reset (Emergency/Reset Input) The action following the external reset input depends on the jumper setting for Emergency/Reset Input signal (See hardware manual). If this jumper is configured to give an interrupt to the processor, the module disables all outputs, sends an emergency message with the corresponding error code (5000h, DS301 [2], §7.3) and ignores any further action until the Reset Input is released.

-

Boot Message During initialisation of the module a boot emergency message is transmitted with an empty data field.

-

Default CAN bus bit-rate The default CAN bus bit-rate is: 125kBit/s

CANopen Application Note

19

This page is intentionally left blank.

20

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

20CN32 MODULE DATA SHEET ─────────────────────────────────────────────────────────────────────────── Refer to the 20CN32 software user’s manual [7] for detailed information.

CANopen Application Note

21

This page is intentionally left blank.

22

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825

20CN55 MODULE DATA SHEET ─────────────────────────────────────────────────────────────────────────── Refer to the 20CN55 software user’s manual [8] for detailed information.

CANopen Application Note

23

This page is intentionally left blank.

24

Micro-key bv., P.O.Box 92, 9800 AA Zuidhorn, The Netherlands, tel +31 594 503020, fax 31 594 505825