Advanced Search

Search Results (Searched for: )

  • Grotius
  • Grotius's Avatar
24 Dec 2024 14:24
Replied by Grotius on topic PathPilot V2 source code

PathPilot V2 source code

Category: PathPilot

Hi,

I have recieved tormach's source. Not latest version.
In the tormach source, the tp.c file (planner) is nothing special. The planner can be used in lcnc within a few hours of work.
I can do that on request.

Btw think we don't need tormach's planner. As this planner out-perform's tormach's planner in every way :

  • MaHa
  • MaHa
24 Dec 2024 14:20
Replied by MaHa on topic Inconsistent values from Versaprobe

Inconsistent values from Versaprobe

Category: Qtvcp

Did you ever get past reprobe? There is no backoff move, then is G43 called and at least G53 Z0, which makes no sense to call G43, while toolseter trigered. First i would cleanup this file with all commented lines and debug,  or do indentation, to make the executed code visible.
When the machine stalled, did it write toollength before?
For testing i always start from terminal. If necessary just close the terminal, and start new.
 
  • Hakan
  • Hakan
24 Dec 2024 14:14 - 24 Dec 2024 14:23
Replied by Hakan on topic PDO variable 64 bit

PDO variable 64 bit

Category: EtherCAT

Ethercat 64 bit float is supported.
float-double-ieee
However, the ethercat drive delivers the encoder data in a certain datatype, and you can not change that.
For floating point there is the Ethercat REAL (32-bit) and LREAL(64-bit) data-types.
You convert them into a hal float (which is actually a 64-bit float, or double, since some versions back)
using the keyword "float-ieee" for REAL and "float-double-ieee" for LREAL.
On the other hand, for integers it is likely that linuxcnc is restricting by its 32-bit integers.
There are no 64-bit integers in hal (as far a I know is best to day).
 
  • thadhughes
  • thadhughes
24 Dec 2024 13:56
Replied by thadhughes on topic Simplest way to add analog channel?

Simplest way to add analog channel?

Category: General LinuxCNC Questions

That makes a lot of sense. I ordered the LM331's and will report if that works.
  • scda
  • scda's Avatar
24 Dec 2024 12:03 - 24 Dec 2024 12:38

Beckhoff EL2522 (step/ pulse module) setup help

Category: EtherCAT

Hi all

I have some Beckhoff EK1100 with different modules connected. Most of the modules work, but my 2522 extension is not supported (yet) by LinuxCNC ethercat.

Can someone give me a hint on how to integrate this? I am looking at the Beckhoff xml file but not sure how to integrate this into Linuxcnc especiuall with the stepgen/dir signal.

Any hints would be appreciated.

EDIT: So I just realized that there is already an implementation of the 2521 pulse train module. So I can start with this then ....

Dave
  • wusel0464
  • wusel0464
24 Dec 2024 11:57
Replied by wusel0464 on topic Minimal setup for touch probe and tool setter ?

Minimal setup for touch probe and tool setter ?

Category: General LinuxCNC Questions

Hello,

I use this method.
With a flying probe that is in a fixed position to measure the tool and for Z I place it on the workpiece, for this the correct probe height (switching point) must be entered in QTDragon.

forum.linuxcnc.org/qtvcp/39423-qtdragon-...tool-change?start=30

Frank wishes everyone best wishes, good health and a lovely relaxing holiday.
  • Aciera
  • Aciera's Avatar
24 Dec 2024 11:21 - 24 Dec 2024 11:22

Skew correction/perpendicularity correction (millkins or millkins_xyz)

Category: Basic Configuration

As a little illustration I 'added' the skew-y to xyzbc tcp kinematics in what we might think would do the trick:

/**************************************************************************
* Copyright 2016 Rudy du Preez <rudy@asmsa.co.za>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
**************************************************************************/

/********************************************************************
* Kinematics functions (forward,inverse) for:
* 1) 5 axis mill (XYZAC)
* This mill has a tilting table (A axis) and horizontal rotary
* mounted to the table (C axis).
* 2) 5 axis mill (XYZBC)
* This mill has a tilting table (B axis) and horizontal rotary
* mounted to the table (C axis).
*
* Note: The directions of the rotational axes are the opposite of the
* conventional axis directions. See
* https://linuxcnc.org/docs/html/gcode/machining-center.html

********************************************************************/

#include "motion.h"
#include "hal.h"
#include "rtapi_math.h"
#include "rtapi_string.h"
#include "rtapi_ctype.h"

static int trtfuncs_max_joints;

