Update example Object dictionary
This commit is contained in:
parent
cdad71beee
commit
01887f268d
5 changed files with 237 additions and 63 deletions
|
|
@ -5,11 +5,11 @@ FileRevision=1
|
|||
LastEDS=
|
||||
EDSVersion=4.0
|
||||
Description=
|
||||
CreationTime=12:00PM
|
||||
CreationTime=1:00PM
|
||||
CreationDate=11-23-2020
|
||||
CreatedBy=
|
||||
ModificationTime=3:01PM
|
||||
ModificationDate=01-20-2021
|
||||
ModificationTime=1:21PM
|
||||
ModificationDate=06-26-2021
|
||||
ModifiedBy=
|
||||
|
||||
[DeviceInfo]
|
||||
|
|
@ -160,7 +160,7 @@ SupportedObjects=30
|
|||
ParameterName=Pre-defined error field
|
||||
ObjectType=0x8
|
||||
;StorageLocation=RAM
|
||||
SubNumber=0x9
|
||||
SubNumber=0x11
|
||||
|
||||
[1003sub0]
|
||||
ParameterName=Number of errors
|
||||
|
|
@ -168,7 +168,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0005
|
||||
AccessType=rw
|
||||
DefaultValue=0
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub1]
|
||||
|
|
@ -177,7 +177,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub2]
|
||||
|
|
@ -186,7 +186,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub3]
|
||||
|
|
@ -195,7 +195,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub4]
|
||||
|
|
@ -204,7 +204,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub5]
|
||||
|
|
@ -213,7 +213,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub6]
|
||||
|
|
@ -222,7 +222,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub7]
|
||||
|
|
@ -231,7 +231,7 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub8]
|
||||
|
|
@ -240,7 +240,79 @@ ObjectType=0x7
|
|||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=0x00000000
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub9]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003subA]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003subB]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003subC]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003subD]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003subE]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003subF]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1003sub10]
|
||||
ParameterName=Standard error field
|
||||
ObjectType=0x7
|
||||
;StorageLocation=RAM
|
||||
DataType=0x0007
|
||||
AccessType=ro
|
||||
DefaultValue=
|
||||
PDOMapping=0
|
||||
|
||||
[1005]
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ CANopen device documentation
|
|||
| ------------ | ------------------------------ |
|
||||
| Project File | DS301_profile.xpd |
|
||||
| File Version | 1 |
|
||||
| Created | 23. 11. 2020 12:00:00 |
|
||||
| Created | 23. 11. 2020 13:00:00 |
|
||||
| Created By | |
|
||||
| Modified | 20. 01. 2021 15:01:07 |
|
||||
| Modified | 26. 06. 2021 13:21:06 |
|
||||
| Modified By | |
|
||||
|
||||
This file was automatically generated with [libedssharp](https://github.com/robincornelius/libedssharp) Object Dictionary Editor v0.8-114-gc3a898f
|
||||
This file was automatically generated by [CANopenEditor](https://github.com/CANopenNode/CANopenEditor) v4.0-49-gd365995
|
||||
|
||||
[TOC]
|
||||
|
||||
|
|
@ -87,15 +87,23 @@ Communication Specific Parameters
|
|||
|
||||
| Sub | Name | Data Type | SDO | PDO | SRDO | Default Value |
|
||||
| ---- | --------------------- | ---------- | --- | --- | ---- | ------------- |
|
||||
| 0x00 | Number of errors | UNSIGNED8 | rw | no | no | 0 |
|
||||
| 0x01 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x02 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x03 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x04 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x05 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x06 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x07 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x08 | Standard error field | UNSIGNED32 | ro | no | no | 0x00000000 |
|
||||
| 0x00 | Number of errors | UNSIGNED8 | rw | no | no | |
|
||||
| 0x01 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x02 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x03 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x04 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x05 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x06 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x07 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x08 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x09 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x0A | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x0B | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x0C | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x0D | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x0E | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x0F | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
| 0x10 | Standard error field | UNSIGNED32 | ro | no | no | |
|
||||
|
||||
* Sub Index 0: Contains number of actual errors. 0 can be written to clear error history.
|
||||
* sub-index 1 and above:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--File is generated with libedssharp Object Dictionary Editor v0.8-114-gc3a898f, URL: https://github.com/robincornelius/libedssharp-->
|
||||
<!--File is generated by CANopenEditor v4.0-49-gd365995, URL: https://github.com/CANopenNode/CANopenEditor-->
|
||||
<!--File includes additional custom properties for CANopenNode, CANopen protocol stack, URL: https://github.com/CANopenNode/CANopenNode-->
|
||||
<ISO15745ProfileContainer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.canopen.org/xml/1.1">
|
||||
<ISO15745Profile>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<ProfileTechnology>CANopen</ProfileTechnology>
|
||||
</ISO15745Reference>
|
||||
</ProfileHeader>
|
||||
<ProfileBody xmlns:q1="http://www.canopen.org/xml/1.1" xsi:type="q1:ProfileBody_Device_CANopen" formatName="CANopen" formatVersion="1.0" fileName="DS301_profile.xpd" fileCreator="" fileCreationDate="2020-11-23" fileCreationTime="12:00:00.0000000+01:00" fileModifiedBy="" fileModificationDate="2021-01-20" fileModificationTime="15:01:07.2848060+01:00" fileVersion="1" supportedLanguages="en" xmlns="">
|
||||
<ProfileBody xmlns:q1="http://www.canopen.org/xml/1.1" xsi:type="q1:ProfileBody_Device_CANopen" formatName="CANopen" formatVersion="1.0" fileName="DS301_profile.xpd" fileCreator="" fileCreationDate="2020-11-23" fileCreationTime="13:00:00.0000000+02:00" fileModifiedBy="" fileModificationDate="2021-06-26" fileModificationTime="13:21:06.0079160+02:00" fileVersion="1" supportedLanguages="en" xmlns="">
|
||||
<q1:DeviceIdentity>
|
||||
<q1:vendorName></q1:vendorName>
|
||||
<q1:vendorID></q1:vendorID>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<q1:ApplicationProcess>
|
||||
<q1:dataTypeList>
|
||||
<q1:array name="Pre-defined error field" uniqueID="UID_ARR_1003">
|
||||
<q1:subrange lowerLimit="0" upperLimit="8" />
|
||||
<q1:subrange lowerLimit="0" upperLimit="16" />
|
||||
<UDINT />
|
||||
</q1:array>
|
||||
<q1:array name="Store parameters" uniqueID="UID_ARR_1010">
|
||||
|
|
@ -663,47 +663,70 @@
|
|||
<q1:parameter uniqueID="UID_SUB_100300" access="readWrite">
|
||||
<label lang="en">Number of errors</label>
|
||||
<USINT />
|
||||
<q1:defaultValue value="0" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100301">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100302">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100303">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100304">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100305">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100306">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100307">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100308">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
<q1:defaultValue value="0x00000000" />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100309">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_10030A">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_10030B">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_10030C">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_10030D">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_10030E">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_10030F">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_SUB_100310">
|
||||
<label lang="en">Standard error field</label>
|
||||
<UDINT />
|
||||
</q1:parameter>
|
||||
<q1:parameter uniqueID="UID_OBJ_1005" access="readWrite">
|
||||
<description lang="en">* bit 31: set to 0
|
||||
|
|
@ -2254,13 +2277,13 @@
|
|||
<ProfileTechnology>CANopen</ProfileTechnology>
|
||||
</ISO15745Reference>
|
||||
</ProfileHeader>
|
||||
<ProfileBody xmlns:q2="http://www.canopen.org/xml/1.1" xsi:type="q2:ProfileBody_CommunicationNetwork_CANopen" formatName="CANopen" formatVersion="1.0" fileName="DS301_profile.xpd" fileCreator="" fileCreationDate="2020-11-23" fileCreationTime="12:00:00.0000000+01:00" fileModificationDate="2021-01-20" fileModificationTime="15:01:07.2848060+01:00" fileVersion="1" supportedLanguages="en" xmlns="">
|
||||
<ProfileBody xmlns:q2="http://www.canopen.org/xml/1.1" xsi:type="q2:ProfileBody_CommunicationNetwork_CANopen" formatName="CANopen" formatVersion="1.0" fileName="DS301_profile.xpd" fileCreator="" fileCreationDate="2020-11-23" fileCreationTime="13:00:00.0000000+02:00" fileModificationDate="2021-06-26" fileModificationTime="13:21:06.0079160+02:00" fileVersion="1" supportedLanguages="en" xmlns="">
|
||||
<ApplicationLayers>
|
||||
<q2:CANopenObjectList>
|
||||
<CANopenObject index="1000" name="Device type" objectType="7" PDOmapping="no" uniqueIDRef="UID_OBJ_1000" />
|
||||
<CANopenObject index="1001" name="Error register" objectType="7" PDOmapping="optional" uniqueIDRef="UID_OBJ_1001" />
|
||||
<CANopenObject index="1002" name="Manufacturer status register" objectType="7" PDOmapping="optional" uniqueIDRef="UID_OBJ_1002" />
|
||||
<CANopenObject index="1003" name="Pre-defined error field" objectType="8" uniqueIDRef="UID_OBJ_1003" subNumber="9">
|
||||
<CANopenObject index="1003" name="Pre-defined error field" objectType="8" uniqueIDRef="UID_OBJ_1003" subNumber="17">
|
||||
<CANopenSubObject subIndex="00" name="Number of errors" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100300" />
|
||||
<CANopenSubObject subIndex="01" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100301" />
|
||||
<CANopenSubObject subIndex="02" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100302" />
|
||||
|
|
@ -2270,6 +2293,14 @@
|
|||
<CANopenSubObject subIndex="06" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100306" />
|
||||
<CANopenSubObject subIndex="07" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100307" />
|
||||
<CANopenSubObject subIndex="08" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100308" />
|
||||
<CANopenSubObject subIndex="09" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100309" />
|
||||
<CANopenSubObject subIndex="0A" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_10030A" />
|
||||
<CANopenSubObject subIndex="0B" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_10030B" />
|
||||
<CANopenSubObject subIndex="0C" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_10030C" />
|
||||
<CANopenSubObject subIndex="0D" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_10030D" />
|
||||
<CANopenSubObject subIndex="0E" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_10030E" />
|
||||
<CANopenSubObject subIndex="0F" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_10030F" />
|
||||
<CANopenSubObject subIndex="10" name="Standard error field" objectType="7" PDOmapping="no" uniqueIDRef="UID_SUB_100310" />
|
||||
</CANopenObject>
|
||||
<CANopenObject index="1005" name="COB-ID SYNC message" objectType="7" PDOmapping="no" uniqueIDRef="UID_OBJ_1005" />
|
||||
<CANopenObject index="1006" name="Communication cycle period" objectType="7" PDOmapping="no" uniqueIDRef="UID_OBJ_1006" />
|
||||
|
|
|
|||
19
example/OD.c
19
example/OD.c
|
|
@ -1,11 +1,10 @@
|
|||
/*******************************************************************************
|
||||
CANopen Object Dictionary definition for CANopenNode V4
|
||||
|
||||
This file was automatically generated with
|
||||
libedssharp Object Dictionary Editor v0.8-114-gc3a898f
|
||||
This file was automatically generated by CANopenEditor v4.0-49-gd365995
|
||||
|
||||
https://github.com/CANopenNode/CANopenNode
|
||||
https://github.com/robincornelius/libedssharp
|
||||
https://github.com/CANopenNode/CANopenEditor
|
||||
|
||||
DON'T EDIT THIS FILE MANUALLY, UNLESS YOU KNOW WHAT YOU ARE DOING !!!!
|
||||
*******************************************************************************/
|
||||
|
|
@ -21,7 +20,7 @@
|
|||
/*******************************************************************************
|
||||
OD data initialization of all groups
|
||||
*******************************************************************************/
|
||||
OD_PERSIST_COMM_t OD_PERSIST_COMM = {
|
||||
OD_ATTR_PERSIST_COMM OD_PERSIST_COMM_t OD_PERSIST_COMM = {
|
||||
.x1000_deviceType = 0x00000000,
|
||||
.x1005_COB_ID_SYNCMessage = 0x00000080,
|
||||
.x1006_communicationCyclePeriod = 0x00000000,
|
||||
|
|
@ -192,10 +191,8 @@ OD_PERSIST_COMM_t OD_PERSIST_COMM = {
|
|||
}
|
||||
};
|
||||
|
||||
OD_RAM_t OD_RAM = {
|
||||
OD_ATTR_RAM OD_RAM_t OD_RAM = {
|
||||
.x1001_errorRegister = 0x00,
|
||||
.x1003_pre_definedErrorField_sub0 = 0x00,
|
||||
.x1003_pre_definedErrorField = {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
.x1010_storeParameters_sub0 = 0x04,
|
||||
.x1010_storeParameters = {0x00000001, 0x00000001, 0x00000001, 0x00000001},
|
||||
.x1011_restoreDefaultParameters_sub0 = 0x04,
|
||||
|
|
@ -260,8 +257,8 @@ static CO_PROGMEM ODObjs_t ODObjs = {
|
|||
.dataLength = 1
|
||||
},
|
||||
.o_1003_pre_definedErrorField = {
|
||||
.dataOrig0 = &OD_RAM.x1003_pre_definedErrorField_sub0,
|
||||
.dataOrig = &OD_RAM.x1003_pre_definedErrorField[0],
|
||||
.dataOrig0 = NULL,
|
||||
.dataOrig = NULL,
|
||||
.attribute0 = ODA_SDO_RW,
|
||||
.attribute = ODA_SDO_R | ODA_MB,
|
||||
.dataElementLength = 4,
|
||||
|
|
@ -1119,10 +1116,10 @@ static CO_PROGMEM ODObjs_t ODObjs = {
|
|||
/*******************************************************************************
|
||||
Object dictionary
|
||||
*******************************************************************************/
|
||||
static OD_entry_t ODList[] = {
|
||||
static OD_ATTR_OD OD_entry_t ODList[] = {
|
||||
{0x1000, 0x01, ODT_VAR, &ODObjs.o_1000_deviceType, NULL},
|
||||
{0x1001, 0x01, ODT_VAR, &ODObjs.o_1001_errorRegister, NULL},
|
||||
{0x1003, 0x09, ODT_ARR, &ODObjs.o_1003_pre_definedErrorField, NULL},
|
||||
{0x1003, 0x11, ODT_ARR, &ODObjs.o_1003_pre_definedErrorField, NULL},
|
||||
{0x1005, 0x01, ODT_VAR, &ODObjs.o_1005_COB_ID_SYNCMessage, NULL},
|
||||
{0x1006, 0x01, ODT_VAR, &ODObjs.o_1006_communicationCyclePeriod, NULL},
|
||||
{0x1007, 0x01, ODT_VAR, &ODObjs.o_1007_synchronousWindowLength, NULL},
|
||||
|
|
|
|||
92
example/OD.h
92
example/OD.h
|
|
@ -1,11 +1,10 @@
|
|||
/*******************************************************************************
|
||||
CANopen Object Dictionary definition for CANopenNode V4
|
||||
|
||||
This file was automatically generated with
|
||||
libedssharp Object Dictionary Editor v0.8-114-gc3a898f
|
||||
This file was automatically generated by CANopenEditor v4.0-49-gd365995
|
||||
|
||||
https://github.com/CANopenNode/CANopenNode
|
||||
https://github.com/robincornelius/libedssharp
|
||||
https://github.com/CANopenNode/CANopenEditor
|
||||
|
||||
DON'T EDIT THIS FILE MANUALLY !!!!
|
||||
********************************************************************************
|
||||
|
|
@ -15,9 +14,9 @@
|
|||
Project File: DS301_profile.xpd
|
||||
File Version: 1
|
||||
|
||||
Created: 23. 11. 2020 12:00:00
|
||||
Created: 23. 11. 2020 13:00:00
|
||||
Created By:
|
||||
Modified: 20. 01. 2021 15:01:07
|
||||
Modified: 26. 06. 2021 13:21:06
|
||||
Modified By:
|
||||
|
||||
Device Info:
|
||||
|
|
@ -49,6 +48,15 @@
|
|||
#define OD_CNT_TPDO 4
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
Sizes of OD arrays
|
||||
*******************************************************************************/
|
||||
#define OD_CNT_ARR_1003 16
|
||||
#define OD_CNT_ARR_1010 4
|
||||
#define OD_CNT_ARR_1011 4
|
||||
#define OD_CNT_ARR_1016 8
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
OD data declaration of all groups
|
||||
*******************************************************************************/
|
||||
|
|
@ -61,7 +69,7 @@ typedef struct {
|
|||
uint32_t x1014_COB_ID_EMCY;
|
||||
uint16_t x1015_inhibitTimeEMCY;
|
||||
uint8_t x1016_consumerHeartbeatTime_sub0;
|
||||
uint32_t x1016_consumerHeartbeatTime[8];
|
||||
uint32_t x1016_consumerHeartbeatTime[OD_CNT_ARR_1016];
|
||||
uint16_t x1017_producerHeartbeatTime;
|
||||
struct {
|
||||
uint8_t highestSub_indexSupported;
|
||||
|
|
@ -225,12 +233,10 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
uint8_t x1001_errorRegister;
|
||||
uint8_t x1003_pre_definedErrorField_sub0;
|
||||
uint32_t x1003_pre_definedErrorField[8];
|
||||
uint8_t x1010_storeParameters_sub0;
|
||||
uint32_t x1010_storeParameters[4];
|
||||
uint32_t x1010_storeParameters[OD_CNT_ARR_1010];
|
||||
uint8_t x1011_restoreDefaultParameters_sub0;
|
||||
uint32_t x1011_restoreDefaultParameters[4];
|
||||
uint32_t x1011_restoreDefaultParameters[OD_CNT_ARR_1011];
|
||||
struct {
|
||||
uint8_t highestSub_indexSupported;
|
||||
uint32_t COB_IDClientToServerRx;
|
||||
|
|
@ -238,9 +244,20 @@ typedef struct {
|
|||
} x1200_SDOServerParameter;
|
||||
} OD_RAM_t;
|
||||
|
||||
extern OD_PERSIST_COMM_t OD_PERSIST_COMM;
|
||||
extern OD_RAM_t OD_RAM;
|
||||
extern OD_t *OD;
|
||||
#ifndef OD_ATTR_PERSIST_COMM
|
||||
#define OD_ATTR_PERSIST_COMM
|
||||
#endif
|
||||
extern OD_ATTR_PERSIST_COMM OD_PERSIST_COMM_t OD_PERSIST_COMM;
|
||||
|
||||
#ifndef OD_ATTR_RAM
|
||||
#define OD_ATTR_RAM
|
||||
#endif
|
||||
extern OD_ATTR_RAM OD_RAM_t OD_RAM;
|
||||
|
||||
#ifndef OD_ATTR_OD
|
||||
#define OD_ATTR_OD
|
||||
#endif
|
||||
extern OD_ATTR_OD OD_t *OD;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
@ -318,4 +335,53 @@ extern OD_t *OD;
|
|||
#define OD_ENTRY_H1A02_TPDOMappingParameter &OD->list[31]
|
||||
#define OD_ENTRY_H1A03_TPDOMappingParameter &OD->list[32]
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
OD config structure
|
||||
*******************************************************************************/
|
||||
#ifdef CO_MULTIPLE_OD
|
||||
#define OD_INIT_CONFIG(config) {\
|
||||
(config).CNT_NMT = OD_CNT_NMT;\
|
||||
(config).ENTRY_H1017 = OD_ENTRY_H1017;\
|
||||
(config).CNT_HB_CONS = OD_CNT_HB_CONS;\
|
||||
(config).CNT_ARR_1016 = OD_CNT_ARR_1016;\
|
||||
(config).ENTRY_H1016 = OD_ENTRY_H1016;\
|
||||
(config).CNT_EM = OD_CNT_EM;\
|
||||
(config).ENTRY_H1001 = OD_ENTRY_H1001;\
|
||||
(config).ENTRY_H1014 = OD_ENTRY_H1014;\
|
||||
(config).ENTRY_H1015 = OD_ENTRY_H1015;\
|
||||
(config).CNT_ARR_1003 = OD_CNT_ARR_1003;\
|
||||
(config).ENTRY_H1003 = OD_ENTRY_H1003;\
|
||||
(config).CNT_SDO_SRV = OD_CNT_SDO_SRV;\
|
||||
(config).ENTRY_H1200 = OD_ENTRY_H1200;\
|
||||
(config).CNT_SDO_CLI = OD_CNT_SDO_CLI;\
|
||||
(config).ENTRY_H1280 = OD_ENTRY_H1280;\
|
||||
(config).CNT_TIME = OD_CNT_TIME;\
|
||||
(config).ENTRY_H1012 = OD_ENTRY_H1012;\
|
||||
(config).CNT_SYNC = OD_CNT_SYNC;\
|
||||
(config).ENTRY_H1005 = OD_ENTRY_H1005;\
|
||||
(config).ENTRY_H1006 = OD_ENTRY_H1006;\
|
||||
(config).ENTRY_H1007 = OD_ENTRY_H1007;\
|
||||
(config).ENTRY_H1019 = OD_ENTRY_H1019;\
|
||||
(config).CNT_RPDO = OD_CNT_RPDO;\
|
||||
(config).ENTRY_H1400 = OD_ENTRY_H1400;\
|
||||
(config).ENTRY_H1600 = OD_ENTRY_H1600;\
|
||||
(config).CNT_TPDO = OD_CNT_TPDO;\
|
||||
(config).ENTRY_H1800 = OD_ENTRY_H1800;\
|
||||
(config).ENTRY_H1A00 = OD_ENTRY_H1A00;\
|
||||
(config).CNT_LEDS = 0;\
|
||||
(config).CNT_GFC = 0;\
|
||||
(config).ENTRY_H1300 = NULL;\
|
||||
(config).CNT_SRDO = 0;\
|
||||
(config).ENTRY_H1301 = NULL;\
|
||||
(config).ENTRY_H1381 = NULL;\
|
||||
(config).ENTRY_H13FE = NULL;\
|
||||
(config).ENTRY_H13FF = NULL;\
|
||||
(config).CNT_LSS_SLV = 0;\
|
||||
(config).CNT_LSS_MST = 0;\
|
||||
(config).CNT_GTWA = 0;\
|
||||
(config).CNT_TRACE = 0;\
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OD_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue