Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncated 16-bit signed integers? #112

Open
bobobo1618 opened this issue Feb 13, 2022 · 1 comment
Open

Truncated 16-bit signed integers? #112

bobobo1618 opened this issue Feb 13, 2022 · 1 comment

Comments

@bobobo1618
Copy link

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.

@scottlaird
Copy link

To be clear, was this using the generic support or the dems300 driver? I don't see target-velocity in the dems300 driver; that PDO is mapped to vel-rpm-cmd times vel-scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants