Advanced Search

Search Results (Searched for: )

  • Grotius
  • Grotius's Avatar
18 Nov 2024 12:46
Ethercat auto configurator. was created by Grotius

Ethercat auto configurator.

Category: EtherCAT

Hi Guys,

This file is a program for auto configuration for ethercat devices.

It don't need a .xml config file to setup your linuxcnc ethercat environment.

It uses a sligtly modified ethercat-master source code to retrieve a digital "$ ethercat xml".
And has a bug fix for inconsistent alias nr's.

This source code an be integrated to a linuxcnc component quite easely.
Therefore may be there are volunteers to do this.

As i tested this on the following bus configuration with succes, it's not tested to config servo's etc.
If i had a ethercat servo here, i would sure test it right away.

Example output :
Starting EtherCAT master 1.5.2  done
init example 0.
init ethercat start.
Print ethercat devices and retrieve device data vector.
No alias given, alias -

pdo entry registration:

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 1
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 2
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 3
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL1004 4K. Dig. Eingang 24V, 3ms
         Slave Alias: 0
         Position: 4
         Vendor ID: 2
         Product Code: #x03ec3052
         PDO Entry Index: #x6000
         PDO Entry Subindex: 1

         Name:EL2794 4K. Dig. Ausgang 24V AC/DC, 2A, kurzschlussfest
         Slave Alias: 0
         Position: 5
         Vendor ID: 2
         Product Code: #x0aea3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2808 8K. Dig. Ausgang 24V, 0.5A
         Slave Alias: 0
         Position: 6
         Vendor ID: 2
         Product Code: #x0af83052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3101
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3101
         PDO Entry Subindex: 2

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3102
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3102
         PDO Entry Subindex: 2

         Name: empty
         Slave Alias: 0
         Position: 0
         Vendor ID: 0
         Product Code: #x00000000
         PDO Entry Index: #x0000
         PDO Entry Subindex: 0

halpin names:

         EL2124_1_0_0_IN_BOOL
         EL2124_1_1_0_IN_BOOL
         EL2124_1_2_0_IN_BOOL
         EL2124_1_3_0_IN_BOOL
         EL2124_2_0_0_IN_BOOL
         EL2124_2_1_0_IN_BOOL
         EL2124_2_2_0_IN_BOOL
         EL2124_2_3_0_IN_BOOL
         EL2124_3_0_0_IN_BOOL
         EL2124_3_1_0_IN_BOOL
         EL2124_3_2_0_IN_BOOL
         EL2124_3_3_0_IN_BOOL
         EL1004_4_0_0_OUT_BOOL
         EL1004_4_1_0_OUT_BOOL
         EL1004_4_2_0_OUT_BOOL
         EL1004_4_3_0_OUT_BOOL
         EL2794_5_0_0_IN_BOOL
         EL2794_5_1_0_IN_BOOL
         EL2794_5_2_0_IN_BOOL
         EL2794_5_3_0_IN_BOOL
         EL2808_6_0_0_IN_BOOL
         EL2808_6_1_0_IN_BOOL
         EL2808_6_2_0_IN_BOOL
         EL2808_6_3_0_IN_BOOL
         EL2808_6_4_0_IN_BOOL
         EL2808_6_5_0_IN_BOOL
         EL2808_6_6_0_IN_BOOL
         EL2808_6_7_0_IN_BOOL
         EL3162_7_0_0_OUT_UINT
         EL3162_7_0_1_OUT_UINT
         EL3162_7_1_0_OUT_UINT
         EL3162_7_1_1_OUT_UINT

PDO entry registration ok.
Master ok.
domain1_pd ok.
init ethercat succes.



 
  • Grotius
  • Grotius's Avatar
18 Nov 2024 12:24
Replied by Grotius on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

Hi,

The ethercat auto configurator works finally !!

When program starts, it initializes the ethercat devices by retrieving a digital xml configuration.
For this i poked around in the etherlab source code, and added some function's to retrieve this digital xml information.

From the given digital xml information, it then does some logic and it create's hal pins automaticly.

This is ideal for lazy system integrators.

For this to use you don't need a .xml config file like in linuxcnc-ethercat.

I also solved a etherlab_master software  bug related to slave alias numbers, wich where not consistent and
resulted in head scratching for some time as the aliases are not printed by : "$ ethercat xml"

The terminal output when starting the program :
Starting EtherCAT master 1.5.2  done
init example 0.
init ethercat start.
Print ethercat devices and retrieve device data vector.
No alias given, alias -

