Advanced Search

Search Results (Searched for: )

  • grandixximo
  • grandixximo's Avatar
Today 10:58
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

@TAKUYA
@Atsu

share your full XML
and the output of ethercat master command after you have started linuxcnc
  • grandixximo
  • grandixximo's Avatar
Today 10:56
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

Experienced some jitter as well today while running grandixximo's fork. I doubt there is any synchronization being done while the dc-phased pin is false and all pll-*** pins are 0. Ran sudo dmesg to see what is happening in the background. Maybe someone can notice something clear in the log:

During startup:
[  801.691210] EtherCAT: Requesting master 0...
[  801.691215] EtherCAT: Successfully requested master 0.
[  801.691915] EtherCAT 0: Domain0: Logical address 0x00000000, 74 byte, expected working counter 12.
[  801.691918] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 74 byte, type LRW.
[  801.691932] EtherCAT 0: Master thread exited.
[  801.691933] EtherCAT 0: Starting EtherCAT-OP thread.
[  801.691970] EtherCAT WARNING 0: 1 datagram UNMATCHED!

During operation:
[  807.424674] EtherCAT WARNING 0-1: Slave did not sync after 5000 ms.
[  808.944250] EtherCAT 0: Slave states on main device: OP.

During shutdown:
[  841.183382] EtherCAT 0: Master thread exited.
[  841.183401] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  841.183449] EtherCAT ERROR 0-0: Failed to receive AL state datagram: Datagram initialized.
[  841.183462] EtherCAT 0: Releasing master...
[  841.183464] EtherCAT 0: Released.
[  841.188247] EtherCAT 0: Slave states on main device: SAFEOP, OP + ERROR.
[  841.196539] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[  841.197317] EtherCAT 0-0: Acknowledged state SAFEOP.
[  841.208612] EtherCAT ERROR 0-1: AL status message 0x001A: "Synchronization error".
[  841.209116] EtherCAT 0-1: Acknowledged state SAFEOP.
[  841.220587] EtherCAT ERROR 0-2: AL status message 0x001A: "Synchronization error".
[  841.221590] EtherCAT 0-2: Acknowledged state SAFEOP.
[  841.256274] EtherCAT 0: Slave states on main device: PREOP.
[  841.828318] EtherCAT WARNING: Datagram 0000000031def7fe (master-fsm) was SKIPPED 1 time.

 

This seems a similar issue, please share your XML file
also send this command 

ethercat master

and share the output
the output should look something like

Master0
  Phase: Operation
  Active: yes
  Slaves: 12
  Ethernet devices:
    Main: 88:03:8f:28:ca:33 (attached)
      Link: UP
      Tx frames:   78788870
      Tx bytes:    65756113151
      Rx frames:   78788869
      Rx bytes:    65756112300
      Tx errors:   0
      Tx frame rate [1/s]:   1000   1000   1000
      Tx rate [KByte/s]:    822.0  822.0  821.9
      Rx frame rate [1/s]:   1000   1000   1000
      Rx rate [KByte/s]:    822.0  822.0  821.9
    Common:
      Tx frames:   78788870
      Tx bytes:    65756113151
      Rx frames:   78788869
      Rx bytes:    65756112300
      Lost frames: 0
      Tx frame rate [1/s]:   1000   1000   1000
      Tx rate [KByte/s]:    822.0  822.0  821.9
      Rx frame rate [1/s]:   1000   1000   1000
      Rx rate [KByte/s]:    822.0  822.0  821.9
      Loss rate [1/s]:          0     -0      0
      Frame loss [%]:         0.0   -0.0    0.0
  Distributed clocks:
    Reference clock:   Slave 0
    DC reference time: 826799805203739108
    Application time:  826800839056809695
                       2026-03-14 10:53:59.056809695

 
  • Taichi
  • Taichi's Avatar
Today 10:34

Again about HOME_INDEX in step/dir mode

Category: StepConf Wizard

Hello everyone. I haven't been to the forum for a long time.
Need help and complete clarity in using HOME_INDEX = YES and STEP/DIR
When I upgraded old machines that used analog control and encoder feedback, this issue was not there. In the topic Homing index andypugh writes and gives a link to the source file homing.c. I asked chatGPT to analyze this file. And the chat says that indeed to reset the HOME_INDEX search flag you need a signal from encoder.n.index-enable. That is, linuxcnc does not support the function of searching for 0 labels in step/dir mode.
Most of the new hobby machines that I and my friends are currently assembling use servos in step/dir mode and without a closed loop. Since for a hobby, the driver <-> motor with encoder connection is enough. But home_switch gives a small but noticeable error. Therefore, such a request will appear more and more often.
On my 7i92 there are no free 9 pins for 3 x A B Z encoders. And almost all servo drivers have a simple transistor output that duplicates the 0 encoder mark.
Are there any "macros" or "tricks" to get around this problem?
Is it possible to add this functionality to the homing.c source?
Thx for help.
  • grandixximo
  • grandixximo's Avatar
Today 09:49 - Today 10:50
Replied by grandixximo on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

I have the same issue as TAKUYA, the dc-phased pin never goes high. I managed to fix this using Claude AI and now the dc-phased pin goes high. I have attached a detailed notes of what was changed in the code as well as some screenshots from before and after.

NOTE: this was done entirely with the help of AI and I am not qualified enough to say whether it is correct or not! Grandixximo, could you please review the notes and share your thoughts? Opening the attached HTML file in a browser, you can view the notes which were generated. It is too long to copy-paste here.

EDIT: After testing the code more thoroughly, I'm getting jitter again. It's very likely that the AI's "fix" only addressed the dc-phased pin but broke something else... I've reverted back to the master branch ( github.com/grandixximo/linuxcnc-ethercat), and everything is working again except for the dc-phased pin.
 

 

The issues the AI found are not issues,
  1. Same-cycle read — No, 
    reference_clock_time
     reads from the previous cycle's response, already received in 
    lcec_read_master
  2. Missing 
    sync_monitor_queue
     — Not needed; DC ref clock time comes from the normal sync datagrams
  3. sync_reference_clock
     guard — Intentionally skipped in M2R mode (correct behavior)
And not something related to my changes, the behaviors were already present from upstream, can you share your xml file? Your app time seems good, but the pll-err is suspiciously to 0
which tells me you probably do not have DC, is assignActivate set to 300 on your DC capable devices?
Your first device lacks DC, I would advise to keep the first device on your network to be DC active, or you may need to set which slave does the DC timing reference in the XML, I always keep first device DC, have not tested differently, can't say for sure.
  • EK1100 — coupler, no DC
  • EL1008 — digital input, no DC
  • EL2008 — digital output, no DC
  • 3× StepperOnline A6 — these should have DC, but only if 
    assignActivate
     is set in the XML config
In your XML you will need something like

    <master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1">
        <slave idx="xx" type="devicewith DC" >
        <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="250000"/>
        </slave>Or you share your XML here, I will take a look, I think you do not have DC at all at the moment, you never even used any of my code changes at all.
  • grandixximo
  • grandixximo's Avatar
Today 08:46 - Today 08:47
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Hello, 

I can see merge of your progress to master? Am I right ?

Regards e.
 


No, we will make another PR for merging into master, this is more of a testing version, it was shared as a draft, it is good to get feedback on it, as it will be the base for the future work.
  • h.hermes
  • h.hermes
Today 08:22
Replied by h.hermes on topic RPi and 7i90 via SPI, estop

RPi and 7i90 via SPI, estop

Category: Driver Boards

Unfortunately I am new to alll this hal stuff. Is there a good place to learn more about it?
I attach the hal and ini files.
Thanks!
  • liutas4x4
  • liutas4x4
Today 07:23

Is it possible to write comments at .ini at the same row?

Category: General LinuxCNC Questions

the same for .hal

it should (must) be solved one day.
  • dm17ry
  • dm17ry's Avatar
Today 06:32
Replied by dm17ry on topic Mitsubishi SSCNET

Mitsubishi SSCNET

Category: Installing LinuxCNC

MR-J3-A (as well as MR-J,J2,J2S,J4,J5-A) drives have generic pulse train position or +-10V analog speed and/or torque control

MR-J,J2,J2S-B - copper SSCNET I/II control interface
MR-J3,J4,J5-B - optical SSCNET III or III/H
MR-J5-G - CC-Link IE TSN over gigabit Ethernet
MR-J5-G-N1 - EtherCAT
  • PCW
  • PCW's Avatar
Yesterday 01:23
Replied by PCW on topic RPi and 7i90 via SPI, estop

RPi and 7i90 via SPI, estop

Category: Driver Boards

Sounds like a HAL file setup error of some kind rather than a hardware related error.

Posting the hal/ini files would be helpful

 
  • rbobey1989
  • rbobey1989's Avatar
Yesterday 23:05
Add Speed ​​Mode Support, EL7342 was created by rbobey1989

Add Speed ​​Mode Support, EL7342

Category: EtherCAT

Hello for all:
I created an issue in Scott's linuxcnc-ethercat repository with this content to provide support for the EL7342 module in speed mode and to be able to use some of the internal functionalities of the module that are not currently supported in the lcec_el7342 driver. Unfortunately, my minimal changes have not worked; I have not yet been able to get velocity control mode working.

Hi Scott, first of all, thank you for your great contribution to the LinuxCNC community, of which I am a member.

Now, getting down to business:

I've been inspecting the EL7342 module for a few days now. I currently have one on my workbench. I've tried reading and studying your code for the lcec_el7342 driver, and everything is correct regarding PWM/direct mode. The problem is that I've spent several days making minor modifications to both PDOs and SDOs to see if I can force the driver to operate in speed control mode, but I can't get the module's internal PID controller to work.

From the module manual I have obtained the following information:

8022:01 (Operation mode)
0: Automatic
1: Velocity direct
2: Velocity controller
3: Position controller
...: reserved
15: Chopper resistor

Although in chapter 6.6.4 (Selection of the operating mode), I infer that if the correct PDOs are configured, the module should enter the correct mode without problems:

You can select the operating mode in the index 0x8022:01"Operation mode". It is recommended that you select the operation mode "Automatic" (Fig. Setting the operation mode) and then set the suitable operation mode for your application on the Process Data tab. More information on this can be found in the chapter "Process Data".

Then in chapter 6.5.3 Predefined PDO Assignment the following is proposed:

The "Predefined PDO Assignment" enables a simplified selection of the process data. The desired function is selected on the lower part of the "Process Data" tab. As a result, all necessary PDOs are automatically activated, and the unnecessary PDOs are deactivated.

This chapter also includes a table with the predefined PDOs for each application. While it doesn't perfectly match the one currently implemented in the driver, it largely aligns with the first row, Velocity Control Compact. Therefore, I understand that to use the module's internal PID controller, we should use the PDOs listed in the second row.

Velocity control compact
SM2, PDO assignment: 0x1600, 0x1602, 0x1604, 0x1606, 0x1607, 0x1609
SM3, PDO assignment: 0x1A00, 0x1A03, 0x1A06, 0x1A08

static ec_pdo_info_t lcec_el7342_pdos_out[] = { 
{0x1600, 7, lcec_el7342_channel1_enc_out}, 
{0x1602, 7, lcec_el7342_channel2_enc_out}, 
{0x1604, 5, lcec_el7342_channel1_dcm_out}, 
{0x1606, 1, lcec_el7342_channel1_vel_out}, 
{0x1607, 5, lcec_el7342_channel2_dcm_out}, 
{0x1609, 1, lcec_el7342_channel2_vel_out},
};

static ec_pdo_info_t lcec_el7342_pdos_in[] = { 
{0x1a00, 17, lcec_el7342_channel1_enc_in}, 
{0x1a03, 17, lcec_el7342_channel2_enc_in}, 
{0x1a06, 14, lcec_el7342_channel1_dcm_in}, 
{0x1a07, 2, lcec_el7342_channel1_dcm_sync_info}, 
{0x1a08, 14, lcec_el7342_channel2_dcm_in}, 
{0x1a09, 2, lcec_el7342_channel2_dcm_sync_info},
};

As you can see in the driver, two more PDOs are added to SM3: 0x1a07 and 0x1a09. However, these are informational PDOs, so I don't think they're very relevant.

Now I'll list the PDOs mentioned in the second row of the table, which are the ones we should map:

Velocity control
SM2, PDO assignment: 0x1601, 0x1603, 0x1604, 0x1606, 0x1607, 0x1609
SM3, PDO assignment: 0x1A01, 0x1A04, 0x1A06, 0x1A08

Therefore, the configuration would look something like this:

static ec_pdo_info_t lcec_el7342_pdos_out[] = {
{0x1601, 7, lcec_el7342_channel1_enc_out}, //test

{0x1603, 7, lcec_el7342_channel2_enc_out}, //test 
{0x1604, 5, lcec_el7342_channel1_dcm_out}, 
{0x1606, 1, lcec_el7342_channel1_vel_out}, 
{0x1607, 5, lcec_el7342_channel2_dcm_out}, 
{0x1609, 1, lcec_el7342_channel2_vel_out},
};

static ec_pdo_info_t lcec_el7342_pdos_in[] = { 
{0x1a01, 17, lcec_el7342_channel1_enc_in}, //test 
{0x1a04, 17, lcec_el7342_channel2_enc_in}, //test 
{0x1a06, 14, lcec_el7342_channel1_dcm_in}, 
{0x1a07, 2, lcec_el7342_channel1_dcm_sync_info}, 
{0x1a08, 14, lcec_el7342_channel2_dcm_in}, 
{0x1a09, 2, lcec_el7342_channel2_dcm_sync_info},
};

Reviewing the description of these new PDOs in the manual, there are a few points to note:

1st - PDOs 0x1601 and 0x1603:07 have a different bit length compared to PDOs 0x1600 and 0x1602, so I've made the following changes:

static ec_pdo_entry_info_t lcec_el7342_channel1_enc_out[] = {
{0x0000, 0x00, 1}, // Gap

{0x7000, 0x02, 1}, // Enable latch external on positive edge

{0x7000, 0x03, 1}, // Set counter

{0x7000, 0x04, 1}, // Enable latch external on negative edge

{0x0000, 0x00, 4}, // Gap 
{0x0000, 0x00, 8}, // Gap 
{0x7000, 0x11, 32}, // Set counter value //test
};

static ec_pdo_entry_info_t lcec_el7342_channel2_enc_out[] = { 
{0x0000, 0x00, 1}, // Gap 
{0x7010, 0x02, 1}, // Enable latch extern on positive edge 
{0x7010, 0x03, 1}, // Set counter 
{0x7010, 0x04, 1}, // Enable latch extern on negative edge 
{0x0000, 0x00, 4}, // Gap 
{0x0000, 0x00, 8}, // Gap
{0x7010, 0x11, 32},  // Set counter value //test
};

Something that isn't entirely clear in the manual is whether, in Velocity Control mode, the speed should be scaled to 16 bits or expressed in revolutions per minute (RPM) in the command PDO???

I'm also unclear on whether I should write the same command PDO as the one used in the current driver???

static ec_pdo_entry_info_t lcec_el7342_channel1_vel_out[] = {
    {0x7020, 0x21, 16},  // Velocity  ??????
};

static ec_pdo_entry_info_t lcec_el7342_channel2_vel_out[] = {
    {0x7030, 0x21, 16},  // Velocity  ??????
};

With these minimal configurations, I've performed some tests without success. For example, I tried setting all the internal PID constants to zero, hoping the motor wouldn't move, but it always moves. In other words, I'm always operating in PWM/Direct mode, which I can't change even though I select Velocity Control mode or use Automatic mode via SDO in both lcec_el7342.c and XML.

Although I'll continue investigating, I would appreciate any help.
  • PCW
  • PCW's Avatar
Yesterday 22:09
Replied by PCW on topic pin locations

pin locations

Category: General LinuxCNC Questions

All the spindle control stuff would be on TB3

(the SSR outputs for FOR and REV and PWM for the speed control)
  • natas01
  • natas01
Yesterday 21:53
Replied by natas01 on topic pin locations

pin locations

Category: General LinuxCNC Questions

Just trying to hook up the spindle.
And don’t know what im doing. Lol
I can wire a overhead crane but this keeps me scratching my head
  • PCW
  • PCW's Avatar
Yesterday 21:26
Replied by PCW on topic pin locations

pin locations

Category: General LinuxCNC Questions

Those are unused resources (for sserial expansion) and not relevant to
configuration (unless you want to repurpose those I/O pins)
  • rodw
  • rodw's Avatar
Yesterday 20:42 - Yesterday 20:42

current latest download of LinuxCNC V2.9.8 will not install GRUB on several PC's

Category: Installing LinuxCNC

Also be aware that Trixie no longer uses /etc/apt/sources.list.d
Instead it uses the new deb822 format and places its sources in /etc/apt/sources.list.d
And as you said, for a DVD install, the source files will be configured to look on the ISO, not at the Debian mirrors
Displaying 1 - 15 out of 283895 results.
Time to create page: 3.059 seconds
Powered by Kunena Forum