Stepper motor not running (Linux CNC + EtherCat + RPi 4)

More
4 years 9 months ago #233445 by db1981
hmm,

this now all reads good.
Does the driver react to the enable signal? If enable is high , the pin stat-op-enabled from the cia comp should go high.

Maybe the drive needs some magic register config data. How did you attach the drive to twincat? Do you have an manufactures xml ? please post it or the twincat project.

Please Log in to join the conversation.

More
4 years 9 months ago #233446 by Hakan
I took Dj's config and ran it here. Changed vid and pid, put only the ECT60 drive on the ethercat bus and then started. It runs but there is a following error. Increased FERROR to 1 and then it runs. So with the ECT60 driver this works. This with the following error is something I have seen before and maybe we can come back to that once you have it running. Or, you mentioned you got a following error - increase FERROR to 1 or so to get that out of the way.

Please Log in to join the conversation.

More
4 years 9 months ago #233447 by Dj Junior
halcmd getp cia402.0.stat-op-enabled returns false.
with
halcmd setp cia402.0.stat-op-enabled 1 return pin 'cia402.0.stat-op-enabled' is not writable (is read only)

 

Attachment not found


I only connected one driver for testing
Here is the twincat file and manufacturer's xml

I renamed the file TwinCAT Project4.tsproj to TwinCAT Project4.xml to be able to upload it

 

Attachment not found



 

Attachment not found

​​​​​​​

Please Log in to join the conversation.

More
4 years 9 months ago #233452 by db1981
if you take a look in Twincat, there are a lot of startup commands that are sent to configure the drive at startup. The default pdo mapping also differs a lot from the pdo mapping in the ethercat_conf. for example 6060 mode of op does not exist in the manufacuteres default pdo config on 0x1a00.

Im not sure if the etherlabmaster will create the right config, that depends on the content of the sii eeprom.
Please post the dmesg -w again (while starting linuxcnc)  , with ethercat debug level set to 1. "ethercat debug 1"

Please Log in to join the conversation.

More
4 years 9 months ago #233456 by Dj Junior
i found this in the manufacuteres xml file                           
 <Object>
                                <Index>#x6060</Index>
                                <Name>Modes of Operation</Name>
                                <Type>USINT</Type>
                                <BitSize>8</BitSize>
                                <Flags>
                                    <Access>rw</Access>
                                    <PdoMapping>TR</PdoMapping>
                                </Flags>
                            </Object>

here it is the log
 

Attachment not found

Please Log in to join the conversation.

More
4 years 9 months ago #233460 by db1981
ok, mapping and configuring pdos is working.

normaly the drive should work, now we have to check if pins and values are in normal range.

please start linuxcnc and then halshow.
create an view with all the cia402 pins and do an screenshot , 1x after starting lcnc and 1x after switching/ enabling the axis (power on linuxcnc)

Please Log in to join the conversation.

More
4 years 9 months ago #233462 by Dj Junior
here is the result
 

Attachment not found


 

Attachment not found

Please Log in to join the conversation.

More
4 years 9 months ago #233465 by db1981
If you look at the lcec pins, you can see that there is no ethercat communication at all. There is no feedback from the drive like statusword or act position.

This is strange, because the drive is op and there are no dmesg errors.

Did other ethercat devices like beckhoff I/O Cards worked already on this setup?

Please Log in to join the conversation.

More
4 years 9 months ago #233466 by db1981
one test could be to slow down the servo thread, maybe the drive has limitations.

try 4000000 (4ms) for servo-thread and apptimeperiod like it is in the twincat setup.

Please Log in to join the conversation.

More
4 years 9 months ago #233467 by Dj Junior
If I connect the EK1100 and EL2008 device
the command halcmd setp lcec.0.3.dout-2 1 works and the fan connected to pin 3 turns

Please Log in to join the conversation.

Time to create page: 0.442 seconds
Powered by Kunena Forum