工具/软件:
您好的团队、
在给定的示例代码({Ind_Comm_ SDK}-> Example -> industrial_comms -> EtherCAT_slave_demo -> device_profiles -> 401_simple)中、
我在 EC_SLV_APP_SS_PopulateInOutObjects 下添加了一个记录0x7000和3个子索引、用于测试目的
/*0x7000 - Commands*/
error = (EC_API_EError_t)EC_API_SLV_CoE_odAddRecord(
ptSlave,
0x7000,
"Commands",
EC_SLV_APP_setValueToMaster,
pApplicationInstance,
EC_SLV_APP_getValueFromMaster,
pApplicationInstance,
&pApplicationInstance->ptCommandObj);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Object 0x7000 Record Error code: 0x%08x\r\n", error);
/* @cppcheck_justify{misra-c2012-15.1} goto is used to assure single point of exit */
/* cppcheck-suppress misra-c2012-15.1 */
goto Exit;
}
/*0x7000:1*/
error = (EC_API_EError_t)EC_API_SLV_CoE_configRecordSubIndex(
ptSlave,
pApplicationInstance->ptCommandObj,
1,
"INPUT COMMANDS",
DEFTYPE_UNSIGNED16,
16,
ACCESS_READWRITE);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Object 0x7000 SubIndex 1 Error code: 0x%08x\r\n", error);
/* @cppcheck_justify{misra-c2012-15.1} goto is used to assure single point of exit */
/* cppcheck-suppress misra-c2012-15.1 */
goto Exit;
}
/*0x7000:2*/
error = (EC_API_EError_t)EC_API_SLV_CoE_configRecordSubIndex(
ptSlave,
pApplicationInstance->ptCommandObj,
2,
"PROGRAM",
DEFTYPE_UNSIGNED16,
16,
ACCESS_READWRITE);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Object 0x7000 SubIndex 2 Error code: 0x%08x\r\n", error);
/* @cppcheck_justify{misra-c2012-15.1} goto is used to assure single point of exit */
/* cppcheck-suppress misra-c2012-15.1 */
goto Exit;
}
/*0x7000:3*/
error = (EC_API_EError_t)EC_API_SLV_CoE_configRecordSubIndex(
ptSlave,
pApplicationInstance->ptCommandObj,
3,
"RxPDO_SDO_FU",
DEFTYPE_UNSIGNED16,
16,
ACCESS_READWRITE | OBJACCESS_RXPDOMAPPING);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Object 0x7000 SubIndex 2 Error code: 0x%08x\r\n", error);
/* @cppcheck_justify{misra-c2012-15.1} goto is used to assure single point of exit */
/* cppcheck-suppress misra-c2012-15.1 */
goto Exit;
}
<DataType>
<Name>DT7000</Name>
<BitSize>64</BitSize>
<SubItem>
<SubIdx>0</SubIdx>
<Name>SubIndex 000</Name>
<Type>USINT</Type>
<BitSize>8</BitSize>
<BitOffs>0</BitOffs>
<DefaultData>3</DefaultData>
<Flags>
<Access>ro</Access>
</Flags>
</SubItem>
<SubItem>
<SubIdx>1</SubIdx>
<Name>Input Commands</Name>
<Type>UINT</Type>
<BitSize>16</BitSize>
<BitOffs>16</BitOffs>
<Flags>
<Access>rw</Access>
</Flags>
</SubItem>
<SubItem>
<SubIdx>2</SubIdx>
<Name>PROGRAM</Name>
<Type>UINT</Type>
<BitSize>16</BitSize>
<BitOffs>32</BitOffs>
<Flags>
<Access>rw</Access>
</Flags>
</SubItem>
<SubItem>
<SubIdx>3</SubIdx>
<Name>RxPDO_SDO_FU</Name>
<Type>UINT</Type>
<BitSize>16</BitSize>
<BitOffs>48</BitOffs>
<Flags>
<Access>rw</Access>
</Flags>
</SubItem>
</DataType>
<Object>
<Index>#x7000</Index>
<Name>Commands</Name>
<Type>DT7000</Type>
<BitSize>64</BitSize>
<Flags>
<Access>rw</Access>
</Flags>
</Object>
我在 TwinCAT CoE-Online 中新增了以下内容、
为什么我没有得到的下流的数量
0x7000:0命令值
以及默认值0x7000:1-3

请指导我进一步解决这个问题
此致、
D.Jenita.




在两个 SI0值=0中; 