Advanced Search

Search Results (Searched for: )

  • epineh
  • epineh
01 Jan 2025 06:41

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Very cool, will check that out.
For now I have a very weird issue, I'm not convinced its a riocore issue and not a general linuxcnc issue but here we go..

I cannot set G54 offsets, I've included a screenshot of the problem, as you can see the cutter is within the machine soft limits, and there are values in the G54 in the DRO but the toolpath preview is outside the machine limits. I've copied all machine specific parameters from the MESA config it was running previously, machine homes, enables etc and it is all working as it should. No matter what I do the toolpath remains outside of the bounding box.

Its like the machine is in absolute mode and ignoring the G54, so the origin of the gcode is at machine home and G54 has no effect.

I ran the default Sim (mm) config shipped with the live install and the issue doesn't happen, the toolpath jumps to the relative position to the cutter as normal.

Only thing I've done after the GUI riocore configuration is to add a linuxcnc.var file to the Output/TangNano9K/LinuxCNC folder as it wasn't generated. I copied one from the Sim folder after it generated one.

Other than that its a clean install that I ran docker on to program the FPGA and run Linuxcnc.
  • ihavenofish
  • ihavenofish
01 Jan 2025 06:15
Replied by ihavenofish on topic mixing 5v and 24v on mesa cards

mixing 5v and 24v on mesa cards

Category: General LinuxCNC Questions

Hmm. I think this will work fine. the MPG occupies most of the 5V inputs anyway. Should have enough IO left for the ATC mechanism.

 
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
01 Jan 2025 05:37 - 01 Jan 2025 05:37
Replied by Cant do this anymore bye all on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

If you want true "as easy as an installing an app on your cell phone" buy a commercial cnc machine from one of the Big Boys.

This is all I have left to say on the matter.
  • cmorley
  • cmorley
01 Jan 2025 05:19
Replied by cmorley on topic Reading values ​​from qtdragon.pref.

Reading values ​​from qtdragon.pref.

Category: Qtvcp

Here is a novel way:
save this as myofile.ngc is a path described in the INI's PROGRAM_PREFIX or SUBROUTINE_PATH
(filename myofile.ngc)
o<myofile> sub

;py,from interpreter import *
;py,import os
;py,from qtvcp.lib.preferences import Access

; find and print the preference file path
;py,CONFPATH = os.environ.get('CONFIG_DIR', '/dev/null')
;py,PREFFILE = os.path.join(CONFPATH,'qtdragon.pref')
;py,print(PREFFILE)

; get an preference instance
;py,Pref = Access(PREFFILE)

; load a preference and print it
;py,this.params['toolToLoad']=Pref.getpref('Tool to load', 0, int,'CUSTOM_FORM_ENTRIES')
;py,print('Tool to load->:',this.params['toolToLoad'])

; return the value
o<myofile> endsub [#<toolToLoad>]
M2

Then call it as an oword:

o<myofile> call
 
  • PCW
  • PCW's Avatar
01 Jan 2025 04:56 - 01 Jan 2025 05:07
Replied by PCW on topic Threading Index Varies With Speed

Threading Index Varies With Speed

Category: General LinuxCNC Questions

Unless I misunderstand, It does look like that which is a bit crazy.
It should chase the desired position basically with a PID
+FF1 loop and without any position offset. Of course bounded by the
joint maxaccel/maxvel constraints.

The current way it's done may be a compromise to minimize sync time.
Ideally. I think you want to move in such a way that you end up synchronizing
the position and velocity at the same time.
  • ihavenofish
  • ihavenofish
01 Jan 2025 04:47
mixing 5v and 24v on mesa cards was created by ihavenofish

mixing 5v and 24v on mesa cards

Category: General LinuxCNC Questions

So I got a cute little laser tool setter, but it is 5V. Everything else on my machine is 24v.

I have a mesa 7i96s, and a mesa 7i84

Where/how would I connect this so it is happy? It needs one 5v tolerant input to read the signal, and it also needs one 5v output to enable the laser.

It seems like I could dedicate one IO row on the 7i84 to 5v, but it seems a waste of IO.



Current IO layout:
5 volt input  
  • laser setter input (7i84)
  • probe input (7i84 - just to make use of this row, it can also run 24v)
  •  
  24 volt input 
  • hard limit x (7i96s)
  • hard limit y (7i96s)
  • hard limit z (7i96s)
  • home x (7i96s)
  • home y (7i96s)
  • home z (7i96s)
  • servo alarm x (7i96s)
  • servo alarm y (7i96s)
  • servo alarm z (7i96s)
  • spindle unclamp sensor (7i96s)
  • E stop (7i96s)
   5 volt output 
  • laser setter enable (7i84)
  •  
  24 volt output 
  • solenoid MQL (7i96s)
  • solenoid tool release (7i96s)
  • solenoid laser tool setter air (7i84)
  • spindle forward (7i96s)
  • spindle reverse (7i96s)

There will be other IO to come for the ATC. Seems I would have 16 open 24v inputs, 14 open 5v inputs, 7 open 5v outputs and 7 open 24v outputs. Plus the 2 high isolation outputs on the 7i96s. I will want an MPG as well, and there will likely be some switches and buttons and overrides but they are not decided yet.

This seem like the best way to do it? Any thoughts on a better plan? I guess I could just make some switches and things 5v that do not really require 24v.
 
  • TomAlborough
  • TomAlborough's Avatar
01 Jan 2025 03:53
Replied by TomAlborough on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Hello cornholio,

Thank you for your reply!

I see your point about "AI".

In your reply you separated the "CNC" part of the task (feed speed, etc.) from the "system" part of the task (boards, drivers, etc.). I agree with your split and then assert the "system" part of the solution should "just work".

LinuxCNC on Pi 5 should work as easily as say Google Maps on Android, with no system experience required to install and use the application.

Do you see folks in this thread who believe a better experience is possible? Who exactly would champion a better experience for Pi 5 and LinuxCNC? I believe many of the people who answer the system questions posed in this thread would also be contributors to an effort to revise the code. I have seen similar efforts succeed.

Let me know!

Thanks,
Tom Alborough
  • cmorley
  • cmorley
01 Jan 2025 03:03
Replied by cmorley on topic Threading Index Varies With Speed

Threading Index Varies With Speed

Category: General LinuxCNC Questions

/**
 * Run position mode synchronization.
 * Updates requested velocity for a trajectory segment to track the spindle's position.
 */
STATIC void tpSyncPositionMode(TP_STRUCT * const tp, TC_STRUCT * const tc,
        TC_STRUCT * const nexttc ) {

    double spindle_pos = tpGetSignedSpindlePosition(&emcmotStatus->spindle_status[tp->spindle.spindle_num]);
    tp_debug_print("Spindle at %f\n",spindle_pos);
    double spindle_vel, target_vel;
    double oldrevs = tp->spindle.revs;

    if ((tc->motion_type == TC_RIGIDTAP) && (tc->coords.rigidtap.state == RETRACTION ||
                tc->coords.rigidtap.state == FINAL_REVERSAL)) {
            tp->spindle.revs = tc->coords.rigidtap.spindlerevs_at_reversal -
                spindle_pos;
    } else {
        tp->spindle.revs = spindle_pos;
    }

    double pos_desired = (tp->spindle.revs - tp->spindle.offset) * tc->uu_per_rev;
    double pos_error = pos_desired - tc->progress;

    if(nexttc) {
        pos_error -= nexttc->progress;
    }

    if(tc->sync_accel) {
        // detect when velocities match, and move the target accordingly.
        // acceleration will abruptly stop and we will be on our new target.
        // FIX: this is driven by TP cycle time, not the segment cycle time
        double dt = fmax(tp->cycleTime, TP_TIME_EPSILON);
        spindle_vel = tp->spindle.revs / ( dt * tc->sync_accel++);
        target_vel = spindle_vel * tc->uu_per_rev;
        if(tc->currentvel >= target_vel) {
            tc_debug_print("Hit accel target in pos sync\n");
            // move target so as to drive pos_error to 0 next cycle
            tp->spindle.offset = tp->spindle.revs - tc->progress / tc->uu_per_rev;
            tc->sync_accel = 0;
            tc->target_vel = target_vel;
        } else {
            tc_debug_print("accelerating in pos_sync\n");
            // beginning of move and we are behind: accel as fast as we can
            tc->target_vel = tc->maxvel;
        }
    } else {
        // we have synced the beginning of the move as best we can -
        // track position (minimize pos_error).
        tc_debug_print("tracking in pos_sync\n");
        double errorvel;
        spindle_vel = (tp->spindle.revs - oldrevs) / tp->cycleTime;
        target_vel = spindle_vel * tc->uu_per_rev;
        errorvel = pmSqrt(fabs(pos_error) * tcGetTangentialMaxAccel(tc));
        if(pos_error<0) {
            errorvel *= -1.0;
        }
        tc->target_vel = target_vel + errorvel;
    }

    //Finally, clip requested velocity at zero
    if (tc->target_vel < 0.0) {
        tc->target_vel = 0.0;
    }

    if (nexttc && nexttc->synchronized) {
        //If the next move is synchronized too, then match it's
        //requested velocity to the current move
        nexttc->target_vel = tc->target_vel;
    }
}


Looks to me it just syncs velocity (units per minute) at first,
then yes uses spindle revolutions times units per rev feedrate to calculate the axis target position.
Am I right in thinking  tp->spindle_offset is used to account for the acceleration distance and that would be different for different speed spindles?
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
01 Jan 2025 02:04 - 01 Jan 2025 03:27
Replied by Cant do this anymore bye all on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Economically the RPi5 or RPi4 is not a great choice when compared to an ex corporate PC. The only advantage is a very small foot print and the ability to use a SPI interface board.
 
Displaying 20731 - 20739 out of 20739 results.
Time to create page: 1.834 seconds
Powered by Kunena Forum