pull/165/merge
Ivo Houtzager 2024-04-12 11:30:49 +09:00 committed by GitHub
commit 3bc63d60c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 6155 additions and 36 deletions

View File

@ -1,11 +1,11 @@
Simple Open Source EtherCAT Slave
====
[![Build Status](https://github.com/OpenEtherCATsociety/SOES/workflows/build/badge.svg?branch=master)](https://github.com/OpenEtherCATsociety/SOES/actions?workflow=build)
SOES (Simple OpenSource EtherCAT Slave Stack) is an opensource slave
stack that is very easy to use and provides a small footprint. It is a
good alternative to more complex stacks on the market.
This forks adds support for EtherCAT slave HAT with LAN9252 chip (like EasyCAT or EtherC/EtherBerry) for Raspberry PI using the BCM2835 library.
Overview
----
SOES is an EtherCAT slave stack written in c. Its purpose is to learn and
@ -30,6 +30,10 @@ Feature list:
"stack"_init
- EoE
TODO
- Update documentation
- Add EoE sample application
Building
----
* `mkdir build`
* `cd build`
* `cmake .. -DRPI_VARIANT`
* `make`

View File

@ -0,0 +1,6 @@
add_executable (demo
main.c
slave_objectlist.c
)
target_link_libraries(demo LINK_PUBLIC soes bcm2835)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,508 @@
<?xml version="1.0"?>
<EtherCATInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EtherCATInfo.xsd" Version="1.6">
<!-- ***************** EtherBerry V 1.0 ********************************************************** -->
<Vendor>
<Id>#x00534745</Id>
<Name>SG_EL_SYS</Name>
<ImageData16x14>424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e000000000000000000004cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb1224cb122ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff241cedffffff241cedffffff241ced241cedffffffffffffffffff241ced241ced241cedffffff241cedffffffffffff241cedffffff241cedffffff241cedffffff241cedffffff241cedffffff241cedffffffffffff241cedffffffffffff241cedffffff241cedffffff241cedffffff241cedffffff241cedffffff241cedffffffffffff241cedffffffffffff241cedffffff241cedffffff241cedffffff241cedffffffffffff241cedffffffffffffffffff241cedffffffffffff241ced241ced241cedffffff241ced241cedffffffffffff241cedffffff241cedffffffffffff241cedffffffffffff241cedffffff241cedffffff241cedffffff241cedffffff241cedffffff241cedffffffffffff241cedffffffffffff241cedffffff241cedffffff241cedffffff241cedffffffffffff241cedffffffffffffffffff241cedffffffffffff241cedffffff241cedffffff241cedffffff241cedffffffffffffffffffffffffffffffffffff241cedffffffffffffffffff241cedffffffffffffffffff241cedffffffffffffffffffffffffffffffffffff241ced241ced241cedffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</ImageData16x14>
</Vendor>
<Descriptions>
<Groups>
<Group SortOrder="0">
<Type>SSC_Device</Type>
<Name LcId="1033">EtherBerry</Name>
<ImageData16x14>424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000241ced241ced241ced241cedffffff241cedffffffffffffffffff241cedffffffffffffffffff241cedffffffffffff241cedffffffffffffffffffffffff241cedffffffffffffffffff241cedffffffffffffffffff241cedffffffffffff241cedffffffffffffffffffffffff241ced241ced241ced241ced241cedffffffffffffffffff241cedffffffffffff241cedffffffffffffffffffffffff241cedffffffffffffffffff241cedffffffffffffffffff241cedffffffffffff241cedffffffffffffffffffffffff241ced241cedffffff241ced241cedffffff241cedffffff241cedffffff241ced241ced241ced241ced241cedffffffffffff241ced241ced241cedffffffffffff241ced241ced241ced241ced241cedffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff241ced241ced241cedffffffffffff241ced241ced241cedffffff241ced241ced241cedffffff241ced241ced241ced241cedffffffffffffffffff241cedffffffffffff241cedffffffffffffffffff241cedffffffffffffffffff241ced241cedffffffffffffffffffffffff241ced241cedffffffffffff241ced241ced241cedffffff241ced241ced241ced241ced241cedffffffffffffffffffffffffffffff241cedffffff241cedffffffffffffffffff241cedffffff241ced241cedffffffffffffffffffffffff241ced241ced241cedffffff241ced241ced241cedffffff241cedffffff241ced241cedffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff241ced241ced241cedffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</ImageData16x14>
</Group>
</Groups>
<Devices>
<Device Physics="YY">
<Type ProductCode="#x00001010" RevisionNo="#x00000008">EtherBerry 32+32</Type>
<Name LcId="1033"><![CDATA[Generic 32+32 bytes]]></Name>
<URL LcId="1033"><![CDATA[http://www.sg-electronic-systems.com/]]></URL>
<GroupType>SSC_Device</GroupType>
<Fmmu>Outputs</Fmmu>
<Fmmu>Inputs</Fmmu>
<!-- indirizzo fisico di base per gli output -->
<Sm StartAddress="#x1000" ControlByte="#x64" Enable="1">Outputs</Sm>
<!-- indirizzo fisico di base per gli input -->
<Sm StartAddress="#x1200" ControlByte="#x20" Enable="1">Inputs</Sm>
<!-- ***************** PDO di output ********************************************************** -->
<RxPdo Fixed="1" Mandatory="1" Sm="0">
<Index>#x1600</Index>
<Name>Outputs</Name>
<Entry>
<Index>#x0005</Index>
<SubIndex>1</SubIndex>
<BitLen>8</BitLen>
<Name>Byte0</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>2</SubIndex>
<BitLen>8</BitLen>
<Name>Byte1</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>3</SubIndex>
<BitLen>8</BitLen>
<Name>Byte2</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>4</SubIndex>
<BitLen>8</BitLen>
<Name>Byte3</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>5</SubIndex>
<BitLen>8</BitLen>
<Name>Byte4</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>6</SubIndex>
<BitLen>8</BitLen>
<Name>Byte5</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>7</SubIndex>
<BitLen>8</BitLen>
<Name>Byte6</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>8</SubIndex>
<BitLen>8</BitLen>
<Name>Byte7</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>9</SubIndex>
<BitLen>8</BitLen>
<Name>Byte8</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>10</SubIndex>
<BitLen>8</BitLen>
<Name>Byte9</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>11</SubIndex>
<BitLen>8</BitLen>
<Name>Byte10</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>12</SubIndex>
<BitLen>8</BitLen>
<Name>Byte11</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>13</SubIndex>
<BitLen>8</BitLen>
<Name>Byte12</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>14</SubIndex>
<BitLen>8</BitLen>
<Name>Byte13</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>15</SubIndex>
<BitLen>8</BitLen>
<Name>Byte14</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>16</SubIndex>
<BitLen>8</BitLen>
<Name>Byte15</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>17</SubIndex>
<BitLen>8</BitLen>
<Name>Byte16</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>18</SubIndex>
<BitLen>8</BitLen>
<Name>Byte17</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>19</SubIndex>
<BitLen>8</BitLen>
<Name>Byte18</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>20</SubIndex>
<BitLen>8</BitLen>
<Name>Byte19</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>21</SubIndex>
<BitLen>8</BitLen>
<Name>Byte20</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>22</SubIndex>
<BitLen>8</BitLen>
<Name>Byte21</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>23</SubIndex>
<BitLen>8</BitLen>
<Name>Byte22</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>24</SubIndex>
<BitLen>8</BitLen>
<Name>Byte23</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>25</SubIndex>
<BitLen>8</BitLen>
<Name>Byte24</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>26</SubIndex>
<BitLen>8</BitLen>
<Name>Byte25</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>27</SubIndex>
<BitLen>8</BitLen>
<Name>Byte26</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>28</SubIndex>
<BitLen>8</BitLen>
<Name>Byte27</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>29</SubIndex>
<BitLen>8</BitLen>
<Name>Byte28</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>30</SubIndex>
<BitLen>8</BitLen>
<Name>Byte29</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>31</SubIndex>
<BitLen>8</BitLen>
<Name>Byte30</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>32</SubIndex>
<BitLen>8</BitLen>
<Name>Byte31</Name>
<DataType>USINT</DataType>
</Entry>
<!-- ***************** PDO di input *********************************************************** -->
</RxPdo>
<TxPdo Fixed="1" Mandatory="1" Sm="1">
<Index>#x1A00</Index>
<Name>Inputs</Name>
<Entry>
<Index>#x0005</Index>
<SubIndex>1</SubIndex>
<BitLen>8</BitLen>
<Name>Byte0</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>2</SubIndex>
<BitLen>8</BitLen>
<Name>Byte1</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>3</SubIndex>
<BitLen>8</BitLen>
<Name>Byte2</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>4</SubIndex>
<BitLen>8</BitLen>
<Name>Byte3</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>5</SubIndex>
<BitLen>8</BitLen>
<Name>Byte4</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>6</SubIndex>
<BitLen>8</BitLen>
<Name>Byte5</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>7</SubIndex>
<BitLen>8</BitLen>
<Name>Byte6</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>8</SubIndex>
<BitLen>8</BitLen>
<Name>Byte7</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>9</SubIndex>
<BitLen>8</BitLen>
<Name>Byte8</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>10</SubIndex>
<BitLen>8</BitLen>
<Name>Byte9</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>11</SubIndex>
<BitLen>8</BitLen>
<Name>Byte10</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>12</SubIndex>
<BitLen>8</BitLen>
<Name>Byte11</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>13</SubIndex>
<BitLen>8</BitLen>
<Name>Byte12</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>14</SubIndex>
<BitLen>8</BitLen>
<Name>Byte13</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>15</SubIndex>
<BitLen>8</BitLen>
<Name>Byte14</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>16</SubIndex>
<BitLen>8</BitLen>
<Name>Byte15</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>17</SubIndex>
<BitLen>8</BitLen>
<Name>Byte16</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>18</SubIndex>
<BitLen>8</BitLen>
<Name>Byte17</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>19</SubIndex>
<BitLen>8</BitLen>
<Name>Byte18</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>20</SubIndex>
<BitLen>8</BitLen>
<Name>Byte19</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>21</SubIndex>
<BitLen>8</BitLen>
<Name>Byte20</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>22</SubIndex>
<BitLen>8</BitLen>
<Name>Byte21</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>23</SubIndex>
<BitLen>8</BitLen>
<Name>Byte22</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>24</SubIndex>
<BitLen>8</BitLen>
<Name>Byte23</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>25</SubIndex>
<BitLen>8</BitLen>
<Name>Byte24</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>26</SubIndex>
<BitLen>8</BitLen>
<Name>Byte25</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>27</SubIndex>
<BitLen>8</BitLen>
<Name>Byte26</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>28</SubIndex>
<BitLen>8</BitLen>
<Name>Byte27</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>29</SubIndex>
<BitLen>8</BitLen>
<Name>Byte28</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>30</SubIndex>
<BitLen>8</BitLen>
<Name>Byte29</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>31</SubIndex>
<BitLen>8</BitLen>
<Name>Byte30</Name>
<DataType>USINT</DataType>
</Entry>
<Entry>
<Index>#x0005</Index>
<SubIndex>32</SubIndex>
<BitLen>8</BitLen>
<Name>Byte31</Name>
<DataType>USINT</DataType>
</Entry>
</TxPdo>
<Eeprom>
<ByteSize>1024</ByteSize> <!-- EEprom - 1KB 24LC08 -->
<ConfigData>80030000000000000000</ConfigData>
</Eeprom>
</Device>
</Devices>
</Descriptions>
</EtherCATInfo>

View File

@ -0,0 +1,46 @@
#ifndef __ECAT_OPTIONS_H__
#define __ECAT_OPTIONS_H__
#include "cc.h"
#define DYN_PDO_MAPPING 0
#define USE_EMU 1
#define USE_MBX 0
#define USE_FOE 0
#define USE_EOE 0
#if USE_MBX
#define MBXSIZE 128
#define MBXSIZEBOOT 128
#else
#define MBXSIZE 0
#define MBXSIZEBOOT 0
#endif
#define SM0_sma 0x1000
#define SM0_smc 0x64
#define SM0_act 1
#define SM1_sma 0x1200
#define SM1_smc 0x20
#define SM1_act 1
#define SM2_sma SM0_sma
#define SM2_smc SM0_smc
#define SM2_act SM0_act
#define SM3_sma SM1_sma
#define SM3_smc SM1_smc
#define SM3_act SM1_act
#define MAX_RXPDO_SIZE 128
#define MAX_TXPDO_SIZE 128
#if DYN_PDO_MAPPING
#define MAX_MAPPINGS_SM2 MAX_RXPDO_SIZE
#define MAX_MAPPINGS_SM3 MAX_TXPDO_SIZE
#else
#define MAX_MAPPINGS_SM2 0
#define MAX_MAPPINGS_SM3 0
#endif
#endif /* __ECAT_OPTIONS_H__ */

View File

@ -0,0 +1,105 @@
#include <stdio.h>
#include <string.h>
#include "ecat_options.h"
#include "ecat_slv.h"
#include "esc_hw.h"
#include "utypes.h"
/* Application variables */
_Objects Obj;
#if !(DYN_PDO_MAPPING)
uint8_t * txpdo = Obj.txpdo;
uint8_t * rxpdo = Obj.rxpdo;
#endif
void cb_state_change (uint8_t * as, uint8_t * an)
{
if (*as == SAFEOP_TO_OP)
{
/* Enable HW watchdog event */
ESC_ALeventmaskwrite (ESC_ALeventmaskread() | ESCREG_ALEVENT_WD);
/* Enable SM2 sync manager event */
ESC_ALeventmaskwrite (ESC_ALeventmaskread() | ESCREG_ALEVENT_SM2);
}
}
void cb_application (void)
{
/* Check for watchdog expired event */
if (ESCvar.ALevent & ESCREG_ALEVENT_WD)
{
if ((ESC_WDstatus() & 0x01) &&
((CC_ATOMIC_GET(ESCvar.App.state) & APPSTATE_OUTPUT) > 0))
{
DPRINT("DIG_process watchdog expired\n");
ESC_ALstatusgotoerror((ESCsafeop | ESCerror), ALERR_WATCHDOG);
}
}
}
void cb_get_inputs (void)
{
/* Loop back outputs to inputs */
#if DYN_PDO_MAPPING
memcpy(Obj.txpdo,Obj.rxpdo,BYTE_NUM);
#else
memcpy(txpdo,rxpdo,BYTE_NUM);
#endif
}
void cb_set_outputs (void)
{
}
void cb_safeoutput (void)
{
/* Set all outputs to zero */
#if DYN_PDO_MAPPING
memset(Obj.rxpdo,0,BYTE_NUM);
#else
memset(rxpdo,0,BYTE_NUM);
#endif
}
int soes (void * arg)
{
static esc_cfg_t config =
{
.user_arg = "rpi3,cs0", /* Change rpi3 to rpi4 for raspberry pi 4 or later */
.use_interrupt = 0,
.watchdog_cnt = INT32_MAX, /* Use HW SM watchdog instead */
.set_defaults_hook = NULL,
.pre_state_change_hook = NULL,
.post_state_change_hook = cb_state_change,
.application_hook = cb_application,
.safeoutput_override = cb_safeoutput,
.pre_object_download_hook = NULL,
.post_object_download_hook = NULL,
.rxpdo_override = NULL,
.txpdo_override = NULL,
.esc_hw_interrupt_enable = NULL,
.esc_hw_interrupt_disable = NULL,
.esc_hw_eep_handler = NULL,
.esc_check_dc_handler = NULL,
};
DPRINT ("Start slave init\n");
ecat_slv_init (&config);
DPRINT ("Initialization finished\n");
while (1)
{
ecat_slv();
}
return 0;
}
int main (void)
{
DPRINT ("SOES (Simple Open EtherCAT Slave)\n");
soes (NULL);
return 0;
}

View File

@ -0,0 +1,946 @@
#include "esc_coe.h"
#include "utypes.h"
#include <stddef.h>
#ifdef BYTE_NUM // for BYTE_NUM we accept only 16 32 64 128 --
#if ((BYTE_NUM !=16) && (BYTE_NUM !=32) && (BYTE_NUM !=64) && (BYTE_NUM !=128))
#error "BYTE_NUM must be 16, 32, 64 or 128 !!! define it correctly in file utypes.h"
#endif
#else
#define BYTE_NUM 32
#endif
#ifndef HW_REV
#define HW_REV "1.0"
#endif
#ifndef SW_REV
#define SW_REV "1.0"
#endif
static const char acName1000[] = "Device Type";
static const char acName1008[] = "Device Name";
static const char acName1009[] = "Hardware Version";
static const char acName100A[] = "Software Version";
static const char acName1018[] = "Identity Object";
static const char acName1018_00[] = "Max SubIndex";
static const char acName1018_01[] = "Vendor ID";
static const char acName1018_02[] = "Product Code";
static const char acName1018_03[] = "Revision Number";
static const char acName1018_04[] = "Serial Number";
static const char acName1600[] = "Outputs";
static const char acName1600_00[] = "Max SubIndex";
static const char acName1600_01[] = "Byte0";
static const char acName1600_02[] = "Byte1";
static const char acName1600_03[] = "Byte2";
static const char acName1600_04[] = "Byte3";
static const char acName1600_05[] = "Byte4";
static const char acName1600_06[] = "Byte5";
static const char acName1600_07[] = "Byte6";
static const char acName1600_08[] = "Byte7";
static const char acName1600_09[] = "Byte8";
static const char acName1600_10[] = "Byte9";
static const char acName1600_11[] = "Byte10";
static const char acName1600_12[] = "Byte11";
static const char acName1600_13[] = "Byte12";
static const char acName1600_14[] = "Byte13";
static const char acName1600_15[] = "Byte14";
static const char acName1600_16[] = "Byte15";
#if (BYTE_NUM > 16)
static const char acName1600_17[] = "Byte16";
static const char acName1600_18[] = "Byte17";
static const char acName1600_19[] = "Byte18";
static const char acName1600_20[] = "Byte19";
static const char acName1600_21[] = "Byte20";
static const char acName1600_22[] = "Byte21";
static const char acName1600_23[] = "Byte22";
static const char acName1600_24[] = "Byte23";
static const char acName1600_25[] = "Byte24";
static const char acName1600_26[] = "Byte25";
static const char acName1600_27[] = "Byte26";
static const char acName1600_28[] = "Byte27";
static const char acName1600_29[] = "Byte28";
static const char acName1600_30[] = "Byte29";
static const char acName1600_31[] = "Byte30";
static const char acName1600_32[] = "Byte31";
#endif
#if (BYTE_NUM > 32)
static const char acName1600_33[] = "Byte32";
static const char acName1600_34[] = "Byte33";
static const char acName1600_35[] = "Byte34";
static const char acName1600_36[] = "Byte35";
static const char acName1600_37[] = "Byte36";
static const char acName1600_38[] = "Byte37";
static const char acName1600_39[] = "Byte38";
static const char acName1600_40[] = "Byte39";
static const char acName1600_41[] = "Byte40";
static const char acName1600_42[] = "Byte41";
static const char acName1600_43[] = "Byte42";
static const char acName1600_44[] = "Byte43";
static const char acName1600_45[] = "Byte44";
static const char acName1600_46[] = "Byte45";
static const char acName1600_47[] = "Byte46";
static const char acName1600_48[] = "Byte47";
static const char acName1600_49[] = "Byte48";
static const char acName1600_50[] = "Byte49";
static const char acName1600_51[] = "Byte50";
static const char acName1600_52[] = "Byte51";
static const char acName1600_53[] = "Byte52";
static const char acName1600_54[] = "Byte53";
static const char acName1600_55[] = "Byte54";
static const char acName1600_56[] = "Byte55";
static const char acName1600_57[] = "Byte56";
static const char acName1600_58[] = "Byte57";
static const char acName1600_59[] = "Byte58";
static const char acName1600_60[] = "Byte59";
static const char acName1600_61[] = "Byte60";
static const char acName1600_62[] = "Byte61";
static const char acName1600_63[] = "Byte62";
static const char acName1600_64[] = "Byte63";
#endif
#if (BYTE_NUM > 64)
static const char acName1600_65[] = "Byte64";
static const char acName1600_66[] = "Byte65";
static const char acName1600_67[] = "Byte66";
static const char acName1600_68[] = "Byte67";
static const char acName1600_69[] = "Byte68";
static const char acName1600_70[] = "Byte69";
static const char acName1600_71[] = "Byte70";
static const char acName1600_72[] = "Byte71";
static const char acName1600_73[] = "Byte72";
static const char acName1600_74[] = "Byte73";
static const char acName1600_75[] = "Byte74";
static const char acName1600_76[] = "Byte75";
static const char acName1600_77[] = "Byte76";
static const char acName1600_78[] = "Byte77";
static const char acName1600_79[] = "Byte78";
static const char acName1600_80[] = "Byte79";
static const char acName1600_81[] = "Byte80";
static const char acName1600_82[] = "Byte81";
static const char acName1600_83[] = "Byte82";
static const char acName1600_84[] = "Byte83";
static const char acName1600_85[] = "Byte84";
static const char acName1600_86[] = "Byte85";
static const char acName1600_87[] = "Byte86";
static const char acName1600_88[] = "Byte87";
static const char acName1600_89[] = "Byte88";
static const char acName1600_90[] = "Byte89";
static const char acName1600_91[] = "Byte90";
static const char acName1600_92[] = "Byte91";
static const char acName1600_93[] = "Byte92";
static const char acName1600_94[] = "Byte93";
static const char acName1600_95[] = "Byte94";
static const char acName1600_96[] = "Byte95";
static const char acName1600_97[] = "Byte96";
static const char acName1600_98[] = "Byte97";
static const char acName1600_99[] = "Byte98";
static const char acName1600_100[] = "Byte99";
static const char acName1600_101[] = "Byte100";
static const char acName1600_102[] = "Byte101";
static const char acName1600_103[] = "Byte102";
static const char acName1600_104[] = "Byte103";
static const char acName1600_105[] = "Byte104";
static const char acName1600_106[] = "Byte105";
static const char acName1600_107[] = "Byte106";
static const char acName1600_108[] = "Byte107";
static const char acName1600_109[] = "Byte108";
static const char acName1600_110[] = "Byte109";
static const char acName1600_111[] = "Byte110";
static const char acName1600_112[] = "Byte111";
static const char acName1600_113[] = "Byte112";
static const char acName1600_114[] = "Byte113";
static const char acName1600_115[] = "Byte114";
static const char acName1600_116[] = "Byte115";
static const char acName1600_117[] = "Byte116";
static const char acName1600_118[] = "Byte117";
static const char acName1600_119[] = "Byte118";
static const char acName1600_120[] = "Byte119";
static const char acName1600_121[] = "Byte120";
static const char acName1600_122[] = "Byte121";
static const char acName1600_123[] = "Byte122";
static const char acName1600_124[] = "Byte123";
static const char acName1600_125[] = "Byte124";
static const char acName1600_126[] = "Byte125";
static const char acName1600_127[] = "Byte126";
static const char acName1600_128[] = "Byte127";
#endif
static const char acName1A00[] = "Inputs";
static const char acName1A00_00[] = "Max SubIndex";
static const char acName1A00_01[] = "Byte0";
static const char acName1A00_02[] = "Byte1";
static const char acName1A00_03[] = "Byte2";
static const char acName1A00_04[] = "Byte3";
static const char acName1A00_05[] = "Byte4";
static const char acName1A00_06[] = "Byte5";
static const char acName1A00_07[] = "Byte6";
static const char acName1A00_08[] = "Byte7";
static const char acName1A00_09[] = "Byte8";
static const char acName1A00_10[] = "Byte9";
static const char acName1A00_11[] = "Byte10";
static const char acName1A00_12[] = "Byte11";
static const char acName1A00_13[] = "Byte12";
static const char acName1A00_14[] = "Byte13";
static const char acName1A00_15[] = "Byte14";
static const char acName1A00_16[] = "Byte15";
#if (BYTE_NUM > 16)
static const char acName1A00_17[] = "Byte16";
static const char acName1A00_18[] = "Byte17";
static const char acName1A00_19[] = "Byte18";
static const char acName1A00_20[] = "Byte19";
static const char acName1A00_21[] = "Byte20";
static const char acName1A00_22[] = "Byte21";
static const char acName1A00_23[] = "Byte22";
static const char acName1A00_24[] = "Byte23";
static const char acName1A00_25[] = "Byte24";
static const char acName1A00_26[] = "Byte25";
static const char acName1A00_27[] = "Byte26";
static const char acName1A00_28[] = "Byte27";
static const char acName1A00_29[] = "Byte28";
static const char acName1A00_30[] = "Byte29";
static const char acName1A00_31[] = "Byte30";
static const char acName1A00_32[] = "Byte31";
#endif
#if (BYTE_NUM > 32)
static const char acName1A00_33[] = "Byte32";
static const char acName1A00_34[] = "Byte33";
static const char acName1A00_35[] = "Byte34";
static const char acName1A00_36[] = "Byte35";
static const char acName1A00_37[] = "Byte36";
static const char acName1A00_38[] = "Byte37";
static const char acName1A00_39[] = "Byte38";
static const char acName1A00_40[] = "Byte39";
static const char acName1A00_41[] = "Byte40";
static const char acName1A00_42[] = "Byte41";
static const char acName1A00_43[] = "Byte42";
static const char acName1A00_44[] = "Byte43";
static const char acName1A00_45[] = "Byte44";
static const char acName1A00_46[] = "Byte45";
static const char acName1A00_47[] = "Byte46";
static const char acName1A00_48[] = "Byte47";
static const char acName1A00_49[] = "Byte48";
static const char acName1A00_50[] = "Byte49";
static const char acName1A00_51[] = "Byte50";
static const char acName1A00_52[] = "Byte51";
static const char acName1A00_53[] = "Byte52";
static const char acName1A00_54[] = "Byte53";
static const char acName1A00_55[] = "Byte54";
static const char acName1A00_56[] = "Byte55";
static const char acName1A00_57[] = "Byte56";
static const char acName1A00_58[] = "Byte57";
static const char acName1A00_59[] = "Byte58";
static const char acName1A00_60[] = "Byte59";
static const char acName1A00_61[] = "Byte60";
static const char acName1A00_62[] = "Byte61";
static const char acName1A00_63[] = "Byte62";
static const char acName1A00_64[] = "Byte63";
#endif
#if (BYTE_NUM > 64)
static const char acName1A00_65[] = "Byte64";
static const char acName1A00_66[] = "Byte65";
static const char acName1A00_67[] = "Byte66";
static const char acName1A00_68[] = "Byte67";
static const char acName1A00_69[] = "Byte68";
static const char acName1A00_70[] = "Byte69";
static const char acName1A00_71[] = "Byte70";
static const char acName1A00_72[] = "Byte71";
static const char acName1A00_73[] = "Byte72";
static const char acName1A00_74[] = "Byte73";
static const char acName1A00_75[] = "Byte74";
static const char acName1A00_76[] = "Byte75";
static const char acName1A00_77[] = "Byte76";
static const char acName1A00_78[] = "Byte77";
static const char acName1A00_79[] = "Byte78";
static const char acName1A00_80[] = "Byte79";
static const char acName1A00_81[] = "Byte80";
static const char acName1A00_82[] = "Byte81";
static const char acName1A00_83[] = "Byte82";
static const char acName1A00_84[] = "Byte83";
static const char acName1A00_85[] = "Byte84";
static const char acName1A00_86[] = "Byte85";
static const char acName1A00_87[] = "Byte86";
static const char acName1A00_88[] = "Byte87";
static const char acName1A00_89[] = "Byte88";
static const char acName1A00_90[] = "Byte89";
static const char acName1A00_91[] = "Byte90";
static const char acName1A00_92[] = "Byte91";
static const char acName1A00_93[] = "Byte92";
static const char acName1A00_94[] = "Byte93";
static const char acName1A00_95[] = "Byte94";
static const char acName1A00_96[] = "Byte95";
static const char acName1A00_97[] = "Byte96";
static const char acName1A00_98[] = "Byte97";
static const char acName1A00_99[] = "Byte98";
static const char acName1A00_100[] = "Byte99";
static const char acName1A00_101[] = "Byte100";
static const char acName1A00_102[] = "Byte101";
static const char acName1A00_103[] = "Byte102";
static const char acName1A00_104[] = "Byte103";
static const char acName1A00_105[] = "Byte104";
static const char acName1A00_106[] = "Byte105";
static const char acName1A00_107[] = "Byte106";
static const char acName1A00_108[] = "Byte107";
static const char acName1A00_109[] = "Byte108";
static const char acName1A00_110[] = "Byte109";
static const char acName1A00_111[] = "Byte110";
static const char acName1A00_112[] = "Byte111";
static const char acName1A00_113[] = "Byte112";
static const char acName1A00_114[] = "Byte113";
static const char acName1A00_115[] = "Byte114";
static const char acName1A00_116[] = "Byte115";
static const char acName1A00_117[] = "Byte116";
static const char acName1A00_118[] = "Byte117";
static const char acName1A00_119[] = "Byte118";
static const char acName1A00_120[] = "Byte119";
static const char acName1A00_121[] = "Byte120";
static const char acName1A00_122[] = "Byte121";
static const char acName1A00_123[] = "Byte122";
static const char acName1A00_124[] = "Byte123";
static const char acName1A00_125[] = "Byte124";
static const char acName1A00_126[] = "Byte125";
static const char acName1A00_127[] = "Byte126";
static const char acName1A00_128[] = "Byte127";
#endif
static const char acName1C00[] = "Sync Manager Communication type";
static const char acName1C00_00[] = "Max SubIndex";
static const char acName1C00_01[] = "Communications type SM0";
static const char acName1C00_02[] = "Communications type SM1";
static const char acName1C00_03[] = "Communications type SM2";
static const char acName1C00_04[] = "Communications type SM3";
static const char acName1C10[] = "Sync Manager 0 PDO Assignment";
static const char acName1C10_00[] = "Max SubIndex";
static const char acName1C10_01[] = "PDO Mapping";
static const char acName1C11[] = "Sync Manager 1 PDO Assignment";
static const char acName1C11_00[] = "Max SubIndex";
static const char acName1C11_01[] = "PDO Mapping";
static const char acName6000[] = "Inputs";
static const char acName6000_00[] = "Max SubIndex";
static const char acName7000[] = "Outputs";
static const char acName7000_00[] = "Max SubIndex";
const _objd SDO1000[] =
{
{0x0, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1000, 0x00000000, NULL},
};
const _objd SDO1008[] =
{
{0x0, DTYPE_VISIBLE_STRING, 88, ATYPE_RO, acName1008, 0, DEVICE_NAME},
};
const _objd SDO1009[] =
{
{0x0, DTYPE_VISIBLE_STRING, 0, ATYPE_RO, acName1009, 0, HW_REV},
};
const _objd SDO100A[] =
{
{0x0, DTYPE_VISIBLE_STRING, 0, ATYPE_RO, acName100A, 0, SW_REV},
};
const _objd SDO1018[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1018_00, 4, NULL},
#ifdef DEVICE_EASYCAT
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_01, 0x0000079A, NULL},
{0x02, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_02, 0x00DEFEDE, NULL},
{0x03, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_03, 0x00005A01, NULL},
{0x04, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_04, 0x00000000, NULL},
#else
#ifdef DEVICE_ETHERC
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_01, 0x00534745, NULL},
{0x02, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_02, 0x00001010, NULL},
{0x03, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_03, 0x00000008, NULL},
{0x04, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_04, 0x00000000, NULL},
#else
{0x01, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_01, 0x00000000, NULL},
{0x02, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_02, 0x00000000, NULL},
{0x03, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_03, 0x00000000, NULL},
{0x04, DTYPE_UNSIGNED32, 32, ATYPE_RO, acName1018_04, 0x00000000, NULL},
#endif
#endif
};
const _objd SDO1600[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_00, BYTE_NUM, NULL},
{0x01, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_01, 0x70000108, NULL},
{0x02, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_02, 0x70000208, NULL},
{0x03, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_03, 0x70000308, NULL},
{0x04, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_04, 0x70000408, NULL},
{0x05, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_05, 0x70000508, NULL},
{0x06, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_06, 0x70000608, NULL},
{0x07, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_07, 0x70000708, NULL},
{0x08, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_08, 0x70000808, NULL},
{0x09, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_09, 0x70000908, NULL},
{0x0A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_10, 0x70000A08, NULL},
{0x0B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_11, 0x70000B08, NULL},
{0x0C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_12, 0x70000C08, NULL},
{0x0D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_13, 0x70000D08, NULL},
{0x0E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_14, 0x70000E08, NULL},
{0x0F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_15, 0x70000D08, NULL},
{0x10, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_16, 0x70001008, NULL},
#if (BYTE_NUM > 16)
{0x11, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_17, 0x70001108, NULL},
{0x12, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_18, 0x70001208, NULL},
{0x13, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_19, 0x70001308, NULL},
{0x14, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_20, 0x70001408, NULL},
{0x15, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_21, 0x70001508, NULL},
{0x16, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_22, 0x70001608, NULL},
{0x17, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_23, 0x70001708, NULL},
{0x18, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_24, 0x70001808, NULL},
{0x19, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_25, 0x70001908, NULL},
{0x1A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_26, 0x70001A08, NULL},
{0x1B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_27, 0x70001B08, NULL},
{0x1C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_28, 0x70001C08, NULL},
{0x1D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_29, 0x70001D08, NULL},
{0x1E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_30, 0x70001E08, NULL},
{0x1F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_31, 0x70001F08, NULL},
{0x20, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_32, 0x70002008, NULL},
#endif
#if (BYTE_NUM > 32)
{0x21, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_33, 0x70002108, NULL},
{0x22, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_34, 0x70002208, NULL},
{0x23, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_35, 0x70002308, NULL},
{0x24, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_36, 0x70002408, NULL},
{0x25, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_37, 0x70002508, NULL},
{0x26, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_38, 0x70002608, NULL},
{0x27, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_39, 0x70002708, NULL},
{0x28, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_40, 0x70002808, NULL},
{0x29, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_41, 0x70002908, NULL},
{0x2A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_42, 0x70002A08, NULL},
{0x2B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_43, 0x70002B08, NULL},
{0x2C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_44, 0x70002C08, NULL},
{0x2D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_45, 0x70002D08, NULL},
{0x2E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_46, 0x70002E08, NULL},
{0x2F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_47, 0x70002F08, NULL},
{0x30, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_48, 0x70003008, NULL},
{0x31, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_49, 0x70003108, NULL},
{0x32, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_50, 0x70003208, NULL},
{0x33, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_51, 0x70003308, NULL},
{0x34, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_52, 0x70003408, NULL},
{0x35, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_53, 0x70003508, NULL},
{0x36, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_54, 0x70003608, NULL},
{0x37, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_55, 0x70003708, NULL},
{0x38, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_56, 0x70003808, NULL},
{0x39, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_57, 0x70003908, NULL},
{0x3A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_58, 0x70003A08, NULL},
{0x3B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_59, 0x70003B08, NULL},
{0x3C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_60, 0x70003C08, NULL},
{0x3D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_61, 0x70003D08, NULL},
{0x3E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_62, 0x70003E08, NULL},
{0x3F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_63, 0x70003F08, NULL},
{0x40, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_64, 0x70004008, NULL},
#endif
#if (BYTE_NUM > 64)
{0x41, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_65, 0x70004108, NULL},
{0x42, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_66, 0x70004208, NULL},
{0x43, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_67, 0x70004308, NULL},
{0x44, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_68, 0x70004408, NULL},
{0x45, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_69, 0x70004508, NULL},
{0x46, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_70, 0x70004608, NULL},
{0x47, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_71, 0x70004708, NULL},
{0x48, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_72, 0x70004808, NULL},
{0x49, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_73, 0x70004908, NULL},
{0x4A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_74, 0x70004A08, NULL},
{0x4B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_75, 0x70004B08, NULL},
{0x4C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_76, 0x70004C08, NULL},
{0x4D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_77, 0x70004D08, NULL},
{0x4E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_78, 0x70004E08, NULL},
{0x4F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_79, 0x70004F08, NULL},
{0x50, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_80, 0x70005008, NULL},
{0x51, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_81, 0x70005108, NULL},
{0x52, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_82, 0x70005208, NULL},
{0x53, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_83, 0x70005308, NULL},
{0x54, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_84, 0x70005408, NULL},
{0x55, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_85, 0x70005508, NULL},
{0x56, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_86, 0x70005608, NULL},
{0x57, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_87, 0x70005708, NULL},
{0x58, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_88, 0x70005808, NULL},
{0x59, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_89, 0x70005908, NULL},
{0x5A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_90, 0x70005A08, NULL},
{0x5B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_91, 0x70005B08, NULL},
{0x5C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_92, 0x70005C08, NULL},
{0x5D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_93, 0x70005D08, NULL},
{0x5E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_94, 0x70005E08, NULL},
{0x5F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_95, 0x70005F08, NULL},
{0x60, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_96, 0x70006008, NULL},
{0x61, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_97, 0x70006108, NULL},
{0x62, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_98, 0x70006208, NULL},
{0x63, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_99, 0x70006308, NULL},
{0x64, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_100, 0x70006408, NULL},
{0x65, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_101, 0x70006508, NULL},
{0x66, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_102, 0x70006608, NULL},
{0x67, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_103, 0x70006708, NULL},
{0x68, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_104, 0x70006808, NULL},
{0x69, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_105, 0x70006908, NULL},
{0x6A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_106, 0x70006A08, NULL},
{0x6B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_107, 0x70006B08, NULL},
{0x6C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_108, 0x70006C08, NULL},
{0x6D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_109, 0x70006D08, NULL},
{0x6E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_110, 0x70006E08, NULL},
{0x6F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_111, 0x70006F08, NULL},
{0x70, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_112, 0x70007008, NULL},
{0x71, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_113, 0x70007108, NULL},
{0x72, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_114, 0x70007208, NULL},
{0x73, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_115, 0x70007308, NULL},
{0x74, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_116, 0x70007408, NULL},
{0x75, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_117, 0x70007508, NULL},
{0x76, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_118, 0x70007608, NULL},
{0x77, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_119, 0x70007708, NULL},
{0x78, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_120, 0x70007808, NULL},
{0x79, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_121, 0x70007908, NULL},
{0x7A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_122, 0x70007A08, NULL},
{0x7B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_123, 0x70007B08, NULL},
{0x7C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_124, 0x70007C08, NULL},
{0x7D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_125, 0x70007D08, NULL},
{0x7E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_126, 0x70007E08, NULL},
{0x7F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_127, 0x70007F08, NULL},
{0x80, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1600_128, 0x70008008, NULL},
#endif
};
const _objd SDO1A00[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_00, BYTE_NUM, NULL},
{0x01, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_01, 0x60000108, NULL},
{0x02, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_02, 0x60000208, NULL},
{0x03, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_03, 0x60000308, NULL},
{0x04, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_04, 0x60000408, NULL},
{0x05, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_05, 0x60000508, NULL},
{0x06, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_06, 0x60000608, NULL},
{0x07, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_07, 0x60000708, NULL},
{0x08, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_08, 0x60000808, NULL},
{0x09, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_09, 0x60000908, NULL},
{0x0A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_10, 0x60000A08, NULL},
{0x0B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_11, 0x60000B08, NULL},
{0x0C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_12, 0x60000C08, NULL},
{0x0D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_13, 0x60000D08, NULL},
{0x0E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_14, 0x60000E08, NULL},
{0x0F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_15, 0x60000D08, NULL},
{0x10, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_16, 0x60001008, NULL},
#if (BYTE_NUM > 16)
{0x11, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_17, 0x60001108, NULL},
{0x12, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_18, 0x60001208, NULL},
{0x13, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_19, 0x60001308, NULL},
{0x14, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_20, 0x60001408, NULL},
{0x15, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_21, 0x60001508, NULL},
{0x16, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_22, 0x60001608, NULL},
{0x17, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_23, 0x60001708, NULL},
{0x18, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_24, 0x60001808, NULL},
{0x19, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_25, 0x60001908, NULL},
{0x1A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_26, 0x60001A08, NULL},
{0x1B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_27, 0x60001B08, NULL},
{0x1C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_28, 0x60001C08, NULL},
{0x1D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_29, 0x60001D08, NULL},
{0x1E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_30, 0x60001E08, NULL},
{0x1F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_31, 0x60001F08, NULL},
{0x20, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_32, 0x60002008, NULL},
#endif
#if (BYTE_NUM > 32)
{0x21, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_33, 0x60002108, NULL},
{0x22, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_34, 0x60002208, NULL},
{0x23, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_35, 0x60002308, NULL},
{0x24, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_36, 0x60002408, NULL},
{0x25, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_37, 0x60002508, NULL},
{0x26, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_38, 0x60002608, NULL},
{0x27, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_39, 0x60002708, NULL},
{0x28, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_40, 0x60002808, NULL},
{0x29, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_41, 0x60002908, NULL},
{0x2A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_42, 0x60002A08, NULL},
{0x2B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_43, 0x60002B08, NULL},
{0x2C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_44, 0x60002C08, NULL},
{0x2D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_45, 0x60002D08, NULL},
{0x2E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_46, 0x60002E08, NULL},
{0x2F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_47, 0x60002F08, NULL},
{0x30, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_48, 0x60003008, NULL},
{0x31, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_49, 0x60003108, NULL},
{0x32, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_50, 0x60003208, NULL},
{0x33, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_51, 0x60003308, NULL},
{0x34, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_52, 0x60003408, NULL},
{0x35, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_53, 0x60003508, NULL},
{0x36, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_54, 0x60003608, NULL},
{0x37, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_55, 0x60003708, NULL},
{0x38, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_56, 0x60003808, NULL},
{0x39, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_57, 0x60003908, NULL},
{0x3A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_58, 0x60003A08, NULL},
{0x3B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_59, 0x60003B08, NULL},
{0x3C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_60, 0x60003C08, NULL},
{0x3D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_61, 0x60003D08, NULL},
{0x3E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_62, 0x60003E08, NULL},
{0x3F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_63, 0x60003F08, NULL},
{0x40, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_64, 0x60004008, NULL},
#endif
#if (BYTE_NUM > 64)
{0x41, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_65, 0x60004108, NULL},
{0x42, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_66, 0x60004208, NULL},
{0x43, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_67, 0x60004308, NULL},
{0x44, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_68, 0x60004408, NULL},
{0x45, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_69, 0x60004508, NULL},
{0x46, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_70, 0x60004608, NULL},
{0x47, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_71, 0x60004708, NULL},
{0x48, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_72, 0x60004808, NULL},
{0x49, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_73, 0x60004908, NULL},
{0x4A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_74, 0x60004A08, NULL},
{0x4B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_75, 0x60004B08, NULL},
{0x4C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_76, 0x60004C08, NULL},
{0x4D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_77, 0x60004D08, NULL},
{0x4E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_78, 0x60004E08, NULL},
{0x4F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_79, 0x60004F08, NULL},
{0x50, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_80, 0x60005008, NULL},
{0x51, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_81, 0x60005108, NULL},
{0x52, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_82, 0x60005208, NULL},
{0x53, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_83, 0x60005308, NULL},
{0x54, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_84, 0x60005408, NULL},
{0x55, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_85, 0x60005508, NULL},
{0x56, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_86, 0x60005608, NULL},
{0x57, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_87, 0x60005708, NULL},
{0x58, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_88, 0x60005808, NULL},
{0x59, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_89, 0x60005908, NULL},
{0x5A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_90, 0x60005A08, NULL},
{0x5B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_91, 0x60005B08, NULL},
{0x5C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_92, 0x60005C08, NULL},
{0x5D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_93, 0x60005D08, NULL},
{0x5E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_94, 0x60005E08, NULL},
{0x5F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_95, 0x60005F08, NULL},
{0x60, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_96, 0x60006008, NULL},
{0x61, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_97, 0x60006108, NULL},
{0x62, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_98, 0x60006208, NULL},
{0x63, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_99, 0x60006308, NULL},
{0x64, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_100, 0x60006408, NULL},
{0x65, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_101, 0x60006508, NULL},
{0x66, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_102, 0x60006608, NULL},
{0x67, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_103, 0x60006708, NULL},
{0x68, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_104, 0x60006808, NULL},
{0x69, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_105, 0x60006908, NULL},
{0x6A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_106, 0x60006A08, NULL},
{0x6B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_107, 0x60006B08, NULL},
{0x6C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_108, 0x60006C08, NULL},
{0x6D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_109, 0x60006D08, NULL},
{0x6E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_110, 0x60006E08, NULL},
{0x6F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_111, 0x60006F08, NULL},
{0x70, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_112, 0x60007008, NULL},
{0x71, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_113, 0x60007108, NULL},
{0x72, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_114, 0x60007208, NULL},
{0x73, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_115, 0x60007308, NULL},
{0x74, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_116, 0x60007408, NULL},
{0x75, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_117, 0x60007508, NULL},
{0x76, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_118, 0x60007608, NULL},
{0x77, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_119, 0x60007708, NULL},
{0x78, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_120, 0x60007808, NULL},
{0x79, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_121, 0x60007908, NULL},
{0x7A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_122, 0x60007A08, NULL},
{0x7B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_123, 0x60007B08, NULL},
{0x7C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_124, 0x60007C08, NULL},
{0x7D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_125, 0x60007D08, NULL},
{0x7E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_126, 0x60007E08, NULL},
{0x7F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_127, 0x60007F08, NULL},
{0x80, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_128, 0x60008008, NULL},
#endif
};
const _objd SDO1C00[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C00_00, 4, NULL},
{0x01, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C00_01, 3, NULL},
{0x02, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C00_02, 4, NULL},
{0x03, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C00_03, 0, NULL},
{0x04, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C00_04, 0, NULL},
};
const _objd SDO1C10[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C10_00, 1, NULL},
{0x01, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C10_01, 0x1600, NULL},
};
const _objd SDO1C11[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1C11_00, 1, NULL},
{0x01, DTYPE_UNSIGNED16, 16, ATYPE_RO, acName1C11_01, 0x1A00, NULL},
};
const _objd SDO6000[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName6000_00, BYTE_NUM, NULL},
{0x01, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_01, 0x00 , &(Obj.txpdo[0])},
{0x02, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_02, 0x00 , &(Obj.txpdo[1])},
{0x03, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_03, 0x00 , &(Obj.txpdo[2])},
{0x04, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_04, 0x00 , &(Obj.txpdo[3])},
{0x05, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_05, 0x00 , &(Obj.txpdo[4])},
{0x06, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_06, 0x00 , &(Obj.txpdo[5])},
{0x07, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_07, 0x00 , &(Obj.txpdo[6])},
{0x08, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_08, 0x00 , &(Obj.txpdo[7])},
{0x09, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_09, 0x00 , &(Obj.txpdo[8])},
{0x0A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_10, 0x00 , &(Obj.txpdo[9])},
{0x0B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_11, 0x00 , &(Obj.txpdo[10])},
{0x0C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_12, 0x00 , &(Obj.txpdo[11])},
{0x0D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_13, 0x00 , &(Obj.txpdo[12])},
{0x0E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_14, 0x00 , &(Obj.txpdo[13])},
{0x0F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_15, 0x00 , &(Obj.txpdo[14])},
{0x10, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_16, 0x00 , &(Obj.txpdo[15])},
#if (BYTE_NUM > 16)
{0x11, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_17, 0x00 , &(Obj.txpdo[16])},
{0x12, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_18, 0x00 , &(Obj.txpdo[17])},
{0x13, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_19, 0x00 , &(Obj.txpdo[18])},
{0x14, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_20, 0x00 , &(Obj.txpdo[19])},
{0x15, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_21, 0x00 , &(Obj.txpdo[20])},
{0x16, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_22, 0x00 , &(Obj.txpdo[21])},
{0x17, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_23, 0x00 , &(Obj.txpdo[22])},
{0x18, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_24, 0x00 , &(Obj.txpdo[23])},
{0x19, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_25, 0x00 , &(Obj.txpdo[24])},
{0x1A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_26, 0x00 , &(Obj.txpdo[25])},
{0x1B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_27, 0x00 , &(Obj.txpdo[26])},
{0x1C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_28, 0x00 , &(Obj.txpdo[27])},
{0x1D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_29, 0x00 , &(Obj.txpdo[28])},
{0x1E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_30, 0x00 , &(Obj.txpdo[29])},
{0x1F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_31, 0x00 , &(Obj.txpdo[30])},
{0x20, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_32, 0x00 , &(Obj.txpdo[31])},
#endif
#if (BYTE_NUM > 32)
{0x21, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_33, 0x00 , &(Obj.txpdo[32])},
{0x22, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_34, 0x00 , &(Obj.txpdo[33])},
{0x23, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_35, 0x00 , &(Obj.txpdo[34])},
{0x24, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_36, 0x00 , &(Obj.txpdo[35])},
{0x25, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_37, 0x00 , &(Obj.txpdo[36])},
{0x26, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_38, 0x00 , &(Obj.txpdo[37])},
{0x27, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_39, 0x00 , &(Obj.txpdo[38])},
{0x28, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_40, 0x00 , &(Obj.txpdo[39])},
{0x29, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_41, 0x00 , &(Obj.txpdo[40])},
{0x2A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_42, 0x00 , &(Obj.txpdo[41])},
{0x2B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_43, 0x00 , &(Obj.txpdo[42])},
{0x2C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_44, 0x00 , &(Obj.txpdo[43])},
{0x2D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_45, 0x00 , &(Obj.txpdo[44])},
{0x2E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_46, 0x00 , &(Obj.txpdo[45])},
{0x2F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_47, 0x00 , &(Obj.txpdo[46])},
{0x30, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_48, 0x00 , &(Obj.txpdo[47])},
{0x31, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_49, 0x00 , &(Obj.txpdo[48])},
{0x32, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_50, 0x00 , &(Obj.txpdo[49])},
{0x33, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_51, 0x00 , &(Obj.txpdo[50])},
{0x34, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_52, 0x00 , &(Obj.txpdo[51])},
{0x35, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_53, 0x00 , &(Obj.txpdo[52])},
{0x36, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_54, 0x00 , &(Obj.txpdo[53])},
{0x37, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_55, 0x00 , &(Obj.txpdo[54])},
{0x38, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_56, 0x00 , &(Obj.txpdo[55])},
{0x39, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_57, 0x00 , &(Obj.txpdo[56])},
{0x3A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_58, 0x00 , &(Obj.txpdo[57])},
{0x3B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_59, 0x00 , &(Obj.txpdo[58])},
{0x3C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_60, 0x00 , &(Obj.txpdo[59])},
{0x3D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_61, 0x00 , &(Obj.txpdo[60])},
{0x3E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_62, 0x00 , &(Obj.txpdo[61])},
{0x3F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_63, 0x00 , &(Obj.txpdo[62])},
{0x40, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_64, 0x00 , &(Obj.txpdo[63])},
#endif
#if (BYTE_NUM > 64)
{0x41, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_65, 0x00 , &(Obj.txpdo[64])},
{0x42, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_66, 0x00 , &(Obj.txpdo[65])},
{0x43, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_67, 0x00 , &(Obj.txpdo[66])},
{0x44, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_68, 0x00 , &(Obj.txpdo[67])},
{0x45, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_69, 0x00 , &(Obj.txpdo[68])},
{0x46, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_70, 0x00 , &(Obj.txpdo[69])},
{0x47, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_71, 0x00 , &(Obj.txpdo[70])},
{0x48, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_72, 0x00 , &(Obj.txpdo[71])},
{0x49, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_73, 0x00 , &(Obj.txpdo[72])},
{0x4A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_74, 0x00 , &(Obj.txpdo[73])},
{0x4B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_75, 0x00 , &(Obj.txpdo[74])},
{0x4C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_76, 0x00 , &(Obj.txpdo[75])},
{0x4D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_77, 0x00 , &(Obj.txpdo[76])},
{0x4E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_78, 0x00 , &(Obj.txpdo[77])},
{0x4F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_79, 0x00 , &(Obj.txpdo[78])},
{0x50, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_80, 0x00 , &(Obj.txpdo[79])},
{0x51, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_81, 0x00 , &(Obj.txpdo[80])},
{0x52, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_82, 0x00 , &(Obj.txpdo[81])},
{0x53, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_83, 0x00 , &(Obj.txpdo[82])},
{0x54, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_84, 0x00 , &(Obj.txpdo[83])},
{0x55, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_85, 0x00 , &(Obj.txpdo[84])},
{0x56, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_86, 0x00 , &(Obj.txpdo[85])},
{0x57, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_87, 0x00 , &(Obj.txpdo[86])},
{0x58, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_88, 0x00 , &(Obj.txpdo[87])},
{0x59, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_89, 0x00 , &(Obj.txpdo[88])},
{0x5A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_90, 0x00 , &(Obj.txpdo[89])},
{0x5B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_91, 0x00 , &(Obj.txpdo[90])},
{0x5C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_92, 0x00 , &(Obj.txpdo[91])},
{0x5D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_93, 0x00 , &(Obj.txpdo[92])},
{0x5E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_94, 0x00 , &(Obj.txpdo[93])},
{0x5F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_95, 0x00 , &(Obj.txpdo[94])},
{0x60, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_96, 0x00 , &(Obj.txpdo[95])},
{0x61, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_97, 0x00 , &(Obj.txpdo[96])},
{0x62, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_98, 0x00 , &(Obj.txpdo[97])},
{0x63, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_99, 0x00 , &(Obj.txpdo[98])},
{0x64, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_100, 0x00 , &(Obj.txpdo[99])},
{0x65, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_101, 0x00 , &(Obj.txpdo[100])},
{0x66, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_102, 0x00 , &(Obj.txpdo[101])},
{0x67, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_103, 0x00 , &(Obj.txpdo[102])},
{0x68, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_104, 0x00 , &(Obj.txpdo[103])},
{0x69, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_105, 0x00 , &(Obj.txpdo[104])},
{0x6A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_106, 0x00 , &(Obj.txpdo[105])},
{0x6B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_107, 0x00 , &(Obj.txpdo[106])},
{0x6C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_108, 0x00 , &(Obj.txpdo[107])},
{0x6D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_109, 0x00 , &(Obj.txpdo[108])},
{0x6E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_110, 0x00 , &(Obj.txpdo[109])},
{0x6F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_111, 0x00 , &(Obj.txpdo[110])},
{0x70, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_112, 0x00 , &(Obj.txpdo[111])},
{0x71, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_113, 0x00 , &(Obj.txpdo[112])},
{0x72, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_114, 0x00 , &(Obj.txpdo[113])},
{0x73, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_115, 0x00 , &(Obj.txpdo[114])},
{0x74, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_116, 0x00 , &(Obj.txpdo[115])},
{0x75, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_117, 0x00 , &(Obj.txpdo[116])},
{0x76, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_118, 0x00 , &(Obj.txpdo[117])},
{0x77, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_119, 0x00 , &(Obj.txpdo[118])},
{0x78, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_120, 0x00 , &(Obj.txpdo[119])},
{0x79, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_121, 0x00 , &(Obj.txpdo[120])},
{0x7A, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_122, 0x00 , &(Obj.txpdo[121])},
{0x7B, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_123, 0x00 , &(Obj.txpdo[122])},
{0x7C, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_124, 0x00 , &(Obj.txpdo[123])},
{0x7D, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_125, 0x00 , &(Obj.txpdo[124])},
{0x7E, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_126, 0x00 , &(Obj.txpdo[125])},
{0x7F, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_127, 0x00 , &(Obj.txpdo[126])},
{0x80, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName1A00_128, 0x00 , &(Obj.txpdo[127])},
#endif
};
const _objd SDO7000[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, acName7000_00, BYTE_NUM, NULL},
{0x01, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_01, 0x00, &(Obj.rxpdo[0])},
{0x02, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_02, 0x00, &(Obj.rxpdo[1])},
{0x03, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_03, 0x00, &(Obj.rxpdo[2])},
{0x04, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_04, 0x00, &(Obj.rxpdo[3])},
{0x05, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_05, 0x00, &(Obj.rxpdo[4])},
{0x06, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_06, 0x00, &(Obj.rxpdo[5])},
{0x07, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_07, 0x00, &(Obj.rxpdo[6])},
{0x08, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_08, 0x00, &(Obj.rxpdo[7])},
{0x09, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_09, 0x00, &(Obj.rxpdo[8])},
{0x0A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_10, 0x00, &(Obj.rxpdo[9])},
{0x0B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_11, 0x00, &(Obj.rxpdo[10])},
{0x0C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_12, 0x00, &(Obj.rxpdo[11])},
{0x0D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_13, 0x00, &(Obj.rxpdo[12])},
{0x0E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_14, 0x00, &(Obj.rxpdo[13])},
{0x0F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_15, 0x00, &(Obj.rxpdo[14])},
{0x10, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_16, 0x00, &(Obj.rxpdo[15])},
#if (BYTE_NUM > 16)
{0x11, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_17, 0x00, &(Obj.rxpdo[16])},
{0x12, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_18, 0x00, &(Obj.rxpdo[17])},
{0x13, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_19, 0x00, &(Obj.rxpdo[18])},
{0x14, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_20, 0x00, &(Obj.rxpdo[19])},
{0x15, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_21, 0x00, &(Obj.rxpdo[20])},
{0x16, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_22, 0x00, &(Obj.rxpdo[21])},
{0x17, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_23, 0x00, &(Obj.rxpdo[22])},
{0x18, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_24, 0x00, &(Obj.rxpdo[23])},
{0x19, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_25, 0x00, &(Obj.rxpdo[24])},
{0x1A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_26, 0x00, &(Obj.rxpdo[25])},
{0x1B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_27, 0x00, &(Obj.rxpdo[26])},
{0x1C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_28, 0x00, &(Obj.rxpdo[27])},
{0x1D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_29, 0x00, &(Obj.rxpdo[28])},
{0x1E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_30, 0x00, &(Obj.rxpdo[29])},
{0x1F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_31, 0x00, &(Obj.rxpdo[30])},
{0x20, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_32, 0x00, &(Obj.rxpdo[31])},
#endif
#if (BYTE_NUM > 32)
{0x21, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_33, 0x00, &(Obj.rxpdo[32])},
{0x22, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_34, 0x00, &(Obj.rxpdo[33])},
{0x23, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_35, 0x00, &(Obj.rxpdo[34])},
{0x24, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_36, 0x00, &(Obj.rxpdo[35])},
{0x25, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_37, 0x00, &(Obj.rxpdo[36])},
{0x26, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_38, 0x00, &(Obj.rxpdo[37])},
{0x27, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_39, 0x00, &(Obj.rxpdo[38])},
{0x28, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_40, 0x00, &(Obj.rxpdo[39])},
{0x29, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_41, 0x00, &(Obj.rxpdo[40])},
{0x2A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_42, 0x00, &(Obj.rxpdo[41])},
{0x2B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_43, 0x00, &(Obj.rxpdo[42])},
{0x2C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_44, 0x00, &(Obj.rxpdo[43])},
{0x2D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_45, 0x00, &(Obj.rxpdo[44])},
{0x2E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_46, 0x00, &(Obj.rxpdo[45])},
{0x2F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_47, 0x00, &(Obj.rxpdo[46])},
{0x30, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_48, 0x00, &(Obj.rxpdo[47])},
{0x31, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_49, 0x00, &(Obj.rxpdo[48])},
{0x32, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_50, 0x00, &(Obj.rxpdo[49])},
{0x33, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_51, 0x00, &(Obj.rxpdo[50])},
{0x34, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_52, 0x00, &(Obj.rxpdo[51])},
{0x35, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_53, 0x00, &(Obj.rxpdo[52])},
{0x36, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_54, 0x00, &(Obj.rxpdo[53])},
{0x37, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_55, 0x00, &(Obj.rxpdo[54])},
{0x38, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_56, 0x00, &(Obj.rxpdo[55])},
{0x39, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_57, 0x00, &(Obj.rxpdo[56])},
{0x3A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_58, 0x00, &(Obj.rxpdo[57])},
{0x3B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_59, 0x00, &(Obj.rxpdo[58])},
{0x3C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_60, 0x00, &(Obj.rxpdo[59])},
{0x3D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_61, 0x00, &(Obj.rxpdo[60])},
{0x3E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_62, 0x00, &(Obj.rxpdo[61])},
{0x3F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_63, 0x00, &(Obj.rxpdo[62])},
{0x40, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_64, 0x00, &(Obj.rxpdo[63])},
#endif
#if (BYTE_NUM > 64)
{0x41, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_65, 0x00, &(Obj.rxpdo[64])},
{0x42, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_66, 0x00, &(Obj.rxpdo[65])},
{0x43, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_67, 0x00, &(Obj.rxpdo[66])},
{0x44, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_68, 0x00, &(Obj.rxpdo[67])},
{0x45, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_69, 0x00, &(Obj.rxpdo[68])},
{0x46, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_70, 0x00, &(Obj.rxpdo[69])},
{0x47, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_71, 0x00, &(Obj.rxpdo[70])},
{0x48, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_72, 0x00, &(Obj.rxpdo[71])},
{0x49, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_73, 0x00, &(Obj.rxpdo[72])},
{0x4A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_74, 0x00, &(Obj.rxpdo[73])},
{0x4B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_75, 0x00, &(Obj.rxpdo[74])},
{0x4C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_76, 0x00, &(Obj.rxpdo[75])},
{0x4D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_77, 0x00, &(Obj.rxpdo[76])},
{0x4E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_78, 0x00, &(Obj.rxpdo[77])},
{0x4F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_79, 0x00, &(Obj.rxpdo[78])},
{0x50, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_80, 0x00, &(Obj.rxpdo[79])},
{0x51, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_81, 0x00, &(Obj.rxpdo[80])},
{0x52, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_82, 0x00, &(Obj.rxpdo[81])},
{0x53, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_83, 0x00, &(Obj.rxpdo[82])},
{0x54, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_84, 0x00, &(Obj.rxpdo[83])},
{0x55, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_85, 0x00, &(Obj.rxpdo[84])},
{0x56, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_86, 0x00, &(Obj.rxpdo[85])},
{0x57, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_87, 0x00, &(Obj.rxpdo[86])},
{0x58, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_88, 0x00, &(Obj.rxpdo[87])},
{0x59, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_89, 0x00, &(Obj.rxpdo[88])},
{0x5A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_90, 0x00, &(Obj.rxpdo[89])},
{0x5B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_91, 0x00, &(Obj.rxpdo[90])},
{0x5C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_92, 0x00, &(Obj.rxpdo[91])},
{0x5D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_93, 0x00, &(Obj.rxpdo[92])},
{0x5E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_94, 0x00, &(Obj.rxpdo[93])},
{0x5F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_95, 0x00, &(Obj.rxpdo[94])},
{0x60, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_96, 0x00, &(Obj.rxpdo[95])},
{0x61, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_97, 0x00, &(Obj.rxpdo[96])},
{0x62, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_98, 0x00, &(Obj.rxpdo[97])},
{0x63, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_99, 0x00, &(Obj.rxpdo[98])},
{0x64, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_100, 0x00, &(Obj.rxpdo[99])},
{0x65, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_101, 0x00, &(Obj.rxpdo[100])},
{0x66, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_102, 0x00, &(Obj.rxpdo[101])},
{0x67, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_103, 0x00, &(Obj.rxpdo[102])},
{0x68, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_104, 0x00, &(Obj.rxpdo[103])},
{0x69, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_105, 0x00, &(Obj.rxpdo[104])},
{0x6A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_106, 0x00, &(Obj.rxpdo[105])},
{0x6B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_107, 0x00, &(Obj.rxpdo[106])},
{0x6C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_108, 0x00, &(Obj.rxpdo[107])},
{0x6D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_109, 0x00, &(Obj.rxpdo[108])},
{0x6E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_110, 0x00, &(Obj.rxpdo[109])},
{0x6F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_111, 0x00, &(Obj.rxpdo[110])},
{0x70, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_112, 0x00, &(Obj.rxpdo[111])},
{0x71, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_113, 0x00, &(Obj.rxpdo[112])},
{0x72, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_114, 0x00, &(Obj.rxpdo[113])},
{0x73, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_115, 0x00, &(Obj.rxpdo[114])},
{0x74, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_116, 0x00, &(Obj.rxpdo[115])},
{0x75, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_117, 0x00, &(Obj.rxpdo[116])},
{0x76, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_118, 0x00, &(Obj.rxpdo[117])},
{0x77, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_119, 0x00, &(Obj.rxpdo[118])},
{0x78, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_120, 0x00, &(Obj.rxpdo[119])},
{0x79, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_121, 0x00, &(Obj.rxpdo[120])},
{0x7A, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_122, 0x00, &(Obj.rxpdo[121])},
{0x7B, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_123, 0x00, &(Obj.rxpdo[122])},
{0x7C, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_124, 0x00, &(Obj.rxpdo[123])},
{0x7D, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_125, 0x00, &(Obj.rxpdo[124])},
{0x7E, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_126, 0x00, &(Obj.rxpdo[125])},
{0x7F, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_127, 0x00, &(Obj.rxpdo[126])},
{0x80, DTYPE_UNSIGNED8, 8, ATYPE_RW, acName1600_128, 0x00, &(Obj.rxpdo[127])},
#endif
};
const _objectlist SDOobjects[] =
{
{0x1000, OTYPE_VAR, 0, 0, acName1000, SDO1000},
{0x1008, OTYPE_VAR, 0, 0, acName1008, SDO1008},
{0x1009, OTYPE_VAR, 0, 0, acName1009, SDO1009},
{0x100A, OTYPE_VAR, 0, 0, acName100A, SDO100A},
{0x1018, OTYPE_RECORD, 4, 0, acName1018, SDO1018},
{0x1600, OTYPE_RECORD, BYTE_NUM, 0, acName1600, SDO1600},
{0x1A00, OTYPE_RECORD, BYTE_NUM, 0, acName1A00, SDO1A00},
{0x1C00, OTYPE_ARRAY, 4, 0, acName1C00, SDO1C00},
{0x1C10, OTYPE_ARRAY, 1, 0, acName1C10, SDO1C10},
{0x1C11, OTYPE_ARRAY, 1, 0, acName1C11, SDO1C11},
{0x6000, OTYPE_RECORD, BYTE_NUM, 0, acName6000, SDO6000},
{0x7000, OTYPE_RECORD, BYTE_NUM, 0, acName7000, SDO7000},
{0xffff, 0xff, 0xff, 0xff, NULL, NULL}
};

View File

@ -0,0 +1,47 @@
#ifndef __UTYPES_H__
#define __UTYPES_H__
#include "cc.h"
#define DEVICE_EASYCAT
//#define DEVICE_ETHERC
#ifdef DEVICE_EASYCAT
#define DEVICE_NAME "EasyCAT 32+32 rev 1"
#else
#ifdef DEVICE_ETHERC
#define DEVICE_NAME "EtherBerry 32+32"
#else
#define DEVICE_NAME "Unknown"
#endif
#endif
#define BYTE_NUM 32 // or 16, 64, 128
/* Object dictionary storage */
typedef struct
{
/* Inputs */
/* Outputs */
/* Parameters */
/* Manufacturer specific data */
/* Dynamic TX PDO:s */
uint8_t txpdo[BYTE_NUM] __attribute__((aligned (8)));
/* Dynamic RX PDO:s */
uint8_t rxpdo[BYTE_NUM] __attribute__((aligned (8)));
/* Sync Managers */
} _Objects;
extern _Objects Obj;
#endif /* __UTYPES_H__ */

View File

@ -1,5 +1,5 @@
if(RPI_VARIANT)
set (SOES_DEMO applications/raspberry_lan9252demo)
set (SOES_DEMO applications/raspberry_lan9252demo_default)
set(HAL_SOURCES
${SOES_SOURCE_DIR}/soes/hal/raspberrypi-lan9252/esc_hw.c
${SOES_SOURCE_DIR}/soes/hal/raspberrypi-lan9252/esc_hw.h
@ -13,8 +13,9 @@ endif()
include_directories(
${SOES_SOURCE_DIR}/soes/include/sys/gcc
${SOES_SOURCE_DIR}/soes/hal/raspberrypi-lan9252
${SOES_SOURCE_DIR}/${SOES_DEMO}
)
# Common compile flags
add_compile_options(-Wall -Wextra -Wconversion -Wno-unused-parameter -Werror)
add_compile_options(-DESC_DEBUG -Wall -Wextra -Wconversion -Wno-unused-parameter -Werror)

View File

@ -267,6 +267,7 @@ void ecat_slv_worker (uint32_t event_mask)
/* Check the SM activation event */
ESC_sm_act_event();
#if USE_MBX
/* Check mailboxes */
while ((ESC_mbxprocess() > 0) || (ESCvar.txcue > 0))
{
@ -281,6 +282,7 @@ void ecat_slv_worker (uint32_t event_mask)
}
#if USE_EOE
ESC_eoeprocess_tx();
#endif
#endif
/* Call emulated eeprom handler if set */
if (ESCvar.esc_hw_eep_handler != NULL)
@ -311,6 +313,7 @@ void ecat_slv_poll (void)
/* Check the SM activation event */
ESC_sm_act_event();
#if USE_MBX
/* Check mailboxes */
if (ESC_mbxprocess())
{
@ -325,6 +328,7 @@ void ecat_slv_poll (void)
}
#if USE_EOE
ESC_eoeprocess_tx();
#endif
#endif
/* Call emulated eeprom handler if set */
@ -366,7 +370,7 @@ void ecat_slv_init (esc_cfg_t * config)
sizeof (ESCvar.DLstatus));
ESCvar.DLstatus = etohs (ESCvar.DLstatus);
}
#if USE_FOE
/* Init FoE */
FOE_init ();
@ -377,10 +381,16 @@ void ecat_slv_init (esc_cfg_t * config)
EOE_init ();
#endif
/* reset ESC to init state */
#if USE_EMU
ESCvar.ALstatus = ESCinit;
#else
/* Reset ESC to init state */
ESC_ALstatus (ESCinit);
#endif
ESC_ALerror (ALERR_NONE);
#if USE_MBX
ESC_stopmbx ();
#endif
ESC_stopinput ();
ESC_stopoutput ();
/* Init Object Dictionary default values */

View File

@ -35,10 +35,12 @@ void ESC_ALerror (uint16_t errornumber)
*/
void ESC_ALstatus (uint8_t status)
{
#if !(USE_EMU)
uint16_t dummy;
ESCvar.ALstatus = status;
dummy = htoes ((uint16_t) status);
ESC_write (ESCREG_ALSTATUS, &dummy, sizeof (dummy));
#endif
}
/** Write AL Status and AL Status code to the ESC.
@ -710,8 +712,8 @@ void ESC_xoeprocess (void)
uint8_t ESC_checkSM23 (uint8_t state)
{
_ESCsm2 *SM;
ESC_read (ESCREG_SM2, (void *) &ESCvar.SM[2], sizeof (ESCvar.SM[2]));
SM = (_ESCsm2 *) & ESCvar.SM[2];
ESC_read (ESCREG_SM2, (void *) &ESCvar.SM[SM2_IDX], sizeof (ESCvar.SM[SM2_IDX]));
SM = (_ESCsm2 *) & ESCvar.SM[SM2_IDX];
/* Check SM settings */
if ((etohs (SM->PSA) != ESC_SM2_sma) ||
@ -753,9 +755,8 @@ uint8_t ESC_checkSM23 (uint8_t state)
/* SM2 overlaps SM3, fail state change */
return (ESCpreop | ESCerror);
}
ESC_read (ESCREG_SM3, (void *) &ESCvar.SM[3], sizeof (ESCvar.SM[3]));
SM = (_ESCsm2 *) & ESCvar.SM[3];
ESC_read (ESCREG_SM3, (void *) &ESCvar.SM[SM3_IDX], sizeof (ESCvar.SM[SM3_IDX]));
SM = (_ESCsm2 *) & ESCvar.SM[SM3_IDX];
/* Check SM settings */
if ((etohs (SM->PSA) != ESC_SM3_sma) ||
(SM->Command != ESC_SM3_smc))
@ -809,15 +810,15 @@ uint8_t ESC_startinput (uint8_t state)
/* If inputs > 0 , enable SM3 */
if (ESCvar.ESC_SM3_sml > 0)
{
ESC_SMenable (3);
ESC_SMenable (SM3_IDX);
}
/* Go to state input regardless of any inputs present */
CC_ATOMIC_SET(ESCvar.App.state, APPSTATE_INPUT);
}
else
{
ESC_SMdisable (2);
ESC_SMdisable (3);
ESC_SMdisable (SM2_IDX);
ESC_SMdisable (SM3_IDX);
if (ESCvar.SMtestresult & SMRESULT_ERRSM3)
{
ESC_ALerror (ALERR_INVALIDINPUTSM);
@ -843,8 +844,8 @@ uint8_t ESC_startinput (uint8_t state)
ESC_ALerror (dc_check_result);
state = (ESCpreop | ESCerror);
ESC_SMdisable (2);
ESC_SMdisable (3);
ESC_SMdisable (SM2_IDX);
ESC_SMdisable (SM3_IDX);
CC_ATOMIC_SET(ESCvar.App.state, APPSTATE_IDLE);
}
else
@ -881,8 +882,8 @@ uint8_t ESC_startinput (uint8_t state)
void ESC_stopinput (void)
{
CC_ATOMIC_SET(ESCvar.App.state, APPSTATE_IDLE);
ESC_SMdisable (3);
ESC_SMdisable (2);
ESC_SMdisable (SM3_IDX);
ESC_SMdisable (SM2_IDX);
/* Call interrupt disable hook case it have been configured */
if ((ESCvar.use_interrupt != 0) &&
@ -904,11 +905,10 @@ void ESC_stopinput (void)
*/
uint8_t ESC_startoutput (uint8_t state)
{
/* If outputs > 0 , enable SM2 */
if (ESCvar.ESC_SM2_sml > 0)
{
ESC_SMenable (2);
ESC_SMenable (SM2_IDX);
}
/* Go to state output regardless of any outputs present */
CC_ATOMIC_OR(ESCvar.App.state, APPSTATE_OUTPUT);
@ -924,7 +924,7 @@ uint8_t ESC_startoutput (uint8_t state)
void ESC_stopoutput (void)
{
CC_ATOMIC_AND(ESCvar.App.state, APPSTATE_INPUT);
ESC_SMdisable (2);
ESC_SMdisable (SM2_IDX);
APP_safeoutput ();
}
@ -934,9 +934,12 @@ void ESC_stopoutput (void)
*/
void ESC_sm_act_event (void)
{
uint8_t ac, an, as, ax, ax23;
/* Have at least on Sync Manager changed */
uint8_t ac, an, as, ax23;
#if USE_MBX
uint8_t ax;
#endif
/* Have at least one Sync Manager changed */
if ((ESCvar.ALevent & ESCREG_ALEVENT_SMCHANGE) == 0)
{
/* nothing to do */
@ -957,13 +960,19 @@ void ESC_sm_act_event (void)
* is up and running
*/
if ((as & ESCREG_AL_ALLBUTINITMASK) &&
#if USE_MBX
((as == ESCboot) == 0) && ESCvar.MBXrun)
#else
((as == ESCboot) == 0))
#endif
{
/* Validate Sync Managers, reading the Activation register will
* acknowledge the SyncManager Activation event making us enter
* this execution path.
*/
#if USE_MBX
ax = ESC_checkmbx (as);
#endif
ax23 = ESC_checkSM23 (as);
if ((an & ESCerror) && ((ac & ESCerror) == 0))
{
@ -972,6 +981,7 @@ void ESC_sm_act_event (void)
/* Have we been forced to step down to INIT we will stop mailboxes,
* update AL Status Code and exit ESC_state
*/
#if USE_MBX
else if (ax == (ESCinit | ESCerror))
{
/* If we have activated Inputs and Outputs we need to disable them */
@ -987,6 +997,7 @@ void ESC_sm_act_event (void)
ESC_ALstatus (ax);
return;
}
#endif
/* Have we been forced to step down to PREOP we will stop inputs
* and outputs, update AL Status Code and exit ESC_state
*/
@ -1095,6 +1106,13 @@ void ESC_state (void)
uint8_t ac, an, as;
/* Do we have a state change request pending */
#if USE_EMU
ESC_read (ESCREG_ALCONTROL, (void *) &ESCvar.ALcontrol,
sizeof (ESCvar.ALcontrol));
ESCvar.ALcontrol = etohs (ESCvar.ALcontrol);
if ((ESCvar.ALcontrol & ESCREG_AL_STATEMASK) ==
(ESCvar.ALstatus & ESCREG_AL_STATEMASK))
#else
if (ESCvar.ALevent & ESCREG_ALEVENT_CONTROL)
{
ESC_read (ESCREG_ALCONTROL, (void *) &ESCvar.ALcontrol,
@ -1102,10 +1120,12 @@ void ESC_state (void)
ESCvar.ALcontrol = etohs (ESCvar.ALcontrol);
}
else
#endif
{
/* nothing to do */
return;
}
/* Mask state request bits + Error ACK */
ac = ESCvar.ALcontrol & ESCREG_AL_STATEMASK;
as = ESCvar.ALstatus & ESCREG_AL_STATEMASK;
@ -1147,7 +1167,11 @@ void ESC_state (void)
{
/* get station address */
ESC_address ();
#if USE_MBX
an = ESC_startmbx (ac);
#else
an = ac;
#endif
break;
}
case INIT_TO_BOOT:
@ -1155,7 +1179,11 @@ void ESC_state (void)
{
/* get station address */
ESC_address ();
#if USE_MBX
an = ESC_startmbxboot (ac);
#else
an = ac;
#endif
break;
}
case INIT_TO_SAFEOP:
@ -1169,26 +1197,34 @@ void ESC_state (void)
{
ESC_stopoutput ();
ESC_stopinput ();
#if USE_MBX
ESC_stopmbx ();
#endif
an = ESCinit;
break;
}
case SAFEOP_TO_INIT:
{
ESC_stopinput ();
#if USE_MBX
ESC_stopmbx ();
#endif
an = ESCinit;
break;
}
case PREOP_TO_INIT:
{
#if USE_MBX
ESC_stopmbx ();
#endif
an = ESCinit;
break;
}
case BOOT_TO_INIT:
{
#if USE_MBX
ESC_stopmbx ();
#endif
an = ESCinit;
break;
}
@ -1225,7 +1261,7 @@ void ESC_state (void)
an = ESC_startinput (ac);
if (an == ac)
{
ESC_SMenable (2);
ESC_SMenable (SM2_IDX);
}
break;
}
@ -1267,7 +1303,7 @@ void ESC_state (void)
/* If no outputs present, we need to flag error using SM3 */
if (ESCvar.ESC_SM2_sml == 0 && ESCvar.ESC_SM3_sml > 0)
{
ESC_SMdisable (3);
ESC_SMdisable (SM3_IDX);
}
break;
}
@ -1285,7 +1321,7 @@ void ESC_state (void)
/* If no outputs present, we need to flag error using SM3 */
if (ESCvar.ESC_SM2_sml == 0 && ESCvar.ESC_SM3_sml > 0)
{
ESC_SMdisable (3);
ESC_SMdisable (SM3_IDX);
}
an = ESCsafeop;
}
@ -1299,6 +1335,11 @@ void ESC_state (void)
}
}
#if USE_EMU
/* with device emulation ALcontrol is always copied to ALstatus */
an = ac;
#endif
/* Call post state change hook case it have been configured */
if (ESCvar.post_state_change_hook != NULL)
{
@ -1311,16 +1352,19 @@ void ESC_state (void)
ESC_ALerror (ALERR_NONE);
}
#if USE_EMU
ESCvar.ALstatus = an;
#else
if (ESC_check_id_request (ESCvar.ALcontrol, &an))
{
an |= ESC_load_device_id ();
}
ESC_ALstatus (an);
#ifdef ESC_DEBUG
#endif
#ifdef ESC_DEBUG
DPRINT ("state %s\n", ESC_state_to_string (an & 0xF));
#endif
#endif
}
/** Function copying the application configuration variable
* data to the stack local variable.

View File

@ -24,6 +24,7 @@
#define ESCREG_ALSTATUS 0x0130
#define ESCREG_ALSTATUS_ERROR_IND 0x0010
#define ESCREG_ALERROR 0x0134
#define ESCREG_ALCONFIG 0x0141
#define ESCREG_ALEVENTMASK 0x0204
#define ESCREG_ALEVENT 0x0220
#define ESCREG_ALEVENT_SM_MASK 0x0310
@ -36,8 +37,13 @@
#define ESCREG_ALEVENT_WD 0x0040
#define ESCREG_ALEVENT_SM0 0x0100
#define ESCREG_ALEVENT_SM1 0x0200
#if USE_MBX
#define ESCREG_ALEVENT_SM2 0x0400
#define ESCREG_ALEVENT_SM3 0x0800
#else
#define ESCREG_ALEVENT_SM2 ESCREG_ALEVENT_SM0
#define ESCREG_ALEVENT_SM3 ESCREG_ALEVENT_SM1
#endif
#define ESCREG_WDSTATUS 0x0440
#define ESCREG_EECONTSTAT 0x0502
#define ESCREG_EEDATA 0x0508
@ -46,8 +52,13 @@
#define ESCREG_SM0ACTIVATE (ESCREG_SM0 + 6)
#define ESCREG_SM0PDI (ESCREG_SM0 + 7)
#define ESCREG_SM1 (ESCREG_SM0 + 0x08)
#if USE_MBX
#define ESCREG_SM2 (ESCREG_SM0 + 0x10)
#define ESCREG_SM3 (ESCREG_SM0 + 0x18)
#else
#define ESCREG_SM2 ESCREG_SM0
#define ESCREG_SM3 ESCREG_SM1
#endif
#define ESCREG_LOCALTIME 0x0910
#define ESCREG_LOCALTIME_OFFSET 0x0920
#define ESCREG_SYNC_ACT 0x0981
@ -256,8 +267,23 @@
#define SMRESULT_ERRSM0 0x01
#define SMRESULT_ERRSM1 0x02
#if USE_MBX
#define SMRESULT_ERRSM2 0x04
#define SMRESULT_ERRSM3 0x08
#else
#define SMRESULT_ERRSM2 SMRESULT_ERRSM0
#define SMRESULT_ERRSM3 SMRESULT_ERRSM1
#endif
#define SM0_IDX 0
#define SM1_IDX 1
#if USE_MBX
#define SM2_IDX 2
#define SM3_IDX 3
#else
#define SM2_IDX SM0_IDX
#define SM3_IDX SM1_IDX
#endif
#define FOE_ERR_NOTDEFINED 0x8000
#define FOE_ERR_NOTFOUND 0x8001

View File

@ -106,8 +106,13 @@ typedef struct
#define ATYPE_RWop (ATYPE_Wop | ATYPE_RO)
#define ATYPE_RWpre_safe (ATYPE_Wpre | ATYPE_Wsafe | ATYPE_RO)
#if USE_MBX
#define TX_PDO_OBJIDX 0x1c13
#define RX_PDO_OBJIDX 0x1c12
#else
#define TX_PDO_OBJIDX 0x1c11
#define RX_PDO_OBJIDX 0x1c10
#endif
#define COMPLETE_ACCESS_FLAG (1 << 15)

View File

@ -90,7 +90,7 @@ static uint32_t bcm2835_spi_read_32 (uint16_t address)
return ((data[6] << 24) |
(data[5] << 16) |
(data[4] << 8) |
data[3]);
data[3]);
}
/* ESC read CSR function */
@ -473,7 +473,9 @@ void ESC_init (const esc_cfg_t * config)
{
// Set SPI bit order
bcm2835_spi_setBitOrder(BCM2835_SPI_BIT_ORDER_MSBFIRST);
// Set SPI data mode BCM2835_SPI_MODE0 = 0, CPOL = 0, CPHA = 0,
// Clock idle low, data is clocked in on rising edge, output data (change) on falling edge
bcm2835_spi_setDataMode(BCM2835_SPI_MODE0);
if (rpi4)
@ -500,6 +502,7 @@ void ESC_init (const esc_cfg_t * config)
{
// Enable management of CS0 pin
bcm2835_spi_chipSelect(BCM2835_SPI_CS0);
// enable CS0 and set polarity
bcm2835_spi_setChipSelectPolarity(BCM2835_SPI_CS0, LOW);
DPRINT("bcm2835_spi_chipSelect set to CS0 \n");
@ -596,7 +599,6 @@ void ESC_interrupt_disable (uint32_t mask)
ESC_ALeventmaskwrite(ESC_ALeventmaskread() & ~(mask & user_int_mask));
}
// Disable LAN9252 interrupt
bcm2835_spi_write_32(ESC_CMD_INT_EN, 0x00000000);
}

View File

@ -9,6 +9,19 @@
/* User-defined options, Options defined here will override default values */
#include "ecat_options.h"
/* Device emulation support */
/* If enabled, AL status register will be set to value written to AL control register by EEPROM */
/* If disabled, AL status register has to be set by SOES */
#ifndef USE_EMU
#define USE_EMU 0
#endif
/* Mailbox support */
/* If disabled SM2 --> SM0, and SM3 --> SM1 */
#ifndef USE_MBX
#define USE_MBX 1
#endif
/* FoE support */
#ifndef USE_FOE
#define USE_FOE 1