Savch Servo and ethercat control

More
29 Oct 2020 18:16 #187705 by Padstar
Good Day LinuxCNC

i've been lurking and tinkering for a while plucking up courage on finally asking the question....

how do i make do all the doubley doo, bits to make the angry pixies combine in the confuser and make the motors chooche...

now the thing i have been doing in the background is working on my EtherCat game.. and i kinda know a bit about that.. but what i've not managed to do is get it working using Linux...

now I've done a load of installing..and testing... and i know how to make the motors work.. so i know they do actually work.. and i kinda know about things like Wire-shark to see whats happening on the network.. but I'm missing the LinuxCNC bit..

and much as i kinda get the HAL bit.. I've not managed to figure out how to start making a HAL for EtherCat servos...

so can anyone point me in the right direction .. and also does anyone want me to make a set of instructions.. or am i making something nobody wants... :-)

thanks in advance..

Pb..

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

More
29 Oct 2020 18:22 #187706 by Padstar
so mayeb a sysrep would be handy

ive got a PC with linuxCNC installed.. (which is what I'm typing this on )

i have tried to install some ethercat master driver.. and i can run Ethercat commands.. but i'm getting issues with permissions, it not working with the interface cars.. etc..

and oh i have just one Savch Servo plugged in .. which works with my simple motor demo box.. (using a raspberry Pi and Codesys.. ) i can give you more info if needed.. but I'm using a DS402 profile or something.. :-)

anyway ... clearly ask me.. and i will fill in what i know...

Pb

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

More
30 Oct 2020 08:14 - 30 Oct 2020 08:15 #187757 by Grotius
Hi Padstar,

You can look at this post : info

If you have any problems with ethercat, you can install a ethercat iso : iso

. I've not managed to figure out how to start making a HAL for EtherCat servos.
You can start using existing lcec drivers. There are some custom servo drivers spread around.
There are a lot of examples how to set up your .xml file and your hal file. examples

If you start linuxcnc and do a halshow you can see your port and pins of the ethercat thread.

Feel free to ask ;)
Last edit: 30 Oct 2020 08:15 by Grotius.

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

More
30 Oct 2020 16:57 #187804 by Padstar
Another day and a good bit of time spent... But going nowhere fast

Ok... So I've downloaded and installed the iso recommended, but from then on I've not had much luck,

So the install script wouldn't run, I did some general distro updates, but nothing is working.

So as the steps are quite complex, and there does seem to be a different story depending on the forum post... Am I able to get set of tools and utility's I need that will allow the Ethercat install...

I'm nothing but confused...

Thanks everyone

Pb

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

More
30 Oct 2020 18:59 - 30 Oct 2020 19:00 #187816 by Grotius
Hi Pb,

Another day and a good bit of time spent... But going nowhere fast
Yeah, that's life man.

So the install script wouldn't run, I did some general distro updates, but nothing is working.
Ahaa, i think i know your problem.
During installation you must keep the administrator password empty. Wich has resulted in wrong priveleges.
I suggest you filled in a admin name + password, that's wrong. I just added this comment to the readme file.
Install the iso again. Read this also before install : github.com/grotius-cnc/LINUX_RTOS/blob/main/README.md

Oke try to fix this, and then report !!
;)

Good luck and take your time !
Last edit: 30 Oct 2020 19:00 by Grotius.

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

More
30 Oct 2020 19:33 #187820 by Padstar
Wow thanks for the speedy response...

Ok... yes... I totally put a password in, so I’ve just kicked off the install again... and I’ll report back ASAP...

Pb

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

More
31 Oct 2020 13:50 #187907 by Padstar
So... With a quick rebuild "which i think could be a primary skill when working on linux"

The way it worked is, you leave the root password blank, but it won't let you log in as root, so log in as the account you create (mine is called "cnc") and then run the install script... Which then does a boat load of stuff.. See the pictures below

I've stopped now for a moment... But ill check it out later...

Thanks for all the help so far

Pb
Attachments:

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

More
31 Oct 2020 14:22 #187913 by Grotius
Ahh, that look's nice !!

Yes, when u want to be admin u use before a terminal command $ sudo
With a linuxcnc rip install don't use $ sudo make..
In this way linuxcnc will not start. Linuxcnc will not start as root. So in that case you have to recompile the rip after you did a make clean.

You don't have a beckhoff device?

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

More
31 Oct 2020 17:29 #187928 by Padstar
Now I do have some beckhoff devices,

Here is a shot of the ethercat device list

Now I have one question, how can I change the ethernet card from the onboard card which its picked as being the ethercat master... Now it's not really important, but my experience with ethercat on raspberry pi is you can't share the adapter with things like modbus, or tcpip, etc...

Then also.... What's the next step... How can I do all the connecting of my inputs and outputs with Linuxcnc... Would I be right that we need to edit some files...

Pb
Attachments:

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

More
31 Oct 2020 18:39 - 31 Oct 2020 18:47 #187934 by Grotius
Hi, very nice !

This is the info on github with the iso :
After the ethercat installation, start the linuxcnc desktop launcher, the lcec will show up in Linuxcnc "show hal configuration". Add your I/O modules to your needs in the linuxcnc_axis desktop map ethercat-conf.xml. Connect your I/O modules to linuxcnc in the hal file, in this axis-qtvcp example it uses the qtvcp_postgui.hal file to connect the ethercat I/O

Just open your desktop map : linuxcnc_axis and edit file /Desktop/linuxcnc_axis/configs/sim.qtvcp_screens//ethercat-conf.xml
to your needs.

Its off iso :
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="EK1100" name="Terminal"/>
</master>
</masters>

In your case, following your terminal picture :
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="EK1100" name="Terminal"/>
<slave idx="1" type="EL1008" name="Fun"/>
<slave idx="2" type="EL1008" name="More Fun"/>
<slave idx="3" type="EK2004" name="We"/>
<slave idx="4" type="EK2004" name="Have"/>
<slave idx="5" type="EK2004" name="Succeed"/>
</master>
</masters>

For the rasperri i can not advise you.
But there is ethernet over ethercat. You can read about this in spare time.

Ethercat is configured for your mac adres, you mac adres can be changed by terminal commands, even automatic.
This methode is used by kali linux for special purposes.

Now start lcnc. Look at halshow. If everything looks fine.
Just connect some lcec i-o pins to hal.

You can also test with halcommand : setp lcec. .. ..

Have fun, and take your time !
Last edit: 31 Oct 2020 18:47 by Grotius.

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

Time to create page: 0.261 seconds
Powered by Kunena Forum