Advanced Search

Search Results (Searched for: )

  • GuiHue
  • GuiHue's Avatar
21 Jul 2025 22:00

Commission drive on AX5206) using TC3 to prep for linuxcnc-ethercat

Category: EtherCAT

Hi everyone,
I seek help in commissioning a Motor with a Beckhoff Ax5000 series drive within TwinCAT to then transfer that tested setup to linuxcnc-ethercat. I cannot for the life of me get that motor to run over.
Setup:
Motor: HarmonicDrive LynxDrive-20C-100-MEE-AO (reduction 100, MEE Encoder (Heidenhain EQN-1125 Endat 2.2/2.1), motor values are known, commutation unknown)
Driver: Beckhoff AX5206-0000-0203 Fw 1.06
Goal: Be bale to move the drive from NC in Twincat to check for functionality of the setup
What did I try:
- Scan Bus in TwinCat to find devices
- Found the Driver
- Setup of power management, safety (off), set mode for channel 1 to position control
- Setup Channel 1: X11 for encoder connector, selected Heidenhain EQN1125 from list, manually setup the motor with relevant values (pdf: harmonicdrive.de/fileadmin/user_upload/E...8856_08_2018_V04.pdf, page 17)
    When I try to scan for the encoder it identifies as Endat 2.2 without a nameplate. However, when selecting an Endat2.2 from the list of encoders, it does not work. (0xF148: Build drive system: unknown feedback system)
    Question: I assumed that this table takes the values for the motor and not for the output shaft (which is behind the harmonic drive's reduction), correct?
- Setup of scaling
     Question:  Here I am not sure. To me it makes the most sense to set this up for the motor shaft (as this is where the encoder is). I.e. 360°/motor revolution (see screenshot) - correct?
 
Next would be to setup the commutation setup (mechanical and electrical offset).
This is where I struggle.  The manual (www.beckhoff.com/en-en/download/61857533) states two different chapters regarding commutation:

1) Chapter 9.1.4 Third-party Motors
Step one asks to ensure motor rotation: The output shaft is connected to the HD. Given a reduction of 100 it is really difficult to backdrive the thing. Question: Am I correct in assuming that the HD reverses the direction of rotation? that is: if the servo motor moves CW, the output moves CCW?
Next step is the electrical commutation offset determination.
I tried to follow page 168ff using P-0-0166:
I get values after starting the command, with equal directions being "No". Changing U and V accordingly changes direction of the motor, but has no effect. I cannot get a constant value. I keep chasing my tail around.
Note: At this point P-0-0150 Commutation Node is set to 3; Adjustable commutation offset (mechanical) is 0 deg

I then followed chapter
Manual 9.6 list commutation methods (p 201ff)
Accordinglx, P-0-0160 is executed first
Regardless of the actual value of P-0-00578 (Electrical commutation offset) I get a value for the mechanical commutation offset which I enter in P-0-0150 above.
Doing so, an flipping the polarity of UV, I then get the following result for P-0-0166: Equal Directions: yes; Offset: 357.55 deg
 
I do not understand what way is the correct way. Accordingly, I am not sure if the offset is correct.
Now I undertand I should be able to move th eaxis using NC-A: Online (image 3)
 
I can enable the drive and it does start to make light noises and one can feel light vibration on the output shaft.
However, when I send a command using F2/F3 I get an increase in following error and nothing moves. (Image 4).
 
Parameters of the axis enc are as indicated by image 5.
 
I assume something in scaling is borked and thus the PID cant work properly. But I cannot find anything that is missing.

- I have checked (to the best of my ability) the polarity and pins for both the power and the encoder connector. At this point I assume that these are correct.
- I have manually pulsed the motor with a low dc voltage, It then performs the expected jump. The encoder provides a new value afterwards as well.
I am open for any and all advice. It must be sooo close.
Thank you!
 
  • cristachelu
  • cristachelu
21 Jul 2025 20:30
Replied by cristachelu on topic Ethercat Servo+Glas scale = clods loop

Ethercat Servo+Glas scale = clods loop

Category: EtherCAT

I think your motor encoder feedback needs to go into your motor driver while the glass scale quadrature signals into linux CNC PID module.
  • PCW
  • PCW's Avatar
21 Jul 2025 19:36

7i96s Flash for additional PWM and Wiring for laser

Category: Driver Boards

Looks OK

You can also simply delete the num_xxxx=n stanzas in the hal file
and all hardware in a particular configuration will be enabled.
  • roland100
  • roland100
21 Jul 2025 19:15

7i96s Flash for additional PWM and Wiring for laser

Category: Driver Boards

Hello PCW,
I managed to get rid of the error messages by changing these values in the hal file:
num-pwmgens = 2 (from 1) and
num-stepgens = 4 (from 5)

Now I also can see pwmgen.01 in the halcmd show all *pwmgen*:

roland@linuxCNC:~$ halcmd show all *pwmgen*
Loaded HAL Components:
ID Type Name PID State

Component Pins:
Owner Type Dir Value Name
36 bit IN FALSE hm2_7i96s.0.pwmgen.00.enable <== spindle-enable
36 float IN 0 hm2_7i96s.0.pwmgen.00.value <== spindle-vel-cmd-rpm
36 bit IN FALSE hm2_7i96s.0.pwmgen.01.enable
36 float IN 0 hm2_7i96s.0.pwmgen.01.value

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name
36 bit RW FALSE hm2_7i96s.0.pwmgen.00.offset-mode
36 s32 RW 1 hm2_7i96s.0.pwmgen.00.output-type
36 float RW 18000 hm2_7i96s.0.pwmgen.00.scale
36 bit RW FALSE hm2_7i96s.0.pwmgen.01.offset-mode
36 bit RW TRUE hm2_7i96s.0.pwmgen.01.out0.invert_output
36 bit RW FALSE hm2_7i96s.0.pwmgen.01.out0.is_opendrain
36 s32 RW 1 hm2_7i96s.0.pwmgen.01.output-type
36 float RW 5000 hm2_7i96s.0.pwmgen.01.scale
36 u32 RW 0x005B8D80 hm2_7i96s.0.pwmgen.pdm_frequency
36 u32 RW 0x00004E20 hm2_7i96s.0.pwmgen.pwm_frequency

Parameter Aliases:
Alias Original Name
hm2_7i96s.0.pwmgen.01.out0.invert_output hm2_7i96s.0.gpio.025.invert_output
hm2_7i96s.0.pwmgen.01.out0.is_opendrain hm2_7i96s.0.gpio.025.is_opendrain


is this correct ?
Tahnks a lot and good night
  • Ac1dburn
  • Ac1dburn
21 Jul 2025 18:50

Remora - Rpi Software Stepping Using External Microcontroller via SPI

Category: Computers and Hardware

Alright, I'm getting really close now (I think), but I'm to a point where I'm not 100% sure what the deal is. Unfortunately, the pin I needed to use for the QEI encoder module happens to be a bad pin on my SKR 1.4 Turbo apparently. I can't get it to pull high. I may have messed it up years ago trying to get neopixel LEDs working, I don't know. I set up a new pin as a digital input on the Y limit connector (Pin 1.28) and simply mapped the index pulse to that pin in my hal file. I'm seeing what appears to be a solid pulse in halscope. I'm also seeing it trigger on the phaseZ and index-enable pins. However, every time trying to do a threading operation, my program hangs at what appears to be waiting on the index pulse. I know the documentation states that the pins are pre-assigned and can't be changed, but I figured the index was handled differently since it included the remora.input.N is mapped in hal, but maybe something on the backend with the way the QEI encoder is handled. I apologize in advance if my HAL and INI look messy but everything else seems to work. I had to set my servo thread to 2000000 to get around the unexpected real-time delay error, but my latency in histogram --nobase seems great with isolcpus 1,2,3 on the Pi 4. I did try running the program with the servo period set to 1000000 in my INI just to see if that had something to do with a timing issue when registering the index-enable true when Linuxcnc expects to see it, but, it didn't work. Just about everything else seems to be working. Anyways here's my HAL again, my INI, and my config.txt
  • PCW
  • PCW's Avatar
21 Jul 2025 18:36

7i96s Flash for additional PWM and Wiring for laser

Category: Driver Boards

Did you enable 2 PWMGens in the hal file?
  • kn612
  • kn612
21 Jul 2025 18:35
Replied by kn612 on topic Servo Driver Plasma Retrofit

Servo Driver Plasma Retrofit

Category: Plasmac

Success.  I went with LMDE6 and the install went much smoother.  Upgraded to 2.10 and can run a qtplasmac sim. 
  • roland100
  • roland100
21 Jul 2025 18:20

7i96s Flash for additional PWM and Wiring for laser

Category: Driver Boards

Hello PCW,
I flashed my 7i96s with 7i96s_2pwmd.bin and put this line to my custom.hal:

# invert pwm output
setp hm2_7i96s.0.pwmgen.01.out0.invert_output true.

When I start linuxcnc i get the error message
"parameter hm2_7i96s.0.pwmgen.01.out0.invert_output not found"

The hmid-output looks correct:
TB2 2,3 25 IOPort PWM 1 PWM (Out)
TB2 4.5 26 IOPort None
  • PCW
  • PCW's Avatar
21 Jul 2025 17:55

homing with Phase Z encoder on MESA 7i96s

Category: Advanced Configuration

Can you post a halscope plot of: 

1 Joint velocity
2. Joint following error
  • JackRay
  • JackRay
21 Jul 2025 17:31
Replied by JackRay on topic homing with Phase Z encoder on MESA 7i96s

homing with Phase Z encoder on MESA 7i96s

Category: Advanced Configuration

it's a static error. But when I put “I” > 1 I get a joint tracking error.
  • tommylight
  • tommylight's Avatar
21 Jul 2025 17:26
Replied by tommylight on topic PlasmaC Voltage Divider

PlasmaC Voltage Divider

Category: Plasmac

Put 1 resistor on each cable, much safer.
www.mouser.de/ProductDetail/Vishay-Dale/...rmWJGO8s8TXMfjOoM%3D
  • Cerezas
  • Cerezas
21 Jul 2025 17:22

Inverting jogging sense of X Axis on a VistaCNC P1A-S pendant

Category: HAL

Thanks Ben, I tried your suggestion but the behaviour is the same. Works in Velocity mode but not in Step mode.
I spent the morning looking at signals with halmeter but I cannot figure this out.

Thanks for taking your time to look into this.
  • Quarter20
  • Quarter20
21 Jul 2025 16:55
Replied by Quarter20 on topic Y axis A slave help request

Y axis A slave help request

Category: General LinuxCNC Questions

Never mind, I found the issue. It was my fault I mis-wired one of the pins on the bob.Great learning experience with the LinuxCNC software digging through the particulars! You guys pointed me in the right direction, much appreciated!
  • Quarter20
  • Quarter20
21 Jul 2025 16:45
Replied by Quarter20 on topic Y axis A slave help request

Y axis A slave help request

Category: General LinuxCNC Questions

Hi PCW:

Thanks for your reply.
When you mentioned: "So if you don't have dual homing switches you need to setup immediate homing"...can you tell me more about that please?

Thanks for your help and support! I set up my parallel port in the step config just as your image above. I have my motors and bob set up on my desk as a test set up to work out the set up without injury to my machine. In a real world application Id need to be able to jog my Y axis (both motors driven at same time) tgether at once. Would I need to set up something in one of the hal or ini files?

Thanks again for your help.
  • zzrzzr
  • zzrzzr
21 Jul 2025 16:39
Replied by zzrzzr on topic PlasmaC Voltage Divider

PlasmaC Voltage Divider

Category: Plasmac

Thanks.

So I could open the Plasma source, cut the cable behind the THC-plug and solder 2 x 1MegaOhm in series of the negative cable and put a shrink tubing over the 2 resistors ?

Is there an alternative to the 1MegaOhm-resistor ? I ask because in the mesanet-store it shows me over 200$ shipping-cost for the 3 resistors and there is an error when the website calculates shipping costs to germany.
Displaying 11191 - 11205 out of 17851 results.
Time to create page: 0.684 seconds
Powered by Kunena Forum