pdo entry registration:

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 1
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 2
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 3
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL1004 4K. Dig. Eingang 24V, 3ms
         Slave Alias: 0
         Position: 4
         Vendor ID: 2
         Product Code: #x03ec3052
         PDO Entry Index: #x6000
         PDO Entry Subindex: 1

         Name:EL2794 4K. Dig. Ausgang 24V AC/DC, 2A, kurzschlussfest
         Slave Alias: 0
         Position: 5
         Vendor ID: 2
         Product Code: #x0aea3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2808 8K. Dig. Ausgang 24V, 0.5A
         Slave Alias: 0
         Position: 6
         Vendor ID: 2
         Product Code: #x0af83052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3101
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3101
         PDO Entry Subindex: 2

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3102
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3102
         PDO Entry Subindex: 2

         Name: empty
         Slave Alias: 0
         Position: 0
         Vendor ID: 0
         Product Code: #x00000000
         PDO Entry Index: #x0000
         PDO Entry Subindex: 0

halpin names:

         EL2124_1_0_0_IN_BOOL
         EL2124_1_1_0_IN_BOOL
         EL2124_1_2_0_IN_BOOL
         EL2124_1_3_0_IN_BOOL
         EL2124_2_0_0_IN_BOOL
         EL2124_2_1_0_IN_BOOL
         EL2124_2_2_0_IN_BOOL
         EL2124_2_3_0_IN_BOOL
         EL2124_3_0_0_IN_BOOL
         EL2124_3_1_0_IN_BOOL
         EL2124_3_2_0_IN_BOOL
         EL2124_3_3_0_IN_BOOL
         EL1004_4_0_0_OUT_BOOL
         EL1004_4_1_0_OUT_BOOL
         EL1004_4_2_0_OUT_BOOL
         EL1004_4_3_0_OUT_BOOL
         EL2794_5_0_0_IN_BOOL
         EL2794_5_1_0_IN_BOOL
         EL2794_5_2_0_IN_BOOL
         EL2794_5_3_0_IN_BOOL
         EL2808_6_0_0_IN_BOOL
         EL2808_6_1_0_IN_BOOL
         EL2808_6_2_0_IN_BOOL
         EL2808_6_3_0_IN_BOOL
         EL2808_6_4_0_IN_BOOL
         EL2808_6_5_0_IN_BOOL
         EL2808_6_6_0_IN_BOOL
         EL2808_6_7_0_IN_BOOL
         EL3162_7_0_0_OUT_UINT
         EL3162_7_0_1_OUT_UINT
         EL3162_7_1_0_OUT_UINT
         EL3162_7_1_1_OUT_UINT

PDO entry registration ok.
Master ok.
domain1_pd ok.
init ethercat succes.

So far 4 data types are integrated : bool, uint, string, bit.
It currently looks at one master. But code may look at more masters in the future.

So far so good !

Integration in linuxcnc is not that difficult, as you can add this code into a component, using a function like
rtapi_app_main(); will then run the code, will also create hal pin's etc. with some slightly modifications.
 
  • JT
  • JT's Avatar
18 Nov 2024 12:19 - 18 Nov 2024 12:20

Flex Gui forces machine into Manual mode when any other process switches to MDI

Category: Other User Interfaces

Thanks for the example file that helped a lot to narrow down where the mode change was taking place. Your program now works without changing modes and MDI commands in Flex work as expected.

JT
  • azax
  • azax
18 Nov 2024 11:48 - 18 Nov 2024 11:53

problem while connecting the MESA 7i76e card to RS422 modbus-RTU and servo drive

Category: Driver Boards

Hello everyone,
I am new to using LinuxCNC and the Mesa 7i76e.After connecting the Mesa 7i76e and the L7S servo drive using Modbus-RTU, I followed the connection setup as mentioned in this link:
forum.linuxcnc.org/27-driver-boards/3328...6e-with-uart?start=0

I also used the following bitfile:

freeby.mesanet.com/7i76e_7i76x1_PktD.bit

and I flashed it using Mesaflash.Next, I attempted to communicate with the L7S servo drive using the Mesa card and LinuxCNC. I connected the servo drive to the Mesa card and then connected it to a computer via Ethernet.I followed the codes provided at the bottom of this link:

linuxcnc.org/docs/stable/html/drivers/me...us.html#_quick_start

