Skip to content

State Transition and SDO Write Timeouts with ELM3604-0002 #283

@tdehaeze

Description

@tdehaeze

Thanks for creating EtherCrab! Really appreciate having such a well-documented Rust implementation for EtherCAT :)

Please note that I am a beginner with Rust (that I want to learn for a long time). So I might do stupid mistakes.

My goal

Acquire voltage values (1ms sampling time) from ELM3604 and store in .txt file (for my PhD thesis).
Do you think Ethercrab is a good fit for my simple need?

Setup

  • Hardware: EK1100 + ELM3604-0002
  • Master: Raspberry Pi 4 (Linux raspberrypi 6.6.51)
  • Branch: master

Issues Encountered

1. SDO Write Timeout but Successful Operation

subdevice.sdo_write(0x8000, 0x01, 100u16).await?;
  • This operation always returns a timeout error
  • However, subsequent sdo_read on the same address confirms the write was successful
  • In contrast, SyncManager configuration works without timeout:
    subdevice.sdo_write(0x1c12, 0, 0u8).await?;

Do you have any idea why I have these timeout?

2. State Transition Timeout Despite Successful Transition

let group = group.into_safe_op(&maindevice).await.expect("PRE-OP -> SAFE-OP");

Output:

[2025-02-19T09:02:21Z DEBUG ethercrab::subdevice_group] Waiting for group state Safe-Operational
thread 'main' panicked at examples/ek1100.rs:134:50:
PRE-OP -> SAFE-OP: Timeout

However, the EK1100's LED indicates it is in SAFE-OP state.
Note that I only need SAFE-OP (I don't have "outputs", only "inputs"), and not OP, but I got the same error when trying to go to OP.
Do you have any idea about the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions