Skip to content

Implement proper check for configured slaves that are not found on physical bus

  • Define a slave in hardware config
  • Set up a bus with that slave missing
  • Try start bus

Error will look like:

[Info][09:55:56.381920][realtime loop] Done initializing IO map.  Size is 90 bytes.
[Info][09:55:56.381941][realtime loop] Initializing slave PDO data structures with IO map ...
[Info][09:55:56.381948][realtime loop]  - Set PDO data structures from IO map for slave identified by index: 2, vendor id: 0x00'00'07'bc, product code: 0x00'00'31'00, serial number: 0x10'00'00'11, revision number: 0x00'00'00'02.
[Info][09:55:56.381955][realtime loop]  - Set PDO data structures from IO map for slave identified by index: 1, vendor id: 0x00'00'00'9a, product code: 0x00'03'09'24, serial number: 0x01'38'a7'41, revision number: 0x00'01'04'20.
[Info][09:55:56.381964][realtime loop]  - Set PDO data structures from IO map for slave identified by vendor id: 0x00'00'07'bc, product code: 0x00'00'20'01, serial number: 0x00'00'00'08, revision number: 0x00'00'00'02.
[Error][09:55:56.381972][realtime loop] current_ec_slave.inputs and .outputs of slave with index -1 are nullptr. 
	(/home/hardware/code_velocity_tests/robot_control/ethercat_integration/bus/source/ethercat_bus/realtime/ethercat/Bus.cpp:738 in void ethercat_bus::realtime::ethercat::Bus::entering_safe_operational(InternalState::EnteringSafeOperational&))
[Fatal][09:55:56.381987][realtime loop] Breaking realtime loop due to error in updating bus.
	(/home/hardware/code_velocity_tests/robot_control/robot_control/source/robot_control/realtime/unit/Unit.cpp:49 in virtual robot_control::realtime::Result robot_control::realtime::unit::Unit::run_realtime_loop())
[Info][09:55:56.381997][realtime loop] Resetting realtime-hardening configurations ...
[Info][09:55:56.382006][realtime loop] Stopping low latency mode by closing file '/dev/cpu_dma_latency'.

Implement proper error message