// joint number assignments (-1 ==> not assigned)
static int JX = -1;
static int JY = -1;
static int JZ = -1;

static int JA = -1;
static int JB = -1;
static int JC = -1;

static int JU = -1;
static int JV = -1;
static int JW = -1;

struct haldata {
hal_float_t *x_rot_point;
hal_float_t *y_rot_point;
hal_float_t *z_rot_point;
hal_float_t *x_offset;
hal_float_t *y_offset;
hal_float_t *z_offset;
hal_float_t *tool_offset;
hal_float_t *skew_y;
} *haldata;


int trtKinematicsSetup(const int comp_id,
const char* coordinates,
kparms* kp)
{
int i,jno,res=0;
int axis_idx_for_jno[EMCMOT_MAX_JOINTS];
int rqdjoints = strlen(kp->required_coordinates);

if (rqdjoints > kp->max_joints) {
rtapi_print_msg(RTAPI_MSG_ERR,
"ERROR %s: supports %d joints, <%s> requires %d\n",
kp->kinsname,
kp->max_joints,
coordinates,
rqdjoints);
goto error;
}
trtfuncs_max_joints = kp->max_joints;

if (map_coordinates_to_jnumbers(coordinates,
kp->max_joints,
kp->allow_duplicates,
axis_idx_for_jno)) {
goto error;
}
// require all chars in reqd_coords (order doesn't matter)
for (i=0; i < rqdjoints; i++) {
char reqd_char;
reqd_char = *(kp->required_coordinates + i);
if ( !strchr(coordinates,toupper(reqd_char))
&& !strchr(coordinates,tolower(reqd_char)) ) {
rtapi_print_msg(RTAPI_MSG_ERR,
"ERROR %s:\nrequired coordinates:%s\n"
"specified coordinates:%s\n",
kp->kinsname, kp->required_coordinates, coordinates);
goto error;
}
}

// assign principal joint numbers (first found in coordinates map)
// duplicates are handled by position_to_mapped_joints()
for (jno=0; jno < EMCMOT_MAX_JOINTS; jno++) {
if (axis_idx_for_jno[jno] == 0 && JX==-1) {JX = jno;}
if (axis_idx_for_jno[jno] == 1 && JY==-1) {JY = jno;}
if (axis_idx_for_jno[jno] == 2 && JZ==-1) {JZ = jno;}
if (axis_idx_for_jno[jno] == 3 && JA==-1) {JA = jno;}
if (axis_idx_for_jno[jno] == 4 && JB==-1) {JB = jno;}
if (axis_idx_for_jno[jno] == 5 && JC==-1) {JC = jno;}
if (axis_idx_for_jno[jno] == 6 && JU==-1) {JU = jno;}
if (axis_idx_for_jno[jno] == 7 && JV==-1) {JV = jno;}
if (axis_idx_for_jno[jno] == 8 && JW==-1) {JW = jno;}
}

rtapi_print("%s coordinates=%s assigns:\n", kp->kinsname,coordinates);
for (jno=0; jno<EMCMOT_MAX_JOINTS; jno++) {
if (axis_idx_for_jno[jno] == -1) break; //fini
rtapi_print(" Joint %d ==> Axis %c\n",
jno,"XYZABCUVW"[axis_idx_for_jno[jno]]);
}

haldata = hal_malloc(sizeof(struct haldata));
if (!haldata) {goto error;}

res += hal_pin_float_newf(HAL_IN, &;(haldata->x_rot_point), comp_id,
"%s.x-rot-point",kp->halprefix);
res += hal_pin_float_newf(HAL_IN, &;(haldata->y_rot_point), comp_id,
"%s.y-rot-point",kp->halprefix);
res += hal_pin_float_newf(HAL_IN, &;(haldata->z_rot_point), comp_id,
"%s.z-rot-point",kp->halprefix);
res += hal_pin_float_newf(HAL_IN, &;(haldata->x_offset), comp_id,
"%s.x-offset",kp->halprefix);
res += hal_pin_float_newf(HAL_IN, &;(haldata->y_offset), comp_id,
"%s.y-offset",kp->halprefix);
res += hal_pin_float_newf(HAL_IN, &;(haldata->z_offset), comp_id,
"%s.z-offset",kp->halprefix);
res += hal_pin_float_newf(HAL_IN, &;(haldata->tool_offset), comp_id,
"%s.tool-offset",kp->halprefix);
res += hal_pin_float_newf(HAL_IN ,&;(haldata->skew_y) , comp_id,
"%s.skew-y" ,kp->halprefix);
if (res) {goto error;}
return 0;

error:
rtapi_print_msg(RTAPI_MSG_ERR,"trtKinematicsSetup() FAIL\n");
return -1;
} // trtKinematicsSetup()

int xyzacKinematicsForward(const double *joints,
EmcPose * pos,
const KINEMATICS_FORWARD_FLAGS * fflags,
KINEMATICS_INVERSE_FLAGS * iflags)
{
double x_rot_point = *(haldata->x_rot_point);
double y_rot_point = *(haldata->y_rot_point);
double z_rot_point = *(haldata->z_rot_point);
double dt = *(haldata->tool_offset);
double dy = *(haldata->y_offset);
double dz = *(haldata->z_offset);
double a_rad = joints[JA]*TO_RAD;
double c_rad = joints[JC]*TO_RAD;

dz = dz + dt;

pos->tran.x = + cos(c_rad) * (joints[JX] - x_rot_point)
+ sin(c_rad) * cos(a_rad) * (joints[JY] - dy - y_rot_point)
+ sin(c_rad) * sin(a_rad) * (joints[JZ] - dz - z_rot_point)
+ sin(c_rad) * dy
+ x_rot_point;

pos->tran.y = - sin(c_rad) * (joints[JX] - x_rot_point)
+ cos(c_rad) * cos(a_rad) * (joints[JY] - dy - y_rot_point)
+ cos(c_rad) * sin(a_rad) * (joints[JZ] - dz - z_rot_point)
+ cos(c_rad) * dy
+ y_rot_point;

pos->tran.z = + 0
- sin(a_rad) * (joints[JY] - dy - y_rot_point)
+ cos(a_rad) * (joints[JZ] - dz - z_rot_point)
+ dz
+ z_rot_point;

pos->a = joints[JA];
pos->c = joints[JC];

// optional letters (specify with coordinates module parameter)
pos->b = (JB != -1)? joints[JB] : 0;
pos->u = (JU != -1)? joints[JU] : 0;
pos->v = (JV != -1)? joints[JV] : 0;
pos->w = (JW != -1)? joints[JW] : 0;

return 0;
} // xyzacKinematicsForward()

int xyzacKinematicsInverse(const EmcPose * pos,
double *joints,
const KINEMATICS_INVERSE_FLAGS * iflags,
KINEMATICS_FORWARD_FLAGS * fflags)
{
double x_rot_point = *(haldata->x_rot_point);
double y_rot_point = *(haldata->y_rot_point);
double z_rot_point = *(haldata->z_rot_point);
double dy = *(haldata->y_offset);
double dz = *(haldata->z_offset);
double dt = *(haldata->tool_offset);
double a_rad = pos->a*TO_RAD;
double c_rad = pos->c*TO_RAD;

EmcPose P; // computed position

dz = dz + dt;

P.tran.x = + cos(c_rad) * (pos->tran.x - x_rot_point)
- sin(c_rad) * (pos->tran.y - y_rot_point)
+ x_rot_point;

P.tran.y = + sin(c_rad) * cos(a_rad) * (pos->tran.x - x_rot_point)
+ cos(c_rad) * cos(a_rad) * (pos->tran.y - y_rot_point)
- sin(a_rad) * (pos->tran.z - z_rot_point)
- cos(a_rad) * dy
+ sin(a_rad) * dz
+ dy
+ y_rot_point;

P.tran.z = + sin(c_rad) * sin(a_rad) * (pos->tran.x - x_rot_point)
+ cos(c_rad) * sin(a_rad) * (pos->tran.y - y_rot_point)
+ cos(a_rad) * (pos->tran.z - z_rot_point)
- sin(a_rad) * dy
- cos(a_rad) * dz
+ dz
+ z_rot_point;


P.a = pos->a;
P.c = pos->c;

// optional letters (specify with coordinates module parameter)
P.b = (JB != -1)? pos->b : 0;
P.u = (JU != -1)? pos->u : 0;
P.v = (JV != -1)? pos->v : 0;
P.w = (JW != -1)? pos->w : 0;

// update joints with support for
// multiple-joints per-coordinate letter:
// based on computed position
position_to_mapped_joints(trtfuncs_max_joints,
&P,
joints);

return 0;
} // xyzacKinematicsInverse()

int xyzbcKinematicsForward(const double *joints,
EmcPose * pos,
const KINEMATICS_FORWARD_FLAGS * fflags,
KINEMATICS_INVERSE_FLAGS * iflags)
{
// Note: 'principal' joints are used
double x_rot_point = *(haldata->x_rot_point);
double y_rot_point = *(haldata->y_rot_point);
double z_rot_point = *(haldata->z_rot_point);
double dx = *(haldata->x_offset);
double dz = *(haldata->z_offset);
double dt = *(haldata->tool_offset);
double skew_y = *(haldata->skew_y);
dz = dz + dt;
double b_rad = joints[JB]*TO_RAD;
double c_rad = joints[JC]*TO_RAD;



pos->tran.x = cos(c_rad) * cos(b_rad) * ((joints[JX] - dx - x_rot_point)+(joints[JY]- y_rot_point)*skew_y)
+ sin(c_rad) * (joints[JY] - y_rot_point)
- cos(c_rad) * sin(b_rad) * (joints[JZ] - dz - z_rot_point)
+ cos(c_rad) * dx
+ x_rot_point;

pos->tran.y = - sin(c_rad) * cos(b_rad) * ((joints[JX] - dx - x_rot_point)+(joints[JY]- y_rot_point)*skew_y)
+ cos(c_rad) * (joints[JY] - y_rot_point)
+ sin(c_rad) * sin(b_rad) * (joints[JZ] - dz - z_rot_point)
- sin(c_rad) * dx
+ y_rot_point;

pos->tran.z = sin(b_rad) * ((joints[JX] - dx - x_rot_point)+(joints[JY]- y_rot_point)*skew_y)
+ cos(b_rad) * (joints[JZ] - dz - z_rot_point)
+ dz
+ z_rot_point;

pos->b = joints[JB];
pos->c = joints[JC];

// optional letters (specify with coordinates module parameter)
pos->a = (JA != -1)? joints[JA] : 0;
pos->u = (JU != -1)? joints[JU] : 0;
pos->v = (JV != -1)? joints[JV] : 0;
pos->w = (JW != -1)? joints[JW] : 0;

return 0;
} // xyzbcKinematicsForward()

int xyzbcKinematicsInverse(const EmcPose * pos,
double *joints,
const KINEMATICS_INVERSE_FLAGS * iflags,
KINEMATICS_FORWARD_FLAGS * fflags)
{
double x_rot_point = *(haldata->x_rot_point);
double y_rot_point = *(haldata->y_rot_point);
double z_rot_point = *(haldata->z_rot_point);
double dx = *(haldata->x_offset);
double dz = *(haldata->z_offset);
double dt = *(haldata->tool_offset);
double skew_y = *(haldata->skew_y);
dz = dz + dt;
double b_rad = pos->b*TO_RAD;
double c_rad = pos->c*TO_RAD;
double dpx = -cos(b_rad)*dx - sin(b_rad)*dz + dx;
double dpz = sin(b_rad)*dx - cos(b_rad)*dz + dz;

EmcPose P; // computed position

P.tran.x = + cos(c_rad) * cos(b_rad) * ((pos->tran.x - x_rot_point) - (pos->tran.y - y_rot_point)*skew_y)
- sin(c_rad) * cos(b_rad) * (pos->tran.y - y_rot_point)
+ sin(b_rad) * (pos->tran.z - z_rot_point)
+ dpx
+ x_rot_point;

P.tran.y = + sin(c_rad) * ((pos->tran.x - x_rot_point) - (pos->tran.y - y_rot_point)*skew_y)
+ cos(c_rad) * (pos->tran.y - y_rot_point)
+ y_rot_point;

P.tran.z = - cos(c_rad) * sin(b_rad) * ((pos->tran.x - x_rot_point) - (pos->tran.y - y_rot_point)*skew_y)
+ sin(c_rad) * sin(b_rad) * (pos->tran.y - y_rot_point)
+ cos(b_rad) * (pos->tran.z - z_rot_point)
+ dpz
+ z_rot_point;

P.b = pos->b;
P.c = pos->c;

// optional letters (specify with coordinates module parameter)
P.a = (JA != -1)? pos->a : 0;
P.u = (JU != -1)? pos->u : 0;
P.v = (JV != -1)? pos->v : 0;
P.w = (JW != -1)? pos->w : 0;

// update joints with support for
// multiple-joints per-coordinate letter:
// based on computed position
position_to_mapped_joints(trtfuncs_max_joints,
&P,
joints);

return 0;
} // xyzbcKinematicsInverse()

Note that things seem to look great when we start out with no rotation of the table:
 

However when we rotate the table 90° we realize that we have actually skewed the Work Coordinate system:
 
  • Aciera
  • Aciera's Avatar
24 Dec 2024 11:01 - 24 Dec 2024 11:39

Skew correction/perpendicularity correction (millkins or millkins_xyz)

Category: Basic Configuration

When I said

add the 'skew-y' pin and the corrective terms to the forward and inverse kinematic models


I meant you have to come up with a complete kinematic model for TCP where the machine coordinate system is skewed (ie no longer cartesian).
I'm afraid this is MUCH more complex than to just copy/paste a few lines from one file to another.
Basically what would be needed (I think) is a skew matrix multiplied to the beginning of the forward transformation:
linuxcnc.org/docs/html/motion/5-axis-kinematics.html
Note that adding skew to pure rotation and translation is likely going to make the derivation of the inverse kinematic more challenging.
  • papagno-source
  • papagno-source
24 Dec 2024 10:45
PDO variable 64 bit was created by papagno-source

PDO variable 64 bit

Category: EtherCAT

One questions about variable can use with PDO.
On drive with 26 bit encoder , the PDO coomand position and encoder feedback position , if use float , is saturated with screew 10mm in 328 cm about.
The solution are 2 :
1- change gear numerator and denominator in drive
2-can declare in xml file a variable 64 bit

The 64 bit not is supported ?

Thanks
  • Aciera
  • Aciera's Avatar
24 Dec 2024 09:35
Replied by Aciera on topic Ein Neuling sucht Hilfe

Ein Neuling sucht Hilfe

Category: Deutsch

Es ist der gleiche Fehler mit Variabel.


Das sagt mir leider wenig, Poste doch bitte mal die genaue Fehlermeldung.
  • hans48
  • hans48
24 Dec 2024 09:28
Replied by hans48 on topic Ein Neuling sucht Hilfe

Ein Neuling sucht Hilfe

Category: Deutsch

Hallo
Habe den Vorschlag getestet, geht aber auch nicht. Es ist der gleiche Fehler mit Variabel.
Gruß Hans
  • Aciera
  • Aciera's Avatar
24 Dec 2024 09:18
Replied by Aciera on topic Inconsistent values from Versaprobe

Inconsistent values from Versaprobe

Category: Qtvcp

here the square bracket was wrong, maybe that also leads to calculation errors
#<zworkoffset> = [#5063 + [#5203 + [#5220 * 20]]]

You need to be careful with parameter index vs parameter value:
this will add the index offset of the currently active work offset system to the _value_ of parameter 5203 (which is what you do not want here):
 [#5203 + [#5220 * 20]]

while this will add the index offset to 5203 to get the parameter index of the z-offset for the currently active work offset system and thus will give the value of the currently active work offset system (which is what is needed here):
 #[5203 + [#5220 * 20]]
  • abdulasis12
  • abdulasis12
24 Dec 2024 08:19

Skew correction/perpendicularity correction (millkins or millkins_xyz)

Category: Basic Configuration

Hi , Aciera
About 4 days .
I can only do this much (attacth file),
and the things I can't do are:
J[0], J[1], J[2]. I don't know how to transform them into the same format as trtkins (it's use joints).

int xyzacKinematicsInverse(const EmcPose * pos,
                           double *joints,
                           const KINEMATICS_INVERSE_FLAGS * iflags,
                           KINEMATICS_FORWARD_FLAGS * fflags)

Hope you advice me for next step.

Thank you,
Asis
 

File Attachment:

File Name: trtfuncs.c
File Size:15 KB
  • beauxnez
  • beauxnez
24 Dec 2024 08:18
Replied by beauxnez on topic QTplasma error

QTplasma error

Category: Plasmac

I no longer have an installation CD
  • seebaer1976
  • seebaer1976
24 Dec 2024 07:31 - 24 Dec 2024 07:36
Replied by seebaer1976 on topic Inconsistent values from Versaprobe

Inconsistent values from Versaprobe

Category: Qtvcp

Can you try to replace this 2 lines from

#<zworkoffset> = [#5063 + #[5203 + #5220 * 20] + #5213 * #5210]
#<tool_length> = [#<zworkoffset> - #<_ini[VERSA_TOOLSETTER]Z_REF>]
to

#<zworkoffset> = [#5063 + #[5203 + [#5220 * 20]]]
#<tool_length> = ABS[ABS[#<_ini[VERSA_TOOLSETTER]Z_REF>] - #<zworkoffset>]

 
point calculation before line calculation

here the square bracket was wrong, maybe that also leads to calculation errors
#<zworkoffset> = [#5063 + [#5203 + [#5220 * 20]]]
Displaying 21496 - 21510 out of 21694 results.
Time to create page: 0.437 seconds
Powered by Kunena Forum