Hello Everyone,
I'm have an
IFC2411 confocal sensor (Micro-Epsilon) on my EtherCAT network. The sensor is recognized and appears in
OP state:
0 0:0 OP + ECOMODUL
1 0:1 OP + PD4-Ex-E-65-1 EtherCAT Drive (CoE)
2 0:2 OP + ECAT-2513 4-Port EtherCAT Junction(IN/OUT1)
3 0:3 OP + ECAT-2513 4-Port EtherCAT Junction(OUT2/OUT3)
4 0:4 OP + IFC2411
I can do an SDO read of
0x6000:01 and get
non-zero distance values—proving the sensor is physically measuring and returning data internally:
ethercat upload -p 4 0x6000 0x01 --type uint32
0x001d6fe3 1929187
The ethercat pdos -p 4 says:
SM0: PhysAddr 0x1000, DefaultSize 1024, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1400, DefaultSize 1024, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1800, DefaultSize 0, ControlRegister 0x64, Enable 1
SM3: PhysAddr 0x1818, DefaultSize 24, ControlRegister 0x20, Enable 1
TxPDO 0x1a00 ""
PDO entry 0x6000:01, 32 bit, ""
TxPDO 0x1a30 ""
PDO entry 0x6010:01, 32 bit, ""
TxPDO 0x1a80 ""
PDO entry 0x6030:01, 32 bit, ""
TxPDO 0x1ae0 ""
PDO entry 0x7000:01, 32 bit, ""
TxPDO 0x1ae8 ""
PDO entry 0x7001:01, 32 bit, ""
TxPDO 0x1af0 ""
PDO entry 0x7002:01, 32 bit, ""
However, in LinuxCNC’s HAL pins (e.g.
lcec.0.IFC2411Sensor.ifc2411-distance
), the value
stays at 0.
halcmd show pin lcec.0.IFC2411Sensor
Component Pins:
Owner Type Dir Value Name
37 s32 OUT 0 lcec.0.IFC2411Sensor.ifc2411-counter ==> ifc2411-counter
37 s32 OUT 0 lcec.0.IFC2411Sensor.ifc2411-distance ==> ifc2411-distance
37 s32 OUT 0 lcec.0.IFC2411Sensor.ifc2411-frequency ==> ifc2411-frequency
37 s32 OUT 0 lcec.0.IFC2411Sensor.ifc2411-intensity ==> ifc2411-intensity
37 s32 OUT 0 lcec.0.IFC2411Sensor.ifc2411-shutter ==> ifc2411-shutter
37 s32 OUT 0 lcec.0.IFC2411Sensor.ifc2411-timestamp ==> ifc2411-timestamp
37 bit OUT TRUE lcec.0.IFC2411Sensor.slave-online
37 bit OUT TRUE lcec.0.IFC2411Sensor.slave-oper
37 bit OUT FALSE lcec.0.IFC2411Sensor.slave-state-init
37 bit OUT TRUE lcec.0.IFC2411Sensor.slave-state-op
37 bit OUT FALSE lcec.0.IFC2411Sensor.slave-state-preop
37 bit OUT FALSE lcec.0.IFC2411Sensor.slave-state-safeop
The slave is defined in ethercat_conf.xml as follows:
<slave idx="4" name="IFC2411Sensor" type="generic" vid="0x00000607" pid="0x62ece209" configPdos="true">
<syncManager idx="3" dir="in">
<!-- Channel 1 distance 1 TxPDOMap OV1 -->
<pdo idx="1a00">
<pdoEntry idx="6000" subIdx="01" bitLen="32" halPin="ifc2411-distance" halType="s32"/>
</pdo>
<!-- Channel 1 intensity 1 TxPDOMap OV1 -->
<pdo idx="1a30">
<pdoEntry idx="6010" subIdx="01" bitLen="32" halPin="ifc2411-intensity" halType="s32"/>
</pdo>
<!-- Channel 1 shutter TxPDOMap OV1 -->
<pdo idx="1a80">
<pdoEntry idx="6030" subIdx="01" bitLen="32" halPin="ifc2411-shutter" halType="s32"/>
</pdo>
<!-- Counter TxPDOMap OV1 -->
<pdo idx="1ae0">
<pdoEntry idx="7000" subIdx="01" bitLen="32" halPin="ifc2411-counter" halType="s32"/>
</pdo>
<!-- Time stamp TxPDOMap OV1 -->
<pdo idx="1ae8">
<pdoEntry idx="7001" subIdx="01" bitLen="32" halPin="ifc2411-timestamp" halType="s32"/>
</pdo>
<!-- Frequency TxPDOMap OV1 -->
<pdo idx="1af0">
<pdoEntry idx="7002" subIdx="01" bitLen="32" halPin="ifc2411-frequency" halType="s32"/>
</pdo>
</syncManager>
</slave>
The .hal file contains the following mappings:
#PDOs to HAL Pins mapping for IFC2411 Confocal Sensor
net ifc2411-distance <= lcec.0.IFC2411Sensor.ifc2411-distance
net ifc2411-intensity <= lcec.0.IFC2411Sensor.ifc2411-intensity
net ifc2411-shutter <= lcec.0.IFC2411Sensor.ifc2411-shutter
net ifc2411-counter <= lcec.0.IFC2411Sensor.ifc2411-counter
net ifc2411-timestamp <= lcec.0.IFC2411Sensor.ifc2411-timestamp
net ifc2411-frequency <= lcec.0.IFC2411Sensor.ifc2411-frequency
I have the feeling that I am overseeing something trivial and would be thankful for any kind of help!
Cheers,