However, I modified the configuration from 7i96s to 7i76e. I calculated the CRC from google and tried sending an inertia code from terminal . my code like this :
#! /bin/bash
# First setup the DDR and Alt Source regs for the 7I96
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x1100=0x1F800
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x1104=0x1C3FF
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x1200=0x1F800
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x1204=0x1C3FF
# Next set the baud rate DDS's for 9600 baud
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6300=0x65
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6700=0x65
# setup the TX and RX mode registers
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6400=0x00000A20
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6800=0x3FC0140C
# Reset the TX and RX UARTS
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6400=0x80010000
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6800=0x80010000
# load two 8-byte modbus commands:
01 05 00 00 5A 00 F7 6A
11 03 00 8C 00 01 47 71
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6100=0x8C000311
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6100=0x71470100
# Command the TX UART to send the two 8 byte packets
mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6200=0x08
#mesaflash --device 7i76e --addr 10.10.10.10 --wpo 0x6200=0x08
sleep 1
# display TX Mode
mesaflash --device 7i76e --addr 10.10.10.10 --rpo 0x6400
# display the RX mode reg, RX count, and the data
mesaflash --device 7i76e --addr 10.10.10.10 --rpo 0x6800
mesaflash --device 7i76e --addr 10.10.10.10 --rpo 0x6600
mesaflash --device 7i76e --addr 10.10.10.10 --rpo 0x6500
mesaflash --device 7i76e --addr 10.10.10.10 --rpo 0x6500

During testing, I noticed that when I send values, the L7S servo drive responds with unintelligible numbers or data that I cannot interpret.
 
Could the issue be in the transmission process I followed, or is it a hardware connection problem? For example, do I need a converter from RS-422 to RS-485?I would appreciate any help. Thank you! 
  • onceloved
  • onceloved's Avatar
18 Nov 2024 11:37
Replied by onceloved on topic Linux CNC powered Ethercat Mill Retrofit

Linux CNC powered Ethercat Mill Retrofit

Category: EtherCAT

If you need, I can help you configure remotely. You can contact me via the following methods: WeChat: 304394405 Discord: onceloved.cn
  • tommylight
  • tommylight's Avatar
18 Nov 2024 11:37
Replied by tommylight on topic Configuring dual independent Z-axis

Configuring dual independent Z-axis

Category: General LinuxCNC Questions

The easy way: make another config for spindle.
LinuxCNC can handle multiple spindles, so that is easy, and i would still set the second Z axis as A since using any other letter would imply having CAM that can output gcode with that letter.
Scaling might need a bit of tweaking.
Do Z axis have home switches?
Do you need both used at the same time?
  • Aciera
  • Aciera's Avatar
18 Nov 2024 11:32
Replied by Aciera on topic Configuring dual independent Z-axis

Configuring dual independent Z-axis

Category: General LinuxCNC Questions

Here is a sim config for a router with 3 heads using custom switchable kinematics. The advantage here is that the gcode can use XYZ axis words regardless of which spindle is used:
forum.linuxcnc.org/10-advanced-configura...y-and-control#292847
  • tommylight
  • tommylight's Avatar
  • tommylight
  • tommylight's Avatar
18 Nov 2024 11:13
Replied by tommylight on topic 10 or 11 stepgen

10 or 11 stepgen

Category: General LinuxCNC Questions

Yes.
  • rbj
  • rbj
18 Nov 2024 10:45 - 18 Nov 2024 10:46

Configuring dual independent Z-axis

Category: General LinuxCNC Questions

My plasma table has a unique feature: it has dual independent Z-axis, Z1 and Z2, see picture.
The idea is to be able to use two different tools, like a plasma torch and a router.
Question is, how to configure this in linuxcnc?

I am using QTplasmaC as UI and linuxcnc version 2.9.3.
I have tried a XYZW configuration, copying and changing the z-axis/join-2 to w-axis/joint-3 but this result in a crash in qtvcp/qt_makegui.py at line 498: 'VCPWindow' object has no attribute 'home_w'.

I have tried using the XYZA configuration. This works, sort of, but after homing the feed rate becomes incredibly slow. Seems to be dividing everything by 360. Does not make a difference if I set the A-axis to LINEAR instead of ANGULAR.

How to configure this setup?
  • shaki6996
  • shaki6996
18 Nov 2024 10:11 - 18 Nov 2024 11:23

Build documentation for our 500W Raycus fiber laser using LinuxCNC and QtPlasmaC

Category: Plasma & Laser

Here's a potential response:  

"Congratulations on reaching a usable state for your fiber laser cutter project! It’s always inspiring to see open-source communities come together to achieve something remarkable. Your acknowledgment of the contributions from dedicated individuals like Phillip Carter, Tom Berisha, Peter Wallace, Rod Webster, and many others highlights the strength and spirit of collaboration within the LinuxCNC forums.  

Sharing your configuration on GitHub and documenting the process is incredibly valuable for others embarking on similar projects. This effort not only helps foster knowledge sharing but also ensures the community continues to thrive and innovate. Kudos to you and the contributors for making this possible!"
You can read more complete information about laser fiber marking machine in the rough
  • Aciera
  • Aciera's Avatar
18 Nov 2024 08:57 - 18 Nov 2024 10:32
Replied by Aciera on topic Download Lube component

Download Lube component

Category: Deutsch

Versuchs mal mit dieser python Komponente.

1. Code unten als 'interval.py' im gleichen Ordner wie deine .ini Datei abspeichern und als Ausführbare Datei markieren.

#!/usr/bin/env python3
import time
import hal

h = hal.component("interval")
h.newpin("enable", hal.HAL_BIT, hal.HAL_IN) # HIGH enables the interval timer
h.newpin("reset", hal.HAL_BIT, hal.HAL_IN) # On change LOW->HIGH restarts the interval
h.newpin("start-with-pulse", hal.HAL_BIT, hal.HAL_IN) # If TRUE the interval starts with a pulse
h.newpin("out", hal.HAL_BIT, hal.HAL_OUT) # Output of the the interval timer, LOW if 'enable' is LOW
h.newpin("delay-time", hal.HAL_FLOAT, hal.HAL_IN) # Interval low time in milliseconds
h.newpin("pulse-time", hal.HAL_FLOAT, hal.HAL_IN) # Interval high time in milliseconds
h.newpin("time-elapsed", hal.HAL_FLOAT, hal.HAL_OUT) # Elapsed low/high time in milliseconds
h.ready()

running = False
reset = False

try:
    while 1:
        if h['enable']:
            delay_time = h['delay-time']
            pulse_time = h['pulse-time']
            if not h['reset']: reset = False
            if h['reset'] and not reset:
                running = False
                reset = True
            if not running:
                timer = round(time.time()*1000)
                running = True
                h['out'] = h['start-with-pulse']
            else:
                h['time-elapsed'] = round(time.time()*1000) - timer
            if not h['out'] and round(time.time()*1000) >= timer + delay_time:
                h['out'] = True
                timer = round(time.time()*1000)
            if h['out'] and round(time.time()*1000)  >= timer + pulse_time:
                h['out'] = False
                timer = round(time.time()*1000)
        else:
            h['out'] = False
            h['time-elapsed'] = 0
            running = False

except KeyboardInterrupt:
    raise SystemExit


2. in der ini unter [HAL] diese Zeilen hinzfügen.


HALCMD = loadusr -W ./interval.py
HALCMD = setp interval.delay-time 2000
HALCMD = setp interval.pulse-time 500

3. das 'Show HalConfiguration' tool öffnen, im linken Teil die 'interval' Komponente suchen und im 'Watch' tab die pins anzeigen. Dann 'interval.enable' auf True setzen und der Timer sollte laufen. :

 
  • Mecanix
  • Mecanix
18 Nov 2024 08:40 - 18 Nov 2024 08:51

Strange motion offsets in one direction on one axis

Category: General LinuxCNC Questions

Good to hear the wiring, solder joints and crimps are all solid. Nasty checks... but had to be done. 

Trying to reproduce would be greatly helpful. Cutting material or air, up to you. If air cutting just ensure you record a reference before for when you pause the machine where it crapped out last time, and meas offsets.

One important asset you forgot to post is your gcode. That also needs to be ruled out. Not doubting your skills here, but I'd be happy to spare a few minutes to validate it inside an industrial ISV/sim running a proven Lcnc postprocessor for you. That'll reveal if or not.

Nice machine-tool. You'd obviously know from half a mile away if indeed hardware related already (you built-it, it's in the blood line).
  • timo
  • timo
18 Nov 2024 08:28
Replied by timo on topic LinuxCNC for lathe questions

LinuxCNC for lathe questions

Category: General LinuxCNC Questions

Small mini PCs and Rpi appear to be almost same price. (when housing and power supply are added to the purchase)
The Mini PCs have only a volume of roughly 0.5 - 1 liter.
Seems neither space nor $ is a valid argument anymore, considering that the rest of the electrics will take up some space too.

My go to would be the Ethernet based card and one of the mini PCs.
  • meister
  • meister
18 Nov 2024 07:28

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

That reminds me, is there a way to configure minimum delay time between a DIR change and a movement command? some steppers are more picky about that. I also need to flip the action of the EN pin, my steppers are enable-low and it's currently outputting high when enabled.
 


you can config modifier's to each pin, there are functions like invert, debounce, ...

 

to add an delay between step and dir, you can add a debounce modifier to the step pin, than you have a delayed step signal


 
Displaying 17641 - 17655 out of 24281 results.
Time to create page: 0.635 seconds
Powered by Kunena Forum