Advanced Search

Search Results (Searched for: )

  • scda
  • scda's Avatar
16 Mar 2025 15:04 - 16 Mar 2025 15:09

caxis.comp with stepper motor / gear connection to spindle

Category: HAL

Hi all,

I am trying to understand and implement the caxis.comp with my lathe. 

My setup is:

VFD with ac motor for "normal" spindle mode (analog signal --> pwmgen)
C-axis is connected via a reducing gear to the spindle, the c-axis motor is a closed loop stepper (step/dir). The c-axis drive is engaged to the spindle with a pneumatic cylinder. Normally it is disengaged

I am trying to better understand the caxis.comp and was wondering if someone can shed some light on this:

pin in float spindle-revs --> connected to spindle.0.revs
pin in float spindle-velocity-in --> connected to encoder velocity signal
pin out float spindle-velocity-out --> ? velocity signal for pwmgen and/or step/gen ?
pin out float position-fb-out --> is this position feedback calculated from encoder velocity signal ? is this connected to joint.xx.pos-fb?
pin in float pid-in; --> connected to PID output of c-axis
pin out signed state; --> what is this for?

Has anyone used this in similar setup (spindle with pwmgen, and c-axis with step/dir). Should the step/dir generator be run in velocity mode?
Would probably help to have some insight.

I have also tried a similiar thing using the mux component and connecteing the encoder signal to the c-axis feedback or not (depending on the mode). But as others have experienced there is an ussed with joint following after switching back to c-axis mode. Even when reseting the encoder position to 0, this will only work if the c-axis is also at 0.
I also could not achieve proper orientation (homing) when switching to c-axis mode.

Will keep trying ----


Regards,
Dave
  • PostavCNC
  • PostavCNC's Avatar
16 Mar 2025 15:03 - 16 Mar 2025 15:04
Replied by PostavCNC on topic Keyboard Shortcuts in Gmoccapy

Keyboard Shortcuts in Gmoccapy

Category: Gmoccapy

Hi, there,

i am trying to make a keyboard shortcut to toggle between TURTLE and RABBIT jog mode. I think that the code should have look something like this: 

        if keyname == "r":
            "some toggle event goes here"
            return True


It is shown on in the def on_key_event section in the code attached from line 3052. Can you help me which event should I use to toggle jog modes? 

 
  • PCW
  • PCW's Avatar
16 Mar 2025 15:00
Replied by PCW on topic Motor 0 Positionsfehler

Motor 0 Positionsfehler

Category: Advanced Configuration

That would be the PID deadband pin.
  • PCW
  • PCW's Avatar
16 Mar 2025 14:34

STEPLEN STEPSPACE time for Bergerda AC servo driver

Category: General LinuxCNC Questions

You may have to increase the following error limits a bit and plot the
commanded and feedback positions and joint following error with halscope
to determine why you are getting a following error:

Possibilities:

Drive does not work with shorter step signals

Encoder feedback does not work at higher speeds

Instability/tuning issues


 
  • tsaG
  • tsaG
16 Mar 2025 14:21 - 16 Mar 2025 21:21
Replied by tsaG on topic No parameters forwarded to M6 script?

No parameters forwarded to M6 script?

Category: QtPyVCP

Okay, it seems like the std glue.py is not called at all (I added debug messages in between) so I had to revert back to the standard linuxcnc # number variables. However, I now get the error "bad number format (conversion failed) parsing". Unfortunately, without line indication. :(
%
(MSG, --- Start of toolchange.ngc [Persistent Version] ---)

o<toolchange> sub

    ; ---------------------------------------------------------------
    ; DEBUG: Display raw numeric values passed by the M6 prolog.
    ; Typically, #100 is the requested tool and #120 is the selected pocket.
    ; ---------------------------------------------------------------
    (MSG, Debug: Received #100 = [#100], #120 = [#120])

    ; ---------------------------------------------------------------
    ; A) Reverse Assignment:
    ;    The M6 prolog passes numeric variables:
    ;      #100 = requested tool number,
    ;      #120 = selected pocket.
    ;    We use persistent variables for the current tool and pocket:
    ;      #3991 holds the current tool in the spindle.
    ;      #3990 holds the current tool pocket.
    ;    Now we set descriptive variables as follows:
    ; ---------------------------------------------------------------
    #<selected_tool>      = #100
    #<tool_in_spindle>    = #3991
    #<selected_pocket>    = #120
    #<current_pocket>     = #3990

    ; ---------------------------------------------------------------
    ; DEBUG: Display the descriptive variable values after assignment.
    ; ---------------------------------------------------------------
    (MSG, Debug: selected_tool = [#<selected_tool>])
    (MSG, Debug: tool_in_spindle = [#<tool_in_spindle>])
    (MSG, Debug: selected_pocket = [#<selected_pocket>])
    (MSG, Debug: current_pocket = [#<current_pocket>])

    ; ---------------------------------------------------------------
    ; B) Check if tool change is needed:
    ;    If the requested tool equals the tool already in the spindle,
    ;    no change is needed.
    ; ---------------------------------------------------------------
    o<if_same_tool> if [#<selected_tool> EQ #<tool_in_spindle>]
        (MSG, Tool [#<tool_in_spindle>] is already in spindle. No change needed.)
        M99
    o<if_same_tool> endif

    ; ---------------------------------------------------------------
    ; C) Stop the spindle (no M19 orientation used)
    ; ---------------------------------------------------------------
    M5

    ; ---------------------------------------------------------------
    ; D) Rack Coordinates & Z Heights (adjust as needed)
    ;    Define rack X, Y base, Y pitch.
    ;    Define Z heights if not already defined in the INI:
    ;       #<atc_z_tool_change_height> = -49.5
    ;       #<atc_z_tool_clearance_height> = 0
    ; ---------------------------------------------------------------
    #<rack_x>             = 1123
    #<rack_y_base>        = 164
    #<rack_y_pitch>       = 50
    #<atc_z_tool_change_height>    = -49.5   ; if not defined in INI
    #<atc_z_tool_clearance_height> = 0       ; if not defined in INI

    ; Move Z to clearance height.
    G53 G0 Z[#<atc_z_tool_clearance_height>]

    ; ---------------------------------------------------------------
    ; E) Drop Off Old Tool:
    ;    If a tool is currently in the spindle, drop it off in the current pocket.
    ; ---------------------------------------------------------------
    o<if_drop_old_tool> if [#<tool_in_spindle> GT 0]
        ; Calculate Y coordinate for the current pocket.
        #<old_pocket_y> = [#<rack_y_base> + ([#<current_pocket>] - 1) * #<rack_y_pitch>]
        G53 G0 X[#<rack_x>] Y[#<old_pocket_y>]
        G53 G0 Z[#<atc_z_tool_change_height>]
        (MSG, Unclamping old tool [#<tool_in_spindle>] with M64 P2)
        M64 P2
        G4 P1  ; dwell 1 second
        G53 G0 Z[#<atc_z_tool_clearance_height>]
        ; Optionally: update a pocket table (#4001..#4024) if needed.
    o<if_drop_old_tool> endif

    ; ---------------------------------------------------------------
    ; F) Pick Up New Tool:
    ;    Move to the selected pocket and clamp the new tool.
    ; ---------------------------------------------------------------
    o<if_pickup_new_tool> if [#<selected_tool> GT 0]
        ; Calculate Y coordinate for the selected pocket.
        #<new_pocket_y> = [#<rack_y_base> + ([#<selected_pocket>] - 1) * #<rack_y_pitch>]
        G53 G0 X[#<rack_x>] Y[#<new_pocket_y>]
        G53 G0 Z[#<atc_z_tool_change_height>]
        (MSG, Clamping new tool [#<selected_tool>] with M65 P2)
        M65 P2
        G4 P1  ; dwell 1 second
        G53 G0 Z[#<atc_z_tool_clearance_height>]
        ; Optionally: mark that pocket empty in your pocket table.
    o<if_pickup_new_tool> endif

    ; ---------------------------------------------------------------
    ; G) Update the Spindle:
    ;    Set the new tool as the one in the spindle.
    ; ---------------------------------------------------------------
    #<tool_in_spindle> = #<selected_tool>

    ; ---------------------------------------------------------------
    ; H) Inform LinuxCNC:
    ;    Set new tool active (M61) and load tool offset (G43).
    ; ---------------------------------------------------------------
    M61 Q[#<selected_tool>]
    G43 H[#<selected_tool>]

    ; ---------------------------------------------------------------
    ; I) Update Persistent Variables:
    ;    #3991 now holds the new tool.
    ;    #3990 is updated to the selected pocket.
    ; ---------------------------------------------------------------
    #3991 = #<selected_tool>
    #3990 = #<selected_pocket>

    (MSG, The spindle now has tool [#<selected_tool>])

    ; ---------------------------------------------------------------
    ; J) Return to caller.
    ; ---------------------------------------------------------------
    M99

o<toolchange> endsub

M2

(MSG, --- End of toolchange.ngc ---)
%
  • papagno-source
  • papagno-source
16 Mar 2025 14:12 - 16 Mar 2025 14:28
Replied by papagno-source on topic scurve trajectory planner

scurve trajectory planner

Category: General LinuxCNC Questions

Hi . i have delete std=gnu++2a'.

but have again anothers error.

too bad it would have been nice to be able to use scurve on debian 10 installations

 
  • Murphy
  • Murphy
16 Mar 2025 14:03
Testing CSS was created by Murphy

Testing CSS

Category: General LinuxCNC Questions

Im trying to test if my CSS is working. Encoder setup and counting A  B and index. When I enter
G96 D1500 S250
G1 X-10
Spindle starts and goes straight to 1500rpm. When X moves, the spindle stays at 1500 and does not adjust. Iv attached my ini and hal files. Am i missing something in the ini and hal files? I'm new to CNC so I'm trying to figure it out. I have spindle at speed set true. Index is working when i set it to true in halshow and move the spindle by hand until index is hit and goes false..
  • tsaG
  • tsaG
16 Mar 2025 13:59

No parameters forwarded to M6 script?

Category: QtPyVCP

Hi,

I am currently writing my own tool changer script for my rack. However, my problem is that the parameters like "#<selected_tool> or #<tool_in_spindle> are not forwarded to the script. I can see that these are normally handled by the stdglue.py script. The "standard" tool changer script also doesn't work (with the same issue). If I hardcode the #<selected_tool> to 1, I get the error for the next variable (<tool_in_spindle>).

My ini looks like this:
[RS274NGC]
RS274NGC_STARTUP_CODE = F10 S300 G21 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
REMAP = M6 modalgroup=6 ngc=toolchange
PARAMETER_FILE = linuxcnc.var
OWORD_NARGS = 1
NO_DOWNCASE_OWORD = 1
SUBROUTINE_PATH = subroutines
 

whereas my Hal file has the three nets connected
net tool-number              <= iocontrol.0.tool-prep-number
net tool-change-loop         iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool-prep-loop           iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

I attached my tool changer gcode and the error from the console.

 

Does anyone know what is wrong?



 
  • tommy
  • tommy
16 Mar 2025 13:02 - 16 Mar 2025 14:10

STEPLEN STEPSPACE time for Bergerda AC servo driver

Category: General LinuxCNC Questions

setp hm2_[MESA](BOARD).0.encoder.sample-frequency 20000000 gives me error on startup (pin not exist).

So I tried with:
setp hm2_[MESA](BOARD).0.encoder.muxed-sample-frequency 20000000

but result is same, when lowering STEPLEN and STEPSPACE from 1000 to 800, immediate following error.

A have also attached my hal_load file to check
  • M4MazakUser
  • M4MazakUser
16 Mar 2025 11:26

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

Category: Driver Boards

I had red encoders on the two servos I was using but changed them for 1024 a b z encoders. They weren't compatible with the mesa card I bought- i thought they would be.  Was a lot simpler with standard encoders even with the startup positioning.
  • Aciera
  • Aciera's Avatar
16 Mar 2025 10:50 - 16 Mar 2025 10:52
Replied by Aciera on topic scurve trajectory planner

scurve trajectory planner

Category: General LinuxCNC Questions

I have test installation on Debian 10 :


Master branch no longer supports debian 10. You will need to try this on debian bookworm or maybe manually change the makefile entries to 'std=gnu++2a'
  • papagno-source
  • papagno-source
16 Mar 2025 09:49
Replied by papagno-source on topic scurve trajectory planner

scurve trajectory planner

Category: General LinuxCNC Questions

HI at all.

I have test installation on Debian 10 :

git clone --recurse-submodules codeberg.org/skynet/linuxcnc_scurve_compact lcnc
cd lcnc/cmake
./installer

It not istalled with success, some error in terminal :

Compiling libnml/posemath/posemath.cc
c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
make: *** [Makefile:287: objects/libnml/inifile/inifile.o] Error 1
make: *** Attesa per i processi non terminati....
make: *** [Makefile:287: objects/libnml/inifile/inivar.o] Error 1
c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?

and:

/usr/include/ceres/jet.h:165:10: fatal error: Eigen/Core: File o directory non esistente
#include "Eigen/Core"
^~~~~~~~~~~~





eccc..
  • Wusel
  • Wusel
16 Mar 2025 08:16
Replied by Wusel on topic Motor 0 Positionsfehler

Motor 0 Positionsfehler

Category: Advanced Configuration

I thought, this is the smallest error the maschine control will move the axis to and then be happy with the position. This is obviously not the case
Displaying 8116 - 8130 out of 24608 results.
Time to create page: 0.451 seconds
Powered by Kunena Forum