Skip to content

Truncated 16-bit signed integers? #112

@bobobo1618

Description

@bobobo1618

I'm trying to set up a Delta MS300 VFD with a CMM-EC01 EtherCAT option card. I've got it working save for speed control.

It seems that the speed value sent to the VFD is lacking one of the two bytes of data:

  • EtherCAT PDO entry:
    <pdoEntry idx="6042" subIdx="00" bitLen="16" halPin="target-velocity" halType="s32"/>

  • Debugging:

    > halcmd getp lcec.0.3.target-velocity
    10000
    > ethercat upload -p 3 -t int16 0x6042 0
    0x0027 39
    > python -c 'print(hex(10000))'
    0x2710
    

It looks like the device has been told the speed should be 0x0027 instead of 0x2710, as if >> 8 has been added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions