Page 1
CANopen Firmware for PCAN-MicroMod User Manual...
Page 2
CANopen Firmware for PCAN-MicroMod Products taken into account Product Name Model Item Number CANopen Firmware for PCAN-MicroMod Last update May 19, 2005 Initial release Windows® and MS-DOS are registered trademarks of Microsoft Corporation in the United States and other countries.
CANopen Firmware for PCAN-MicroMod Contents Outline and Introduction About the CANopen Implementation Scope of Delivery Hardware and Software Requirements Terminology and Abbreviations Product and Firmware Selection Device Summary Loading the Firmware into a MicroMod Processing Times and Performance Hardware Features...
CiA, the CAN in Automation User’s and Manufac- turer’s Group. One of the main reasons for the popularity of CANopen is its flexi- bility towards customization. CANopen provides a set of standar- dized communication functions of which only a little percentage is mandatory.
CANopen conformance using the official CANopen conformance tests. Scope of Delivery The CANopen firmware package is license free for all users of PCAN-MicroMod and can be downloaded from www.peak-system.com. The ZIP file available online contains the latest version of the firmware (Fujitsu hex file format), the EDS files, and the user manual in PDF format.
CANopen Firmware for PCAN-MicroMod Hardware and Software Requirements The CANopen firmware is loaded into a PCAN-MicroMod using the PCAN-MicroMod Evaluation Board. With the flash programming utility, the hex files provided can be programmed. In order to configure a MicroMod a generic CANopen Configuration Tool with access to the CAN bus is required.
Page 7
Change-Of-State (COS) Generic I/O modules typically monitor their inputs for changes. CANopen nodes can be configured to only transmit this input data, if a change was detected. Connection Object Identifier, COB-ID The COB-ID specifies the CAN message details used for a specific connection.
Page 8
The Inhibit Time is selected in multiples of 100s of microseconds and specifies how long a CANopen node must wait before it may transmit a TPDO again. Note that many CANopen implementations do not offer such a high resolution and the Inhibit Time might get rounded up to milliseconds.
Page 9
Message is 0 (zero) with 2 data bytes. Node ID In any CANopen network each CANopen node must have a unique Node ID in the range of 1 to 127. The Node ID can be changed using the [1F50h,03h] Object Dictionary entry.
Page 10
Inhibit Time are used. Transmit Process Data Object, TPDO Each CANopen node typically can transmit and receive PDOs. To better distinguish between the services, the terms RPDOs and TPDOs are used. Note that a TPDO of one node is a RPDO for all...
CANopen Firmware for PCAN-MicroMod 2 Product and Firmware Selection All CANopen firmware versions for PCAN-MicroMod use the same code basis and thus have very similar features. The main difference is that the number of I/O channels made available matches the hardware layout of the various motherboards.
• Crystal Frequency: 4 MHz • Hex File: one of the hex files implementing CANopen 9. Press the button “Full Operation”. The flash utility converts the hex file, transfers it to the MicroMod and programs it into the flash memory. The Flash 16 utility converts the hex file, transfers it to MicroMod and programs it into the Flash memory.
CANopen Firmware for PCAN-MicroMod Processing Times and Performance The CANopen firmware was optimized to provide the best possible performance. Nevertheless, it should be noted that in any CANopen based I/O system the flexible configuration potentially allows configuring a module in such a way that its performance can vary considerably.
Page 14
The PEAK Status Register [1002h,00h] in the Object Dictionary contains the current average execution time of a single background loop. In operational mode, this number typically varies from 300 to...
ERR LED is related to DO7. Boot Mode Selection with Solder Bridges PCAN-MicroMod features a total of 5 solder bridges. The CANopen implementations currently only use the solder bridge ‘4’ as a boot mode indicator. If solder bridge ‘4’ is closed, after reset, PcAN- MicroMod starts in a default boot mode using a CAN bit rate of 125 kbit and the CANopen node ID 40h/64d.
Double Flash Heartbeat lost Assignment of Bit Rate and Node ID The CAN bit rate and CANopen node ID used cannot be changed by hardware. They can be changed by writing specific values to an Object Dictionary entry. Using a CANopen configuration tool (such as PCANopen Magic), writes to the Object Dictionary entry [1F50h,03h] can change the bit rate and node ID.
Information is only sent during initialization and in case of errors. Information displayed on the terminal includes the CAN bit rate, the CANopen node ID and the number of input and output channels used. In case of a fatal error, an internal error number is displayed.
Page 18
CANopen Firmware for PCAN-MicroMod The following is a sample output: PEAK MicroMod CANopenIA V1.01 Rev.204 J0-J4: 0 Regular Operation as MicroMod: 125kbps, node ID 32 Number of I/O: DI 1, DO 1, AI 8, AO 4 Initialization completed!
CANopen Firmware for PCAN-MicroMod 4 CANopen Implementation The implementation features the major CANopen services as standardized in the CiA documents DS301 – “CANopen Application Layer and Communication Profile” (V4.02) and DS401 – “CANopen Device Profile for Generic I/O Modules” (V2.1).
4-byte ASCII string with the hardware version number [100Ah,00h] Manufacturer Software Version 4-byte ASCII string with the firmware revision number [1018h,01h] CANopen vendor ID 32-bit vendor ID of PEAK: 00000175h [1018h,02h] Product Code 32-bit product code, see table below [1018h,03h] Revision Number...
“PCO4” 00100004h Mix 2 000F0191h “PCO5” 00100005h Default Connection Set The CANopen implementations use the Default Connection Set. This means the following CAN Message Identifiers are used, unless the devices are re-configured. CAN Message ID Direction Default Usage 000h Receive...
CANopen Firmware for PCAN-MicroMod Default PDO Mapping The default PDO mapping used is that of the CANopen Device Profile DS401 for generic I/O. A maximum of four variables are mapped to each PDO. The following table illustrates the mapping used by the PCAN-MicroMod device zero (stand-alone module). The other device types only have those variables mapped that are implemented on these devices.
[6401h]. Using SDO requests sent to the device, all input data can be read at any time by a configuration tool or CANopen manager. Figure 3: Input data processed by the CANopen firmware Depending on the TPDO Mapping Parameters [1A0xh], the input data is included in one or multiple TPDOs.
The destination is the array at [6200h] for digital outputs and the array at [6411h] for analog outputs. These entries can also be written to by any CANopen configuration tool or CANopen manager using SDO requests. Figure 4: Output data processed by the CANopen firmware...
Digital Output Error Value [6207h] and Analog Output Error Value [6444h]. Heartbeat Production and Consumption The recommended method to monitor the health of each CANopen node is using the heartbeat protocol. Each CANopen node produces its own heartbeat. The heartbeat producer time [1017h,00h] can be set with a configuration tool.
Page 26
It should be noted that saving the current configuration into non- volatile memory takes longer than other SDO accesses. On some CANopen configuration tools it might be necessary to lengthen the timeout for SDO requests. The manufacturer default configuration can be restored by writing the 4-byte string “load”...
Object Dictionary Reference Overview The firmware implements a CANopen Object Dictionary (OD). The specific OD implementation for each module is specified by the corresponding Electronic Data Sheet (EDS). OD entries belonging to I/O channels are only implemented if the matching device has these channels available.
Page 28
CANopen Firmware for PCAN-MicroMod Index Name Type Access 1402h 3rd Receive PDO Parameter PDO Communication Read/Write Parameter Record 1403h 4th Receive PDO Parameter PDO Communication Read/Write Parameter Record 1600h 1st Receive PDO Mapping PDO Mapping Read/Write Parameter Record 1601h 2nd Receive PDO Mapping...
CANopen Firmware for PCAN-MicroMod Index Name Type Access 6426h Analog Input Value Difference Array of Unsigned32 Read/Write 6443h Analog Output Error Mode Array of Unsigned8 Read/Write 6444h Analog Output Error Value Array of Integer32 Read/Write Communication Profile Entries A.2.1 Device Type (1000h)
Page 30
If a device has 4 analog outputs, then it takes 4 loops to update all analog output channels. So if new analog output data was received via CANopen it can take up to four loop executions until all analog output channels are set to the new value.
Page 31
A.2.7 Manufacturer Software Version (100Ah) [1009h,00h], Visible_String (4 ASCII bytes), read only Upon reading, this entry returns a 4-byte ASCII string with the software revision number of the CANopen firmware. A.2.8 Guard Time (100Ch) [100Ch,00h], Unsigned16, read/write Note: The CiA recommends NOT to use node guarding. This feature has only be implemented to be backwards compatible to legacy devices.
Page 32
CANopen Firmware for PCAN-MicroMod and transmit the node guarding requests to the node at the frequency indicated by the value of this entry. If a response from the node to a node guarding request is not transmitted within the node life time, then a node guarding event occurs, indicating that the node may have possibly stopped working.
Page 33
CANopen Firmware for PCAN-MicroMod The PCAN-MicroMod devices support Subindex one, store all parameters to save all configuration data into non-volatile memory. By writing to the subentries, the node can be instructed to immediately store all or some of the settings in non-volatile memory.
Page 34
It does not begin after reception of a boot up message. Each Subindex specifies the Heartbeat Consumer Time for one CANopen node. The value of the entry is constructed as follows: Description 0-15 Heartbeat consumer time in milliseconds...
Page 35
[1018h,01h], Vendor ID, Unsigned32, read only [1018h,02h], Product ID, Unsigned32, read only [1018h,03h], Product Revision, Unsigned32, read only The Identity entries are used to identify specific CANopen products and their versions. The values returned are described in more detail in section 4.1.
Page 36
CANopen Firmware for PCAN-MicroMod A.2.16 Receive PDO Communication Parameters (1400h – 1403h) [140xh,00h], Unsigned8, read-only Returns 2 [140xh,01h], COB ID, Unsigned32, read/write [140xh,02h], Transmission Type, Unsigned8, read/write These entries describe the communication configuration of the four Receive PDOs. Subentry 01h defines the COB ID of the PDO. The default value depends on the index of the entry, as shown in the following table.
Page 37
CANopen Firmware for PCAN-MicroMod Transmission Description Type 0-240 The Receive PDO is synchronous. The data in the PDO is processed on reception of the next SYNC Object. The actual value of the transmission type is not relevant. 241-253 Not used Not used The transmission type of the Receive PDO is device profile specific.
Page 38
CANopen Firmware for PCAN-MicroMod Description Data length in bits (08h, 10h or 20h) 8-15 Subindex of OD entry mapped 16-31 Index of OD entry mapped For example, if a 16-bit process data variable was stored in the Object Dictionary at index 6001h, Subindex 04h, then it can be mapped into a PDO using the value 60010410h.
Page 39
CANopen Firmware for PCAN-MicroMod [140xh,02h], Transmission Type, Unsigned8, read/write [140xh,03h], Inhibit Time, Unsigned16, read/write [140xh,05h], Event Time, Unsigned16, read/write These entries describe the communication configuration of the Transmit PDOs. Subentry 01h defines the COB ID of the PDO. The default value depends on the index of the entry, as shown in the following table.
Page 40
PDO will not take place during the inhibit time. The inhibit time is a multiple of 100µs. Note: The base timer used in the CANopen firmware only has a resolution of 1 ms, therefore the inhibit time is always rounded up to the next millisecond.
Page 41
CANopen Firmware for PCAN-MicroMod Subentry 05h defines the event time for a Transmit PDO. A value of zero disables the event timer. If the event timer is used, then the PDO is periodically transmitted. The value of the event timer entry is the number of milliseconds between transmissions.
Page 42
[1F50h,00h], Unsigned8, read only Returns 3 [1F50h,03h], Hardware Settings, Unsigned32, read/write This entry allows changing the CAN bit rate and the CANopen Node ID used by the device. After writing new settings to this OD entry, the device must be reset.
CANopen Firmware for PCAN-MicroMod range from 3 to 8 representing the following CAN bit rates (values are LSS compatible): Value Bit Rate 50 kbps 125 kbps 250 kbps 500 kbps 800 kbps 1000 kbps Other bit rates are not supported.
Page 44
CANopen Firmware for PCAN-MicroMod A.3.3 Write Digital Outputs (6200h) [6200h,00h], Unsigned8, read/write If digital outputs are available, returns 1 [6200h,01h], Unsigned8, read only, can be mapped to RPDO For devices with digital outputs, the digital output data is written to [6200h,01h].
Page 45
CANopen Firmware for PCAN-MicroMod [6207h,01h], Unsigned8, read/write For each output bit available in [6200h,01h] this entry specifies the error output that should be applied when the node goes into the pre-operational or stopped state. The error output only gets applied, if the corresponding bit in [6206h,01] enables this functionality.
Page 46
CANopen Firmware for PCAN-MicroMod least by the difference value specified in [6426h]. Changes that are smaller than the value difference are ignored. A.3.10 Analog Input Value Difference (6426h) [6426h,00h], Unsigned8, read only If analog inputs are available, returns the number of input channels...
Page 47
CANopen Firmware for PCAN-MicroMod only gets applied, if the corresponding subentry [6443h,0xh] enables this functionality.
Need help?
Do you have a question about the CANopen and is the answer not in the manual?
Questions and answers