- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Single object not cyclically updated via PDO although mapped
Single object not cyclically updated via PDO although mapped
29 Nov 2023 11:58 - 29 Nov 2023 12:51 #286775
by Stefan1
Hello to everyone,
I use a servo drive ECOVARIO 114RN-QJ from JAT. The communication via EtherCAT is basically working and I can read digital inputs / position / ADC from within LinuxCNC. However, one manufacturer-specific object (0x2861) which is used to simply control digital outputs is not cyclically sent via PDO although it is mapped and hence the digital output cannot be controlled. When I update this object via SDO (ethercat download 0x2861 0 0x01) it works but not via PDO. In the control software of the servo drive, I see the object is mapped in the RX PDO but also that is does not receive updates. For other objects in contrast everything works as expected.
The definition of the object 0x2861 is simple. It has only one index 0 which is an 8 bit value where each bit corresponds to one digital output of which the drive has 3 (dout0 .. dout2). The object 0x2860 used in my configuration does the opposite, it is used to read digital inputs (and works).
ethercat-conf.xml:
ethercat pdos
ethercat cstruct:
Edit:
I observed that 0x2861 will be cyclically sent when I use either Sync Manager 4/5 instead of 2/3 for all objects or if I handle object 0x2861 separately in SM 4/5 with PDO 1601. But no matter what I try, with the config as attached I cannot control the digital outputs. The manufacturer of the drive tested with CODESYS and confirms digital outputs can be controlled with SM 2/3. So it must be something on the EC Master side (or my config of course )
Any ideas would be much appreciated!
Thank you & Regards
Stefan
I use a servo drive ECOVARIO 114RN-QJ from JAT. The communication via EtherCAT is basically working and I can read digital inputs / position / ADC from within LinuxCNC. However, one manufacturer-specific object (0x2861) which is used to simply control digital outputs is not cyclically sent via PDO although it is mapped and hence the digital output cannot be controlled. When I update this object via SDO (ethercat download 0x2861 0 0x01) it works but not via PDO. In the control software of the servo drive, I see the object is mapped in the RX PDO but also that is does not receive updates. For other objects in contrast everything works as expected.
The definition of the object 0x2861 is simple. It has only one index 0 which is an 8 bit value where each bit corresponds to one digital output of which the drive has 3 (dout0 .. dout2). The object 0x2860 used in my configuration does the opposite, it is used to read digital inputs (and works).
ethercat-conf.xml:
<?xml version="1.0" encoding="UTF-8"?>
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" name="X1" type="generic" vid="004A4154" pid="00000001" configPdos="true">
<!-- <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0" /> -->
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
<pdoEntry idx="2861" subIdx="0" bitLen="8" halType="complex">
<complexEntry bitLen="1" halPin="dout1" halType="bit"/>
<complexEntry bitLen="1" halPin="dout2" halType="bit"/>
<complexEntry bitLen="1" halPin="dout3" halType="bit"/>
<complexEntry bitLen="1" halPin="dout4" halType="bit"/>
<complexEntry bitLen="1" halPin="dout5" halType="bit"/>
<complexEntry bitLen="1" halPin="dout6" halType="bit"/>
<complexEntry bitLen="1" halPin="dout7" halType="bit"/>
<complexEntry bitLen="1" halPin="dout8" halType="bit"/>
</pdoEntry>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="2500" subIdx="05" bitLen="32" halPin="adc0" halType="s32"/>
<pdoEntry idx="2860" subIdx="00" bitLen="8" halType="complex">
<complexEntry bitLen="1" halPin="din0" halType="bit"/>
<complexEntry bitLen="1" halPin="din1" halType="bit"/>
<complexEntry bitLen="1" halPin="din2" halType="bit"/>
<complexEntry bitLen="1" halPin="din3" halType="bit"/>
<complexEntry bitLen="1" halPin="din4" halType="bit"/>
<complexEntry bitLen="1" halPin="din5" halType="bit"/>
<complexEntry bitLen="1" halPin="din6" halType="bit"/>
<complexEntry bitLen="1" halPin="din7" halType="bit"/>
</pdoEntry>
</pdo>
</syncManager>
</slave>
</master>
</masters>
ethercat pdos
SM0: PhysAddr 0x1000, DefaultSize 128, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1080, DefaultSize 128, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1100, DefaultSize 0, ControlRegister 0x24, Enable 1
RxPDO 0x1600 ""
PDO entry 0x6040:00, 16 bit, ""
PDO entry 0x607a:00, 32 bit, ""
PDO entry 0x6060:00, 8 bit, ""
PDO entry 0x60ff:00, 32 bit, ""
PDO entry 0x2861:00, 8 bit, ""
SM3: PhysAddr 0x1180, DefaultSize 0, ControlRegister 0x20, Enable 1
TxPDO 0x1a00 ""
PDO entry 0x6041:00, 16 bit, ""
PDO entry 0x6064:00, 32 bit, ""
PDO entry 0x6061:00, 8 bit, ""
PDO entry 0x606c:00, 32 bit, ""
PDO entry 0x2500:05, 32 bit, ""
PDO entry 0x2860:00, 8 bit, ""
SM4: PhysAddr 0x1200, DefaultSize 0, ControlRegister 0x24, Enable 0
SM5: PhysAddr 0x1400, DefaultSize 0, ControlRegister 0x20, Enable 0
ethercat cstruct:
/* Master 0, Slave 0, "EcoVario"
* Vendor ID: 0x004a4154
* Product code: 0x00000001
* Revision number: 0x00000003
*/
ec_pdo_entry_info_t slave_0_pdo_entries = {
{0x6040, 0x00, 16},
{0x607a, 0x00, 32},
{0x6060, 0x00, 8},
{0x60ff, 0x00, 32},
{0x2861, 0x00, 8},
{0x6041, 0x00, 16},
{0x6064, 0x00, 32},
{0x6061, 0x00, 8},
{0x606c, 0x00, 32},
{0x2500, 0x05, 32},
{0x2860, 0x00, 8},
};
ec_pdo_info_t slave_0_pdos = {
{0x1600, 5, slave_0_pdo_entries + 0},
{0x1a00, 6, slave_0_pdo_entries + 5},
};
ec_sync_info_t slave_0_syncs = {
{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
{1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_DISABLE},
{3, EC_DIR_INPUT, 1, slave_0_pdos + 1, EC_WD_DISABLE},
{4, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
{5, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{0xff}
};
Edit:
I observed that 0x2861 will be cyclically sent when I use either Sync Manager 4/5 instead of 2/3 for all objects or if I handle object 0x2861 separately in SM 4/5 with PDO 1601. But no matter what I try, with the config as attached I cannot control the digital outputs. The manufacturer of the drive tested with CODESYS and confirms digital outputs can be controlled with SM 2/3. So it must be something on the EC Master side (or my config of course )
Any ideas would be much appreciated!
Thank you & Regards
Stefan
Last edit: 29 Nov 2023 12:51 by Stefan1.
Please Log in or Create an account to join the conversation.
30 Nov 2023 23:49 #286919
by Hakan
Replied by Hakan on topic Single object not cyclically updated via PDO although mapped
Sorry, no idea.
What I would have done is to read the ethercat section of the drive's manual several times. I couldn't find it, so that's that.
Test the drive outside of linuxcnc, perhaps with Twincat.
Try to see if igh's ethercat master gets confused by the linuxcnc xml config file, try to verify function without that xml file. The drive has info on which pdos it have, use that info instead. Doublecheck with "ethercat xml"
I see you are on a good way and you have tools to access the drive directly.
What I would have done is to read the ethercat section of the drive's manual several times. I couldn't find it, so that's that.
Test the drive outside of linuxcnc, perhaps with Twincat.
Try to see if igh's ethercat master gets confused by the linuxcnc xml config file, try to verify function without that xml file. The drive has info on which pdos it have, use that info instead. Doublecheck with "ethercat xml"
I see you are on a good way and you have tools to access the drive directly.
Please Log in or Create an account to join the conversation.
01 Dec 2023 05:38 #286933
by endian
Replied by endian on topic Single object not cyclically updated via PDO although mapped
If you want to use 4,5 sync manager you have to added them to the .xml config I think... map it over and it should works ...
But I did not see any config .xml with the 4 and 5 sync manager working yet ...
sync manager 2 and 3 is basically for cyclic periodical communication(there is only critical and ultranecessary stuff) and sync manager 4 and 5 is for non time periodical comm(there is everything else) ...
But I did not see any config .xml with the 4 and 5 sync manager working yet ...
sync manager 2 and 3 is basically for cyclic periodical communication(there is only critical and ultranecessary stuff) and sync manager 4 and 5 is for non time periodical comm(there is everything else) ...
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Single object not cyclically updated via PDO although mapped
Time to create page: 0.072 seconds