General Questions about using ethercat

More
1 year 5 months ago #327877 by Hakan
You will not be helped by knowing command 110.
It's the following error on the line above one need to react on.

They move a tiny tiny bit or not at all? Does the shaft stop free rotation?
Anyway, the drives are closed loop drives, you need to set them to open loop mode so they ignore the input from the non-existent encoder on the motors.
I searched briefly for a manual but couldn't find one - Lichuan CL3-E57H?
So you have to look in the manual, or perhaps there is a configuration software with it, I saw comments that suggests that. Turn of closed loop, enable open loop.
Hopefully it is that easy.
 

Please Log in to join the conversation.

More
1 year 5 months ago #327878 by Tntmold
According to the manual, parameter 2301 indicates open/closed loop and is set to open loop:

ethercat upload -p 0 -t int16 0x2301 0
0x0001 1

The shafts make no motion at all, the velocity display changes to 200 for an instant and then back to zero.  I can easily turn the motor shafts 

It looks like the operation mode is not set. The manual says to use CSP mode by setting 6060 to 8, then set 6040 to 0x6, 0x7, and 0xf in sequence

ethercat upload -p 0 -t int8 0x6060 0
0x00 0
ethercat download -p 0 -t int8 0x6060 0 8
ethercat upload -p 0 -t int8 0x6060 0
0x00 0

so the value is not being set via ethercat. How should I do this?

Please Log in to join the conversation.

More
1 year 5 months ago #327885 by Hakan
That's what the cia402 component does. You have already set cia402.0.csp-mode to 1 in the hal file.
You can go into halshow and find the pin lcec.0.X.target-position and lcec.0.X.actual-position.
The difference between them is the following error and one always accepts some error but when it becomes too large lcnc stops.
You have the cia402.0.pos-scale to play with. The manual should say how many "steps" per revolution it uses, or how to found out. Calculate how many steps per axis unit (mm?) you have (thread pitch).

However I looked at your ethercat-conf.xml. You got to remove those pdos from syncmanager 0 and 1, actually remove sm0 and sm1 completely and only use those in sm2 and sm3.
Like this

Code:
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/> <syncManager idx="2" dir="out"> <pdo idx="1600"> <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="controlword" halType="U32"/> <pdoEntry idx="607a" subIdx="00" bitLen="32" halPin="target-position" halType="S32"/> <pdoEntry idx="60ff" subIdx="00" bitLen="32" halPin="target-velocity" halType="S32"/> <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="S32"/> </pdo> </syncManager> <syncManager idx="3" dir="in"> <pdo idx="1a00"> <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="statusword" halType="U32"/> <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="S32"/> <pdoEntry idx="606c" subIdx="00" bitLen="32" halPin="actual-velocity" halType="S32"/> <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="S32"/> </pdo> </syncManager>

Keep dccconf line and all other lines. If I made a type above I hope you can correct it.

Please Log in to join the conversation.

More
1 year 5 months ago #327910 by Tntmold
I made those changes to the xml but I see no difference.
ethercat slaves shows both drives in OP but I can't get them to move and the motor shafts act as if no power is present

Please Log in to join the conversation.

More
1 year 5 months ago #327924 by Hakan
The config should be ok now and I don't know of any obvious thing to do..
I made a quick search and there seems to be a problem with the CL3-E57H, in which order power, linuxcnc and network cable are activated, I might have got that wrong. Maybe you find something in that thread
forum.linuxcnc.org/ethercat/47534-etherc...e-configuration-woes

Please Log in to join the conversation.

More
1 year 5 months ago #327948 by Tntmold
Thanks, I will read through that thread to see if it will help, however that thread is for a closed loop drive and mine are open loop. The drives know they are open loop, but I am wondering if linuxcnc knows they are open loop. Where is that set in linuxcnc?

Please Log in to join the conversation.

More
1 year 5 months ago #327978 by Hakan
You don't set open loop in linuxcnc. You set it to cia402 csp (cyclic synchronous position) mode and it is up to the drive to figure out how to come to the position you tell it. In open loop the driver will just report back the target position, not the actual position as the actual position well that's obvious I guess.
If you need to set the sdo value during startup you can do that like this (example from my ect60 drive)
Code:
   <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>       <sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="a0 0f"/></sdoConfig>  <!-- Max motor current (3.0A=b80b 4.0=a00f 5.0=8813) Rated=4.0A -->       <sdoConfig idx="2003" subIdx="0"><sdoDataRaw data ="64 00"/></sdoConfig>  <!-- Standby current percentage (100%) -->  

Note the byte order, 4000 which is hex x0fa0 is entered as "a0 0f"

Please Log in to join the conversation.

More
1 year 4 months ago #331044 by Tntmold
I have linuxcnc loading but the steppers still won't move.  Ethercat Slaves shows drive is in OP mode, but when I use "ethercat upload" to check drive parameters, I see that the drive is not in CSP mode.  Where is this supposed to happen?

Please Log in to join the conversation.

More
1 year 3 months ago #331059 by Hakan
The line
setp cia402.0.csp-mode 1
should make the cia402 put the drive in csp-mode.
OP is required but not enough. For cia402 drivers, they have their own states on top of OP.
The drive needs to be in stat-op-enabled to start moving.
Easiest is to use halshow and navigate to pins,cia402,0 to check the values from the component.
 

Please Log in to join the conversation.

More
1 year 3 months ago #331067 by Tntmold
halshow value for cia402.0.csp-mode is true, but the drive parameters (value of modes-of-operation/cia402.0.opmode/lcec.0.x.opmode) is 0.

in the XML file there is
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="S32"/>

in the HAL file there is:

setp cia402.0.csp-mode 1
...
net x-modes-of-operation cia402.0.opmode => lcec.0.X.opmode
...

The drive wants parameter 6060 to be 8 for CSP mode. How do I correct that?

Please Log in to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum