Advanced Search

Search Results (Searched for: )

  • notJamesLee
  • notJamesLee
19 Jan 2025 20:25
Replied by notJamesLee on topic Steppers Not Moving / Mapped Wrong

Steppers Not Moving / Mapped Wrong

Category: Basic Configuration

Thanks, I'm sorry im sure this is painful for you guys but it helps me alot.This might be stupid but from the motor to the driver. I took my VMM and ran a continuity tests on the 4 leads on the motor. I found two pairs that were continuous. I assigned one pair to A /- and the other pair to B /- on the high voltage section of the driver. Ill attach the motor and the driver spec sheets (they're not great but they exist).is there a way to tell if the drive is dead? Like some sort or test i can run or check the resistance across some pins? I didn't see any magic smoke and LED indicators are on when the machine has power. I think these are relatively cheap should i just replace them?
  • Murphy
  • Murphy
19 Jan 2025 19:57

Remora - ethernet NVEM / EC300 / EC500 cnc board

Category: Computers and Hardware

I'm going to buy a genuine omron encoder. I think a lot of my problems are with these cheap knock offs. All of the ones I have opened don't have an encoder wheel inside. Iv no idea how it's able to get the signal accurately. See pic attached of one of them.

So how does the Z index pin work with the ec500. I have A and B working and connected to the WHA and WHB of the MPG bypassing the opticouplers. If I want to attach the Z from the encoder what pin does this connect to? Will I have to bypass another opticoupler? 
  • my1987toyota
  • my1987toyota's Avatar
19 Jan 2025 19:53
Brilliant Bambu Lab was created by my1987toyota

Brilliant Bambu Lab

Category: Off Topic and Test Posts

  So their is a lot of buzz around Bambu Lab with their soon to be released firmware for their 3D printers ( X1C for now, the rest later)
where they're starting down the path of closing their echo system and exerting more control of what the printer's owner can or can't
do with the machine they paid for. I myself own an X1C but made sure it couldn't update it's firmware using a temporary router and
loading programs via SD cards.

  All one has to do is a search on YouTube to see what's going on. And all under the guise of safety and security of the end consumer.
(Yeah where have I heard that one before.) Hilariously I was looking into building a Voron to deal with future tariffs imposed in the
US. Now it seems like I will be building one because I refuse to put up with being fenced in by obvious cash grabs and money funnels.
( You will own nothing and be happy ) Oh yeah, hold my caliper

  It's a shame, I really do like my X1C and have recommended them in the past to those not interested in building and tuning
a 3D printer. Yes I was one of them as well. That said If Bambu Lab wants to continue this course then they can go the way of
the Do-Do. So I guess it's either Prusa or Voron for the masses.

If one would like a Louise Rossman take on it enjoy the below


 
  • Stanislavz
  • Stanislavz
19 Jan 2025 19:26
Replied by Stanislavz on topic Custom scara kinematic.

Custom scara kinematic.

Category: General LinuxCNC Questions

Thank you. Did try to make some code, all loks trivial, except i do not undrestood how does we keep our z axis/ ensure 0 of z axis at the middle. ie - if in config i set up z as viable from 0 till 1800, then i could manipulate D1 (console height) and D5 (effector length) as in code below to compensate for this. but i to not see how it would work for different setups or and shell i do the same for forward kinematic. Or better skip both, and just setup machine for -900 till 900 z travel and play coordinate transfer ?  this line : z_transformed = z - D1 + D5 ; // should return as at 0 level of arms for -900
#include "rtapi.h"
#include "rtapi_math.h"
#include "rtapi_string.h"
#include "posemath.h"
#include "hal.h"
#include "kinematics.h"
#include "switchkins.h"

struct scara_data {
    hal_float_t *d1, *d2, *d3, *d4, *d5, *d6;
} *haldata = 0;

