Truncated 16-bit signed integers?

More
13 Feb 2022 16:25 #234710 by Twour
Hey folks,

I have an odd problem. 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

As you can see, it looks like the device has been told the speed should be
0x0027
instead of
0x2710
, as if it's missing the first byte.

Anyone have any idea how to go about fixing this? I'm not averse to diving into code but as far as I can see from the linuxcnc-ethercat code, this is just a wrapper around IgH EtherCAT's
EC_WRITE_S16
, which I assume can be trusted.

I've attached all my config files.
Attachments:

Please Log in or Create an account to join the conversation.

More
13 Feb 2022 18:52 #234718 by db1981
in normal case this should work, correct cast is done in the generic driver.

But sending 10000 means 10000rpm, if you have any limits set in the drive, the pdo will not accept the value.

in this branch is an working native driver for the ms300 with EC01.
github.com/steup-engineering/linuxcnc-et...ax5-dynamic-pdos/src


Has your Ethercat Modul worked out of the box? Them i got delivered had empty eeproms.

Please Log in or Create an account to join the conversation.

More
13 Feb 2022 20:20 #234738 by Twour
I'm sure it's not a limit issue. I checked the VFD thoroughly and the commanded frequency does change on the display, the display just shows it being ridiculously low. For example I command 10k RPM and the display shows something like 0.65 Hz, or I command 1000 and it shows 0.05Hz.

The native MS300 driver works perfectly though! Thanks for the reference and thanks even more for writing it in the first place!

My module mostly seemed to work out of the box but I did flash the SII with one generated from ESI with siitool in one of my earlier debugging steps.

Please Log in or Create an account to join the conversation.

More
13 Feb 2022 20:42 #234746 by db1981
I'am loading the sii data from file at startup with the -override-sii patch...

you can try to use float for the halpin in the ethercat_conf. but this should not be the problem.

Please Log in or Create an account to join the conversation.

More
21 Feb 2023 20:35 #264980 by wavescout
Hi db1981 / Twour

I'm trying to set up a MS300 ethercat card (CMM-EC-02) and a have some questions you may be able to answer.If I check the pdos with "ethercat pdos" there are no SM shown at all. If i check it with "ethercat slaves" the interface shows up but it stays in Init and the error flag "E" is shown. I guess the Sii is not configured propperly? So I installed Siitool and tried to generate the sii .bin file based on the deltas .xml slave description file. I can upload it to the interface card but it still stays in the preop state. Is there something I have to change in the .xml slave description before generating the sii .bin file? I'm trying to set it up with db1981's device specific driver (thanks for that!). Do I understand it correctly, that with the device specific driver I do not need a cia402 component to link the ms300 pins to hal like Twour tried to do in his first approach? Would be interesting to see how you linked it in hal.

I would realy appreciate any help or some example files I can have a look at. =)

I attached a picture of the "ethercat slaves -v" output and the .xml file (It's named EC-01 even though I downloaded the one for the EC-02 card)
Attachments:

Please Log in or Create an account to join the conversation.

More
21 Feb 2023 21:24 #264986 by db1981
hi,

no cia420 is needed.
I created sii data with twincat. (try to check the with twincat or ethercat configurator and the xml from delta website, if it still gots not preop or op then hardware bug...)

on this machine delta ms300 is used:

github.com/steup-engineering/sbs625-cnc-...r/tree/master/config

there is also an working sii bin file....

Please Log in or Create an account to join the conversation.

More
23 Feb 2023 16:50 - 23 Feb 2023 16:52 #265126 by wavescout
Thank you very much for you inputs! The example project helped me a lot to get it working!

How I got it running:
  • First I downloaded your Sii .bin from the SBS625 project file onto the Ethercat interface card with "ethercat sii_write".
  • Checked that the SM and PDOs are configured correctly with "ethercat pdos".
  • Then i realized that the Ms300 card is still in init and the error flag is shown.
  • I tried to get some more debugg information by attaching the USB cable. As soon as I touched the lid, the red error led disappeared ^^ So there was also a connection issue between the interface cards connector and the cable to the vfd..
  • With your driver it worked perfectly (after I realized that the start up time is in ms and not seconds ^^)

    Falls irgendwie möglich db1981, würde ich dir gerne einen Kasten Bier spendieren ;) Habe einige Abende mit debuggen verbracht. Danke!
Last edit: 23 Feb 2023 16:52 by wavescout.

Please Log in or Create an account to join the conversation.

Time to create page: 0.094 seconds
Powered by Kunena Forum