Ethercat drive configuration woes

More
3 years 10 months ago #258936 by db1981
sorry I can't understand your last post completly (may be my bad englisch)

It is not clear to me:

-When the drive is working correctly, (Ethercat state , linuxcnc state ??)

-read/in values in the xml ( configured as pdo ??)

-Also, I can't get any drives to operate if I'm reading the controlword back as part of the pdos. Remove it from the pdos, and I can get drives 2 & 3 to enable. (fully not clear to me.. / how can you enable the drives without the controlword? )

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

More
3 years 10 months ago #258939 by db1981
By the way, I read your drives manual page 23. If the document is correct The DS402 statemachine is not implemented as usual, they want to set mode of operation in front of the whole "enable statemachine" . The normal case is between state 2 and 3 in front of the last bit "enable voltage".

To check if this is the problem:

-disconnect the modes_of_op pdo (0x6060) from the CIA402 opmode pin in the hal

-start linuxcnc, don't enable the drives / control

-set the lcec.0.X.modes_of_op (0x6060) pin manual to 8 , per halcmd or halshow

-read out the "opmode-display" pin -> should be 8 too

-try to enable the drive
The following user(s) said Thank You: wazza77

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

More
3 years 10 months ago #258943 by mwc
Start from the beginning (in reply to your first post)

If I power the drives up with the CAT/Network cable disconnected between drive 1 and 2 (aka drive 2 and 3 not linked to the master), load LinuxCNC, then connect the CAT cable (so drives 2 and 3 are now connected/linked to the master), drives 2 and 3 get configured and can be enabled and controlled by LinuxCNC (I can jog the Y and Z axis), but drive 1 still does nothing.

At this point, if I look at Hal config, drive 2 and 3 are correctly reporting their statusword, whereas drive 1 reports 0.
If I read the statusword via a terminal (ethercat upload -p0 -t int16 0x6041 00), the driver returns 561 (IIRC - working from memory here, all info is on a different computer).

If I look at the frame data, I can see the statusword being received correctly by the master.

There appears to be some issue with the statusword not being updated between the ethercat master, and the linuxcnc ethercat driver.




Regarding the controlword, I noticed that when the drives fail to enable, if you read the controlword from a terminal (ethercat upload -p0 -t int16 0x6040 00), they always report 0. Even if you set it to a different value, it will always return 0.
Yet when the drives do enable, if you then read the controlword via a terminal, it reports correctly (0x0F/15 with LinuxCNC controlling the drives)
To try and understand what was happening, I added 6040/controlword to the xml/pdo (SM3) list to be read from the drives (with it connected to a hal pin "controlword-read"), and it always reports in Hal Config the value being written (4 or 6 when LinuxCNC is running), yet if you try reading the value from a terminal, it reports 0.

Now if you look at the frame data, the drive is also returning 0, yet Hal Config shows the value being written.
I'm not sure if this is significant, or just the way the linuxcnc ethercat driver interacts with the ethercatmaster state machine for pdos.

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

More
3 years 10 months ago #258944 by mwc

By the way, I read your drives manual page 23. If the document is correct The DS402 statemachine is not implemented as usual, they want to set mode of operation in front of the whole "enable statemachine" . The normal case is between state 2 and 3 in front of the last bit "enable voltage".

To check if this is the problem:

-disconnect the modes_of_op pdo (0x6060) from the CIA402 opmode pin in the hal

-start linuxcnc, don't enable the drives / control

-set the lcec.0.X.modes_of_op (0x6060) pin manual to 8 , per halcmd or halshow

-read out the "opmode-display" pin -> should be 8 too

-try to enable the drive
 

That could be the problem. I'll try that tomorrow.
It is like something isn't getting set correctly, but if the drive configuration is done immediately before being enabled (by the CAT cable being plugged in), they do get enabled.

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

More
3 years 10 months ago #258949 by wazza77
db1981,
When I was trying to look through the code and what was wanted in that manual something was not lining up in my head, but I worked 137 hrs in the last two weeks so not much lines up. thanks for taking a look.

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

More
3 years 10 months ago #258989 by db1981
this is now very strange.
Linuxcnc should not start if drives 2 and 3 are not connected . Because lcec_conf is not able to mount the slaves / pdos and will broke up with error.

Are your drives 1,2,3 always the same piece of hardware? Or is this behaviour only related to the connection order?

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

Time to create page: 0.106 seconds
Powered by Kunena Forum