#define D1 (*(haldata->d1))
#define D2 (*(haldata->d2))
#define D3 (*(haldata->d3)) // Now used as Z_parallelogram height
#define D4 (*(haldata->d4)) // Keep as fixed second arm length
#define D5 (*(haldata->d5))
#define D6 (*(haldata->d6))

static
int scaraKinematicsForward(const double * joint,
                      EmcPose * world,
                      const KINEMATICS_FORWARD_FLAGS * fflags,
                      KINEMATICS_INVERSE_FLAGS * iflags)
{
    double a0, a1, a3;
    double x, y, z, c;

    a0 = joint[0] * ( PM_PI / 180 );
    a1 = joint[1] * ( PM_PI / 180 );
    a3 = joint[3] * ( PM_PI / 180 );

    a1 = a1 + a0;
    a3 = a3 + a1;

    // Compute projected second arm length dynamically
    double D4_projected = sqrt(D4 * D4 - joint[2] * joint[2]);
    
    x = D2*cos(a0) + D4_projected*cos(a1) + D6*cos(a3);
    y = D2*sin(a0) + D4_projected*sin(a1) + D6*sin(a3);
    
    // Compute parallelogram-based Z
    z = sqrt((D3 - joint[2]) * (D3 - joint[2]) + D4_projected * D4_projected);
    c = a3;

    *iflags = 0;
    if (joint[1] < 90)
        *iflags = 1;

    world->tran.x = x;
    world->tran.y = y;
    world->tran.z = z;
    world->c = c * 180 / PM_PI;

    world->a = joint[4];
    world->b = joint[5];

    return (0);
}

static int scaraKinematicsInverse(const EmcPose * world,
                                  double * joint,
                                  const KINEMATICS_INVERSE_FLAGS * iflags,
                                  KINEMATICS_FORWARD_FLAGS * fflags)
{
    double a3;
    double q0, q1;
    double xt, yt, rsq, cc;
    double x, y, z, c;
    
    double D4_projected, z_transformed;
    
    x = world->tran.x;
    y = world->tran.y;
    z = world->tran.z;
    c = world->c;

    a3 = c * ( PM_PI / 180 );

    xt = x - D6*cos(a3);
    yt = y - D6*sin(a3);
    
    z_transformed = z - D1 + D5 ; // should return as at 0 level of arms for -900

    rsq = xt*xt + yt*yt;
    
    D4_projected = sqrt(D4 * D4 - z_transformed * z_transformed);
    
    cc = (rsq - D2 * D2 - D4_projected * D4_projected) / (2 * D2 * D4_projected);
    if(cc < -1) cc = -1;
    if(cc > 1) cc = 1;
    q1 = acos(cc);

    if (*iflags)
        q1 = -q1;

    q0 = atan2(yt, xt);
    xt = D2 + D4_projected*cos(q1);
    yt = D4_projected*sin(q1);
    q0 = q0 - atan2(yt, xt);

    q0 = q0 * (180 / PM_PI);
    q1 = q1 * (180 / PM_PI);

    joint[0] = q0;
    joint[1] = q1;
    
    // Compute inverse for parallelogram Z
    
    joint[2] = sqrt(z_transformed * z_transformed - D4_projected * D4_projected);
    
    joint[3] = c - ( q0 + q1);
    joint[4] = world->a;
    joint[5] = world->b;

    *fflags = 0;

    return (0);
}    //scaraKinematicsInverse()

#define DEFAULT_D1 1200
#define DEFAULT_D2 1200
#define DEFAULT_D3 600
#define DEFAULT_D4 1500
#define DEFAULT_D5 300
#define DEFAULT_D6 0

static int scaraKinematicsSetup(const  int   comp_id,
                                const  char* coordinates,
                                kparms*      kp)
{
    int res=0;

    haldata = hal_malloc(sizeof(*haldata));
    if (!haldata) goto error;

    res += hal_pin_float_newf(HAL_IN, &(haldata->d1), comp_id,"%s.D1",kp->halprefix);
    res += hal_pin_float_newf(HAL_IN, &(haldata->d2), comp_id,"%s.D2",kp->halprefix);
    res += hal_pin_float_newf(HAL_IN, &(haldata->d3), comp_id,"%s.D3",kp->halprefix);
    res += hal_pin_float_newf(HAL_IN, &(haldata->d4), comp_id,"%s.D4",kp->halprefix);
    res += hal_pin_float_newf(HAL_IN, &(haldata->d5), comp_id,"%s.D5",kp->halprefix);
    res += hal_pin_float_newf(HAL_IN, &(haldata->d6), comp_id,"%s.D6",kp->halprefix);
    if (res) { goto error; }

    D1 = DEFAULT_D1;
    D2 = DEFAULT_D2;
    D3 = DEFAULT_D3;
    D4 = DEFAULT_D4;
    D5 = DEFAULT_D5;
    D6 = DEFAULT_D6;

    return 0;

error:
    return -1;
}    // scaraKinematicsSetup()

int switchkinsSetup(kparms* kp,
                    KS* kset0, KS* kset1, KS* kset2,
                    KF* kfwd0, KF* kfwd1, KF* kfwd2,
                    KI* kinv0, KI* kinv1, KI* kinv2
                   )
{
    kp->kinsname    = "scarakins"; // !!! must agree with filename
    kp->halprefix   = "scarakins"; // hal pin names
    kp->required_coordinates = "xyzabc"; // ab are scaragui table tilts
    kp->allow_duplicates     = 0;
    kp->max_joints = strlen(kp->required_coordinates);

    rtapi_print("\n!!! switchkins-type 0 is %s\n",kp->kinsname);
    *kset0 = scaraKinematicsSetup;
    *kfwd0 = scaraKinematicsForward;
    *kinv0 = scaraKinematicsInverse;

    *kset1 = identityKinematicsSetup;
    *kfwd1 = identityKinematicsForward;
    *kinv1 = identityKinematicsInverse;

    *kset2 = userkKinematicsSetup;
    *kfwd2 = userkKinematicsForward;
    *kinv2 = userkKinematicsInverse;

    return 0;
}     // switchkinsSetup()
  • bnet
  • bnet's Avatar
19 Jan 2025 19:03

Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?

Category: Driver Boards

Thanks for confirming this, I haven't used multiple Mesa boards at once before. What a great system.
  • Aciera
  • Aciera's Avatar
19 Jan 2025 18:53 - 19 Jan 2025 18:57
Replied by Aciera on topic Custom scara kinematic.

Custom scara kinematic.

Category: General LinuxCNC Questions

For a simple example of a custom kinematic see
'configs/sim/axis/vismach/millturn'

The kinematic file used is this one:
github.com/LinuxCNC/linuxcnc/blob/master...onents/millturn.comp

These .comp files can be compiled and installed using the 'halcompile' tool.

[edit]
For a more complex example see:
github.com/LinuxCNC/linuxcnc/blob/master.../xyzab_tdr_kins.comp
 
  • chrischan
  • chrischan
19 Jan 2025 18:40
Replied by chrischan on topic Maus funktioniert nicht bei Spindel Start

Maus funktioniert nicht bei Spindel Start

Category: Deutsch

Also manchmal ist die "Lösung" doch simpler als gedacht. Sicherlich ist trotzdem eine Störung durch Spindel und Relais in Verbindung vorhanden. Aber keiner weiß wie gravierend diese ist. Ergebnis ist jedoch, dass eine andere Mouse mein Problem beseitigt.

Ich habe eine andere kabelgebundene Mouse getestet und diese funktioniert problemlos.

Danke an alle. Werde trotzdem noch den Ferrit einsetzen der die Tage kommt. Und damit belasse ich es vorerst.
  • PCW
  • PCW's Avatar
19 Jan 2025 18:33 - 19 Jan 2025 18:55
Replied by PCW on topic Mesa modbus and pktUart

Mesa modbus and pktUart

Category: Other User Interfaces

HAL_BIT type definitely works as this tested, working configuration:


static const hm2_modbus_chan_descriptor_t channels = {
/*  {TYPE,    FUNC, ADDR,   COUNT, pin_name} */
    {HAL_BIT, 1,  0x0000, 8,     "state"},
    {HAL_BIT, 2,  0x0000, 8,     "input"},
    {HAL_BIT, 5,  0x0000, 1,     "relay-0"},
    {HAL_BIT, 5,  0x0001, 1,     "relay-1"},
    {HAL_BIT, 5,  0x0002, 1,     "relay-2"},
    {HAL_BIT, 5,  0x0003, 1,     "relay-3"},
};

Can you post your .mod file?

The inverted enable pin may not be recognized by 2.9.3 but it
should still work.
 
  • vre
  • vre
19 Jan 2025 18:28 - 19 Jan 2025 18:29
Replied by vre on topic Mesa modbus and pktUart

Mesa modbus and pktUart

Category: Other User Interfaces

2.9.3 version
I have tried many config combinations nothing works
HAL_BIT type not supported by linuxcnc
Unsupported HAL pin type (1) in mesa_modbus definition file
  • Stanislavz
  • Stanislavz
19 Jan 2025 18:19
Replied by Stanislavz on topic Is it worth it to buy larger stepper drivers?

Is it worth it to buy larger stepper drivers?

Category: General LinuxCNC Questions

RMS is not "true" amps for some static amps for holding. But if yiu can test it now and its holds yout torque and it is not too hot - all is ok.
  • Stanislavz
  • Stanislavz
19 Jan 2025 18:13 - 19 Jan 2025 18:38
Replied by Stanislavz on topic Custom scara kinematic.

Custom scara kinematic.

Category: General LinuxCNC Questions

 Like this one, but here it is mid arm with parallelogram. And  i will need to modify this one code : github.com/LinuxCNC/linuxcnc/blob/master...nematics/scarakins.c 
  • tommylight
  • tommylight's Avatar
19 Jan 2025 18:11 - 19 Jan 2025 18:14
Replied by tommylight on topic Custom scara kinematic.

Custom scara kinematic.

Category: General LinuxCNC Questions

The attachment is inside the code section, hence it does not show.
Here is the image from the above post, just in case.
  • Stanislavz
  • Stanislavz
19 Jan 2025 18:06 - 19 Jan 2025 18:08
Custom scara kinematic. was created by Stanislavz

Custom scara kinematic.

Category: General LinuxCNC Questions

Hello. Could some-one point me how to implent non-standart kinematic for robots ?

As in photo below - scara with one arma at 1200 length and other with 1500, but able to swing up and down for some z movement ?

And yes - due to z movement of outer arm, project length is chaniged and needs to be recalculated for each z position. I did all math side for both forward and inverse kinematics.
[attachment=67048]2025-01-1918_53_54-_scara-FreeCAD1.0.0.png[/attachment]

[code]import math
import linuxcnc

def forward_kinematics(joint):
    """
    Forward kinematics for SCARA with parallelogram mechanism and tension-controlled Z movement.
    joint[0] = Theta1 (Base rotation)
    joint[1] = Theta2 (Second arm rotation)
    joint[2] = Z movement via parallelogram
    """
    L1 = 1.2  # First arm length (m)
    L2 = 1.5  # Second arm length (m) to achieve 1.8m z reach
    Z_parallelogram = 0.6  # Parallelogram tension control length (m)
    Z_min, Z_max = -0.9, 0.9  # Define valid Z range
    
    # Clamp Z within limits
    z = max(Z_min, min(joint[2], Z_max))
    
    # Compute effective second arm length with bidirectional movement
    L2_projected = math.sqrt(L2**2 - z**2)
    
    # Compute correct tension-controlled parallelogram movement
   delta_z = math.sqrt((Z_parallelogram - z)**2 + L2_projected**2)
    
    # Compute end-effector position
    x = L1 * math.cos(joint[0]) + L2_projected * math.cos(joint[0] + joint[1])
    y = L1 * math.sin(joint[0]) + L2_projected * math.sin(joint[0] + joint[1])
    
    return (x, y, delta_z)

def inverse_kinematics(x, y, z):
    """
    Inverse kinematics for SCARA with parallelogram mechanism and tension-controlled Z movement.
    """
    L1 = 1.2  # First arm length (m)
    L2 = 1.5  # Second arm length (m) for 1.8m reach
    Z_parallelogram = 0.6  # Parallelogram tension control length (m)
    Z_min, Z_max = -0.9, 0.9  # Define valid Z range
    
    # Clamp Z within limits
    z = max(Z_min, min(z, Z_max))
    
    # Adjust for parallelogram tension effect using correct formula
    L2_projected = math.sqrt(L2**2 - z**2)
    adjusted_z = math.sqrt((Z_parallelogram - z)**2 + L2_projected**2)
    
    # Compute effective second arm length with bidirectional movement
    L2_eff = math.sqrt(L2**2 - adjusted_z**2)
    
    # Compute inverse kinematics
    D = (x**2 + y**2 - L1**2 - L2_eff**2) / (2 * L1 * L2_eff)
    
    if abs(D) > 1:
        raise ValueError("Position out of reach")
    
    theta2 = math.acos(D)
    theta1_1 = math.atan2(y, x) - math.atan2(L2_eff * math.sin(theta2), L1 + L2_eff * math.cos(theta2))
    theta1_2 = math.atan2(y, x) - math.atan2(-L2_eff * math.sin(theta2), L1 + L2_eff * math.cos(theta2))
    
    return [(theta1_1, theta2, adju [attachment=67048]2025-01-19 18_53_54-_ scara - FreeCAD 1.0.0.png[/attachment]sted_z), (theta1_2, theta2, adjusted_z)]  # Two possible solutions



And Z axis should be controlled by some rope wire tensioning paralelogram part.

 
[/code]
  • langdons
  • langdons's Avatar
19 Jan 2025 17:53
Replied by langdons on topic Is it worth it to buy larger stepper drivers?

Is it worth it to buy larger stepper drivers?

Category: General LinuxCNC Questions

I don't have a driver capable of 4.6A.

I have one DM556 driver that is capable of 4A RMS maximum.

That is all.
  • Aciera
  • Aciera's Avatar
19 Jan 2025 17:52
Replied by Aciera on topic rotation plane around y axis in g18

rotation plane around y axis in g18

Category: G&M Codes

For a basic example have a look at the 'configs/sim/axis/vismach/millturn' for a similar use case.

The kinematic file used is this one:
github.com/LinuxCNC/linuxcnc/blob/master...onents/millturn.comp

For a simple vertical/horizontal kinematic you would only need to change this:
        case 0:
            pos->tran.x = j[0];
            pos->tran.y = j[1];
            pos->tran.z = j[2];
            pos->a      = j[3];
            break;
        case 1:
            pos->tran.x = j[2];
            pos->tran.y = -j[1];
            pos->tran.z = j[0];
            pos->a      = j[3];
            break;
    }
    // unused coordinates:
    pos->b = 0;
    pos->c = 0;
    pos->u = 0;
    pos->v = 0;
    pos->w = 0;
to
        case 0:
            pos->tran.x = j[0];
            pos->tran.y = j[1];
            pos->tran.z = j[2];
            break;
        case 1:
            pos->tran.x = -j[0];
            pos->tran.y = j[2];
            pos->tran.z = j[1];
            break;
    }
    // unused coordinates:
    pos->a = 0;
    pos->b = 0;
    pos->c = 0;
    pos->u = 0;
    pos->v = 0;
    pos->w = 0;
Displaying 19471 - 19485 out of 21692 results.
Time to create page: 0.364 seconds
Powered by Kunena Forum