Advanced Search

Search Results (Searched for: )

  • PCW
  • PCW's Avatar
04 Jan 2025 16:21 - 04 Jan 2025 17:18

Mesa 7i95T spindle step/Direction setup using stepgen

Category: Driver Boards

Never mind, the PID stuff is all side stepped by:

net machine-is-on => hm2_[MESA](BOARD).0.stepgen.03.enable
net spindle-vel-cmd-rps => hm2_[MESA](BOARD).0.stepgen.03.velocity-cmd
net spindle-vel-fb-rps <= hm2_[MESA](BOARD).0.stepgen.03.velocity-fb

But it looks like machine-is-on is not connected, it probably should be something like:

net machine-is-on  <=motion.motion-enabled
 
  • Lcvette
  • Lcvette's Avatar
04 Jan 2025 16:19
Replied by Lcvette on topic Mcode out of range, greater than 199 error

Mcode out of range, greater than 199 error

Category: G&M Codes

its been a while since i tested this, and i currently have a large project pulled that i don't want to exist until finished as we are preparing a release for qtpyvcp and probe basic.

based on spumco's response above does this mean that a remap for 200+ mcodes is required? i think spumco is running probe basic also if memory serves so his experience should be the same as the pb sim.
  • PCW
  • PCW's Avatar
04 Jan 2025 16:16

Mesa 7i95T spindle step/Direction setup using stepgen

Category: Driver Boards

As a first step try this:

[SPINDLE_0]
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 300.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAX_VEL = 125.00
STEPGEN_MAX_ACC = 375.00
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0.001
MAX_OUTPUT = 2000
  • Lcvette
  • Lcvette's Avatar
04 Jan 2025 16:15
Replied by Lcvette on topic Mcode out of range, greater than 199 error

Mcode out of range, greater than 199 error

Category: G&M Codes

would it be better to use 100-199 for the switchkins to avoid the possible conflict?
  • Sternfox
  • Sternfox
04 Jan 2025 16:10

Mesa 7i95T spindle step/Direction setup using stepgen

Category: Driver Boards

Thanks for the reply.

I have tried that already, and no joy, wasn't sure if it was a incorrect setting in my configs
  • Lcvette
  • Lcvette's Avatar
04 Jan 2025 16:08

[SOLVED] ProbeBasic NameError: name 'tool' is not defined

Category: QtPyVCP

ok i found the issue and corrected and just pushed the fix to the develop branch. and we are about to make a new release soon to move the current develop to the new stable branch, will be a day or so to follow.

and no, it is a great catch, thanks for bringing it up! it was a stray edit that was saved in the backplotter code and needed fixing.
  • Aciera
  • Aciera's Avatar
04 Jan 2025 16:07
Replied by Aciera on topic Mcode out of range, greater than 199 error

Mcode out of range, greater than 199 error

Category: G&M Codes


The error only occurs when I don't remap m-codes higher than 199. If you don't remap, then LCNC's standard user m-code range is 100-199, using capital "M" and no file extension.


Yes, that is the expected behavior.
  • Aciera
  • Aciera's Avatar
04 Jan 2025 16:05 - 04 Jan 2025 16:09
Replied by Aciera on topic Mcode out of range, greater than 199 error

Mcode out of range, greater than 199 error

Category: G&M Codes

@Lcvette
Do you get the same errors when running the switchkins sim configs that are included in the standard Linuxcnc installation?
  • spumco
  • spumco
04 Jan 2025 16:04
Replied by spumco on topic Mcode out of range, greater than 199 error

Mcode out of range, greater than 199 error

Category: G&M Codes

This would indicate that the remap has not been setup correctly. Could you guys post your ini files that cause this error please?
 

Aciera,

The error only occurs when I don't remap m-codes higher than 199.  If you don't remap, then LCNC's standard user m-code range is 100-199, using capital "M" and no file extension.

Using remap and mxxx.ngc permits an essentially unlimited number of m-codes.  I get no errors with my remap:

This works fine for me (combo of user m-codes and remapped mcodes)
[RS274NGC]
PARAMETER_FILE = lathe.var
USER_M_PATH = /home/lathe/linuxcnc/configs/LATHE_REV1.70/MCODES/
SUBROUTINE_PATH = /home/lathe/linuxcnc/configs/LATHE_REV1.70/subroutines
RS274NGC_STARTUP_CODE = F10 S0 G7 G18 G20 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
;ORIENT_OFFSET =
#REMAP=G12.1 ngc=g121
#REMAP=G13.1 ngc=g131
REMAP=M200  modalgroup=10   ngc=m200
REMAP=M201  modalgroup=10   ngc=m201
REMAP=M202  modalgroup=10   ngc=m202
REMAP=M203  modalgroup=10   ngc=m203
REMAP=M210  modalgroup=10   ngc=m210
REMAP=M211  modalgroup=10   ngc=m211
REMAP=M212  modalgroup=10   ngc=m212
REMAP=M213  modalgroup=10   ngc=m213
REMAP=M220  modalgroup=10   ngc=m220
REMAP=M221  modalgroup=10   ngc=m221
REMAP=M222  modalgroup=10   ngc=m222
REMAP=M223  modalgroup=10   ngc=m223
REMAP=M268  modalgroup=10   ngc=m268
REMAP=M269  modalgroup=10   ngc=m269
  • erdem
  • erdem
04 Jan 2025 16:03
Replied by erdem on topic Cnclinux do not find harddisk

Cnclinux do not find harddisk

Category: Installing LinuxCNC

Hi , I installed old version debian in 2019. I try to update my linuxcnc , but terminal codes is locked.How am I making unlock?
  • tommylight
  • tommylight's Avatar
04 Jan 2025 16:01
Replied by tommylight on topic connecting to laser TTL

connecting to laser TTL

Category: Plasma & Laser

If, from your experience, TTL in this context means PWM,

Yes it does. In this case it means 5V PWM, see below:
The naming TTL has remained from logic IC's back when there were two types of them, the TTL ones (Transistor-Transistor-Logic) and CMOS ( C.... Metal Oxide Semiconductors, damn it cant recall what C stands for),
TTL are 5V powered with +-5% tolerance, and if i recall correctly, "logic 0" was anything under 0.8V and "logic 1" was anything over 2.4V
CMOS were powered by 3V to 9V or more, i think, and "logic 0" was under 33% of the supply voltage and "logic 1" was everything above 66% of the supply voltage.
A bit fuzzy on details, been over 40 years since i used those daily.
  • Aciera
  • Aciera's Avatar
04 Jan 2025 15:56
Replied by Aciera on topic Custom kinematics

Custom kinematics

Category: Advanced Configuration

I believe that the method you linked to is used to add a custom kinematic to the sim configs listed under section 2. So I just tried it:

Created a file 'mykins.c':
/* userkfuncs.c: template file for a user set of
**               switchable kinematics functions.
** License GPL Version 2
**
** Example Usage (for customizing the genser-switchkins module):
** (works with rtpreempt only rtai --> Makefile needs work)
**
**        LDIR is LinuxCNC git root directory
**        UDIR is user directory (not in LinuxCNC git tree)
**  1) $ cp LDIR/src/emc/kinematics/userkfuncs.c  UDIR/my_userk.c
**  2) $ edit   UDIR/my_userk.c as required
**  3) $ source LDIR/scripts/rip-environment
**  4) For genser-switchkins module use make command line option:
**     $ cd LDIR/src
**     $ userkfuncs=UDIR/my_userk.c make && sudo make setuid
*/

// typical includes:
//#include "rtapi_math.h" // if reqd
#include "kinematics.h"
#include "hal.h"

// Add for kins based on genserkins:
// #include "genserkins.h" //includes gomath,hal

//**********************************************************************
// static local variables and functions go here

static int userk_inited = 0;
static struct udata {
    hal_s32_t *fct;
    hal_s32_t *ict;
} *udata;

//**********************************************************************
int userkKinematicsSetup(const int   comp_id,
                         const char* coordinates,
                         kparms*     kp)
{
    int res=0;
    rtapi_print("\nuserkKinematicsSetup:\n"
                  "   %s <%s> max_joints=%d allow_duplicates=%d\n\n",
                __FILE__,coordinates,
                kp->max_joints,kp->allow_duplicates);


    udata = hal_malloc(sizeof(struct udata));
    if (!udata) goto error;

    // HAL_IO used to allow resetting demo pins:
    res += hal_pin_s32_new("userk.fct", HAL_IO, &(udata->fct), comp_id);
    res += hal_pin_s32_new("userk.ict", HAL_IO, &(udata->ict), comp_id);
    if (res) goto error;

    userk_inited = 1;
    return 0; // 0 ==> OK

error:
    return -1;
}

int userkKinematicsForward(const double *joint,
                           struct EmcPose * world,
                           const KINEMATICS_FORWARD_FLAGS * fflags,
                           KINEMATICS_INVERSE_FLAGS * iflags)
{
    if (!userk_inited) {
        rtapi_print_msg(RTAPI_MSG_ERR,
             "myuserkins: not initialized\n");
        return -1;
    }

    world->tran.x = joint[1];
    world->tran.y = joint[0];
    world->tran.z = joint[2];
    world->a = joint[3];
    world->c = joint[4];

    return 0;

}

int userkKinematicsInverse(const EmcPose * pos,
                           double *joint,
                           const KINEMATICS_INVERSE_FLAGS * iflags,
                           KINEMATICS_FORWARD_FLAGS * fflags)
{

            joint[1] = pos->tran.x;
            joint[0] = pos->tran.y;
            joint[2] = pos->tran.z;
            joint[3] = pos->a;
            joint[4] = pos->c;

    return 0;
}

2. compiled on my RIP installation:
user@user-iMac:~/git/linuxcnc-master/src$ userkfuncs=emc/kinematics/mykins.c make
Reading 203/203 dependency files
Done reading dependencies
!!!USERKFUNCS=emc/kinematics/mykins.o
Reading 272/272 realtime dependency files
Done reading realtime dependencies
Compiling realtime emc/kinematics/mykins.c
Linking ../rtlib/genhexkins.so
Linking ../rtlib/genserkins.so
Linking ../rtlib/xyzac-trt-kins.so
Linking ../rtlib/xyzbc-trt-kins.so
Linking ../rtlib/scarakins.so
Linking ../rtlib/pumakins.so
Linking ../rtlib/5axiskins.so
You now need to run 'sudo make setuid' in order to run in place with access to hardware.

3. start 'xyzbc-trt.ini' and SWITCHKINS 'userk' now uses 'mykins.c'
 

SO If you do not want to add another kinematic to one of those sim configs then this likely will not do much for you.
  • mariusl
  • mariusl's Avatar
04 Jan 2025 15:42 - 04 Jan 2025 15:44
Replied by mariusl on topic Custom kinematics

Custom kinematics

Category: Advanced Configuration

Trying to compile a custom kinematic module for RIP uspace rt using switchkins. 
I am sure the documentation sucks as that method does not work.
I will try your method tomorrow.
  • Lcvette
  • Lcvette's Avatar
04 Jan 2025 15:40
Replied by Lcvette on topic Mcode out of range, greater than 199 error

Mcode out of range, greater than 199 error

Category: G&M Codes

i got the errors when trying to test some of the included files from that switchkins test branch
  • PCW
  • PCW's Avatar
04 Jan 2025 15:38

Mesa 7i95T spindle step/Direction setup using stepgen

Category: Driver Boards

I know pncconf does support step/dir spindles (but not the 7I95/7I95T)

You might use pncconf to create a say 7I96s configuration with a step/dir spindle
and steal the hal/ini spindle bits from that.
 
Displaying 20656 - 20670 out of 21733 results.
Time to create page: 0.363 seconds
Powered by Kunena Forum