General Questions about using ethercat

More
1 year 5 months ago #327560 by Hakan
Lcec isn't ethercat it is just an interface to ethercat, at the most a driver to use ethercat.
How well do you think your method works in this case?
Maybe if there was a detailed guide on how to set this up, and what to do in case of problem?
More than once I have wished to refer to RTFM but there isn't one.

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

More
1 year 5 months ago #327562 by Tntmold
Thanks for the help, it loaded after changing lcec name to D1 and D2, and after I commented out several lines.

ethercat slaves shows both are on OP mode, but I am sure I don't currently have enough pins defined for motion control.

I need to work out what those line problems are, some are just not defined and some are type mismatch, but I may be able to work that out.

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

More
1 year 5 months ago #327587 by Hakan
Good to hear, wouldn't surprise me if you change D1 and D2 to X and Z.
That config should be enough to move the axis. Try it.
Then you need to add limit switches and other switches if you have that, spindle control, pendant or gamepad and so on.
Now when linuxcnc is up and running you can easily inspect pins' values using halshow.
The drive and motors are closed-loop I guess, then you will see actual-position change when you rotate the motor shaft, even by just a little if the motors are active.

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

More
1 year 5 months ago - 1 year 5 months ago #327853 by Tntmold
I am unable to get the motors to move, they are open loop steppers.  This is my first use of linuxcnc so I don't know much, but I tried power on, then home and got the following:

phil@SodickA:~/linuxcnc/configs/sim.axis$ linuxcnc lathe.ini
LINUXCNC - 2.9.3
Machine configuration directory is '/home/phil/linuxcnc/configs/sim.axis'
Machine configuration file is 'lathe.ini'
Starting LinuxCNC...
libnml/buffer/shmem.cc 320: Shared memory buffers toolCmd and toolCmd may conflict. (key=1004(0x3EC))
libnml/buffer/shmem.cc 320: Shared memory buffers toolSts and toolSts may conflict. (key=1005(0x3ED))
libnml/buffer/shmem.cc 320: Shared memory buffers emcError and emcError may conflict. (key=1003(0x3EB))
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./ethercat.hal
note: MAXV max: 3.333 units/sec 200.000 units/min
note: LJOG max: 3.333 units/sec 200.000 units/min
note: LJOG default: 1.000 units/sec 60.000 units/min
note: jog_order='ZX'
note: jog_invert={'X'}
task: main loop took 0.059970 seconds
task: main loop took 0.075473 seconds
task: main loop took 0.050344 seconds
Can't run a program when not homed
task: main loop took 0.019042 seconds
task: main loop took 0.052011 seconds
joint 0 following error
emc/task/taskintf.cc 976: Error on joint 0, command number 110
task: main loop took 0.036446 seconds
task: main loop took 0.045782 seconds
task: main loop took 0.078341 seconds
task: main loop took 0.050362 seconds
Can't issue MDI command when not homed
task: main loop took 0.018336 seconds
Shutting down and cleaning up LinuxCNC...
task: 746110 cycles, min=0.000007, max=0.078341, avg=0.001059, 14 latency excursions (> 10x expected cycle time of 0.001000s)
Note: Using POSIX realtime


Were can I get a definition of command number 110?
Last edit: 1 year 5 months ago by Tntmold.

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

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.
 
The following user(s) said Thank You: Tntmold

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

More
1 year 5 months ago - 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?
Last edit: 1 year 5 months ago by Tntmold. Reason: Added information

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

Time to create page: 0.198 seconds
Powered by Kunena Forum