LinuxCNC whit Sercos II

More
04 Nov 2017 13:31 #101307 by Martinez
LinuxCNC whit Sercos II was created by Martinez
Hi, I needed help with a problem that I have.

I want to build a plasma cutting CNC and I want to use a servo motor and Allen Bradley units that use the Sercos II interface.

Can you configure linuxcnc with Sercos II?

I thought about using a Sercos II master as a PCI card that is in the market.

I hope someone can help me, greetings.

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

More
06 Nov 2017 12:57 #101419 by andypugh
Replied by andypugh on topic LinuxCNC whit Sercos II
Some people have managed to use Sercos with Machinekit (based on LinuxCNC.)
For example this Youtube video .

This paper also seems to use SecosIII
rd.springer.com/article/10.1007/s00170-015-6786-y

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

More
06 Nov 2017 14:49 #101428 by Martinez
Replied by Martinez on topic LinuxCNC whit Sercos II
Thanks for responding but the drivers use Sercos II not Sercos III interface.
This interface is communicated by optical fiber and not by Ethernet cable, that is the problem.

Greetings.

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

More
06 Nov 2017 16:07 #101430 by andypugh
Replied by andypugh on topic LinuxCNC whit Sercos II
Looking at the available PCI cards I suspect that, for a specific set of hardware, this might not be so difficult.
Writing a generic driver is likely to be quite a task, but assembling packets for specific cards using values from a HAL pin should be fairly simple.

An example of a similar sort of driver is here:
github.com/LinuxCNC/linuxcnc/blob/master.../drivers/pcl720.comp
That is for an ISA card, but the principles are very similar (PCI is plug-and-play so you would expect to get the base address from the device rather than the user). Basically converting numbers to register values and sending them to the card.

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

More
20 Sep 2024 15:06 - 20 Sep 2024 15:08 #310518 by arabel1a
Replied by arabel1a on topic LinuxCNC whit Sercos II
Hi!

I've made my LinuxCNC work with SERCOS II (fiber optics). Now my machine (Trumph TC2000R) has been working well for almost a year, and I'm positive that there are no bugs.

My steps were:
1. Bought a cheap SERCOS II PCI extension card from Beckhoff (FC7501, ~$150), plugged it into the free Beckhoff 3 suite
2. Sart sniffing the digital signals using my $10 logical analyzer from aliexpress
3. Set up all drives using the Beckhoff, so I have a full log of startup messages and synchronization process
4. Parsed it
5. Captured and analyzed a lot of command messages, so now I understand how messages are built
6. Made a dummy STM32(~$200) device, which takes a SERCOS message from the Ethernet and transmits it into the IO pin. You don't even need a real-time ethernet card, because SERCOS II is synchronous and the period between timings is fixed. My module even operates in user-space!

To sum up, the whole Sercos II protocol was re-implemented, and I developed a Linuxcnc module that prepares a message. The code is available here: github.com/arabel1a/sercos2-linuxcnc

However, it is more proof-of-concept than a plug-and-play solution. The main drawbacks include:
1. You need a capture synchronization messages (first few seconds after startup), I wasn't able to reimplement this stage.
2. STM32 hardware code (which just sends a message received on ethernet) can't be published due to some legal reasons.
3. The code is a bit messy, and not any configuration is supported. I used my drive in velocity command mode with feedback other modes are untested.

Anyway, my machines have been working for almost a year, and you can reproduce it with the code above. It costed me <$500 and a nine months of work, which is much less than a brand new NC unit from Trumph ($10,000!) If someone would be interested in making a more user-friendly solution, I would be honored to assist you -- contact me via github.
Last edit: 20 Sep 2024 15:08 by arabel1a.
The following user(s) said Thank You: Benb, Aciera

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

More
18 Oct 2024 13:40 - 18 Oct 2024 15:38 #312508 by swampdigger
Replied by swampdigger on topic LinuxCNC whit Sercos II
Hi arabel1a, 

Very interesting. I have some Sercos II drives myself.

I'm thinking the STM32 came with the Sercos software stack, saving a lot of work. Do you have a link to the device you used?

Any thoughts on driving the FC7501 card directly? It has a well documented PLX 9052 PCI interface on one side, and the mysterious SERCOS ASIC on the other side.

Did you ever find any docs for the Sercos ASIC? The datasheet is available, but references a programming manual which I can't find.

I wrote a quick PCI driver for QEMU which presents itself as a fake 7501 card. Windows seems happy with this and auto loads the driver. My thought was, this fake driver could be tied to a second driver on the Linux side attached to a real 7501, allowing the command stream across the PCI bus to be captured. 

Although without the manual, it's probably more trouble than it's worth. Looking forward to hearing more about the STM32 you used.
Last edit: 18 Oct 2024 15:38 by swampdigger.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum