Advanced Search

Search Results (Searched for: )

  • amanker
  • amanker
04 Sep 2025 12:18

Remora - Rpi Software Stepping Using External Microcontroller via SPI

Category: Computers and Hardware

I was using Octopus Pro Board for LinuxCNC. That one is giving some problems. So I bought new board BTT SKR3 so that I can use TMC5160. Can anyone help me setting up its config.txt and LinuxCNC configuration. And connection diagram. I have wired it as per SKR2 board. Pinouts of both boards seems similar. I cant get Machine out of estop. I think there is no communication between rpi and skr3.
Remora.ini
# Basic LinuxCNC config for testing of Remora firmware

[EMC]
MACHINE = Remora-XYZ
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 50.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 200.00
DEFAULT_ANGULAR_VELOCITY = 36.00
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 45.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm

[KINS]
JOINTS = 3
#KINEMATICS =trivkins coordinates=XYZ kinstype=BOTH
KINEMATICS =trivkins coordinates=XYZ

[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 0
SERVO_PERIOD = 1000000

[HAL]
HALFILE = remora.hal
POSTGUI_HALFILE = postgui_call_list.hal

[TRAJ]
COORDINATES =  X Y Z 
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 50.00
MAX_LINEAR_VELOCITY = 200.00
NO_FORCE_HOMING = 1 

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 500
MAX_ACCELERATION = 1000.0
MIN_LIMIT = -500
MAX_LIMIT = 500.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -500.0
MAX_LIMIT = 500.0
MAX_VELOCITY = 500.0
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 200.0
FERROR = 2
MIN_FERROR = 2.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

[AXIS_Y]
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 80.0
FERROR = 9.0
MIN_FERROR = 5.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

[AXIS_Z]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -280
MAX_LIMIT = 280

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -280
MAX_LIMIT = 280
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 200.0
STEPGEN_MAXACCEL = 3000.0
SCALE = 400.0
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

remora.hal
# load the realtime components

    loadrt [KINS]KINEMATICS
    loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS

    loadrt remora-spi
    #loadrt remora_lpc chip_type=LPC SPI_clk_div=64


# estop loopback, SPI comms enable and feedback
    net user-enable-out     <= iocontrol.0.user-enable-out        => remora.SPI-enable
    net user-request-enable <= iocontrol.0.user-request-enable    => remora.SPI-reset
    net remora-status     <= remora.SPI-status             => iocontrol.0.emc-enable-in
    

# add the remora and motion functions to threads

    addf remora.read servo-thread
    addf motion-command-handler servo-thread
    addf motion-controller servo-thread
    addf remora.update-freq servo-thread
    addf remora.write servo-thread


# Joint 0 setup

    setp remora.joint.0.scale         [JOINT_0]SCALE
    setp remora.joint.0.maxaccel     [JOINT_0]STEPGEN_MAXACCEL

    net xpos-cmd         <= joint.0.motor-pos-cmd     => remora.SP.0  joint.0.motor-pos-fb
#    net j0pos-fb         <= remora.joint.0.pos-fb     => joint.0.motor-pos-fb
#    net j0enable         <= joint.0.amp-enable-out     => remora.joint.0.enable


# Joint 1 setup

    setp remora.joint.1.scale         [JOINT_1]SCALE
    setp remora.joint.1.maxaccel     [JOINT_1]STEPGEN_MAXACCEL

    net j1pos-cmd         <= joint.1.motor-pos-cmd     => remora.joint.1.pos-cmd
    net j1pos-fb         <= remora.joint.1.pos-fb     => joint.1.motor-pos-fb 
    net j1enable         <= joint.1.amp-enable-out     => remora.joint.1.enable


# Joint 2 setup

    setp remora.joint.2.scale         [JOINT_2]SCALE
    setp remora.joint.2.maxaccel     [JOINT_2]STEPGEN_MAXACCEL

    net j2pos-cmd         <= joint.2.motor-pos-cmd     => remora.joint.2.pos-cmd
    net j2pos-fb         <= remora.joint.2.pos-fb     => joint.2.motor-pos-fb
    net j2enable         <= joint.2.amp-enable-out     => remora.joint.2.enable


config.txt
{
    "Board": "BIGTREETECH SKR v3",
    "Modules":[
    {
    "Thread": "Servo",
    "Type": "Reset Pin",
        "Comment":            "Reset pin",
        "Pin":                "PC_4"
    },
    {
    "Thread": "On load",
    "Type": "Motor Power",
        "Comment": "Enable motor power SKR2",
        "Pin":                     "PC_13"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "X - Joint 0 step generator",
        "Joint Number":        0,
        "Step Pin":         "PD_4",
        "Direction Pin":     "PD_3",
        "Enable Pin":         "PD_6"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "Y - Joint 1 step generator",
        "Joint Number":        1,
        "Step Pin":         "PA_15",
        "Direction Pin":     "PA_8",
        "Enable Pin":         "PD_1"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "Z - Joint 2 step generator",
        "Joint Number":        2,
        "Step Pin":         "PE_2",
        "Direction Pin":     "PE_3",
        "Enable Pin":         "PE_0"
    },

    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "X min",
        "Pin":                "PC_1",
        "Mode":                "Input",
        "Data Bit":            0
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "X max",
        "Pin":                "PC_2",
        "Mode":                "Input",
        "Data Bit":            1
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Y min",
        "Pin":                "PC_3",
        "Mode":                "Input",
        "Data Bit":            2
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Y max",
        "Pin":                "PA_0",
        "Mode":                "Input",
        "Data Bit":            3
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Z min",
        "Pin":                "PC_0",
        "Mode":                "Input",
        "Data Bit":            4
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Z max",
        "Pin":                "PC_15",
        "Mode":                "Input",
        "Data Bit":            5

    }
    ]
}
  • andypugh
  • andypugh's Avatar
04 Sep 2025 12:04
Replied by andypugh on topic 7i77 and VFD spindle control

7i77 and VFD spindle control

Category: Basic Configuration

Which version of LinuxCNC are you running? I would expect the spindle pins to look more like "spindle.0.speed-out" on any recent LinuxCNC version.

To get a list of HAL pins that you can copy and paste from, in the HAL file insert the line
show pin
just after the block of "loadrt" commands
Then start LinuxCNC from the command line
linuxcnc &
LinuxCNC probably won't start, but you will see a list of all the pins, and also a message about the first problem it has found in the HAL file.
Copy the pin list from the terminal window and squirrel it away in a text file for reference.
(Copy and paste in the terminal window is generally ctrl-shift-C and ctrl-shift-V as "normal" Ctrl-C is "Cancel")
  • laurentl38
  • laurentl38
04 Sep 2025 12:02
Replied by laurentl38 on topic orient spindle with ethercat EL5101

orient spindle with ethercat EL5101

Category: EtherCAT

I took the PID solution and modified the code a little. I initialized spindle-index-enable to 1 when starting Lcnc.
I also used ABS on spindle-Pos-fb-abs.
The spindle is positioned, but only in certain cases:
- When starting Lcnc, if I've never rotated the spindle at speed and the angular displacement is small (less than 20 degrees).
- If I rotate the spindle first and then try to orient it, almost every time, it will start at maximum speed, without orientation.
- If I rotate the spindle first, and then reposition it slightly by hand with my index finger, I can orient it, but always with small successive angular displacements.

It's progressing little by little, but from my point of view, it's more tinkering than mastery...

 

File Attachment:

File Name: EL7-schaublin-281.hal
File Size:11 KB
  • Hakan
  • Hakan
04 Sep 2025 10:14 - 04 Sep 2025 10:27
Replied by Hakan on topic AMSAMOTION IO module

AMSAMOTION IO module

Category: EtherCAT

ec_generic should autoload when ethercat master service is started and "generic" is mentioned in /etc/ethercat.conf
There was an issue where it didn't and the user had to modprobe it manually after start of linux.
Suspected Secure boot but it was off like in your case. Never understood why it didn't load.
I guess you have to experiment to see if you can get it to autoload.

 /usr/sbin/ethercatctl is the file that loads the modules when the service is started, it's a bash script.
 
  • ChrisB_II
  • ChrisB_II's Avatar
04 Sep 2025 10:09
  • royka
  • royka
04 Sep 2025 09:34

How to install kernel patch? (Moschip 9900)

Category: Installing LinuxCNC

Only the parport gets disabled or LinuxCNC also show an error? (Not sure if the parport gets disabled after a following error?)

Perhaps a parport driver is interfering, what does lsmod show?

Is in the BIOS the parallel port set at ECP/EPP/AUTO? Try EPP or ECP

Too aggressive timing for the steppers?

Power Management in BIOS?
  • ChrisB_II
  • ChrisB_II's Avatar
04 Sep 2025 08:43

G3-Kurven unterschiedlich bei höheren Geschwindigkeiten

Category: General LinuxCNC Questions

Sorry, i thought i filed it in the "German" section. Could someone please move it there?
  • SPH
  • SPH's Avatar
04 Sep 2025 07:46
7i77 and VFD spindle control was created by SPH

7i77 and VFD spindle control

Category: Basic Configuration

I've been having a hard time trying to figure out how to get my router's Yaskawa 616g5 vfd connected up and running with my 5i25 - 7i77 setup.
I can't seem to find a good example of the HAL code and I'm not across HAL enough to figure it out for myself. 
Just trying to get the absolute basics working. Spindle on is already connected and working. I just need to figure out the 0-10v output from analogue5.
The VFD can be configured for 0-10v or +-10v. I'll be setting it to 0-10v, no need for it to reverse direction.
I've seen versions with scaling and versions without, versions that set the scaling directly in HAL and others that set the scaling parameters in INI.
As I understand it I shouldn't need any scaling, just SCALE, MAX and MIN values of 24000 and 0 (or maybe 6000, the slowest the spindle is rated for) 

I think I had it close to working at one point but the scaling must have been off. I've not gone as far as connecting the vfd to the 7i77 yet, just probing the output pins on the 7i77 with a multimeter. I was reading 0.4v when the spindle was on and 0 when off but in trying to figure out why the scaling was off on that particular iteration of the HAL file I deleted something and couldn't get LCNC to run. That was about the 15th attempt so I gave up for the day.

Most of the code I've tried to work from has looked like this or some version of it.
If someone has a similar setup and could share their HAL file or give me some direction on the bare bones that are required to get 0-10v working I'd really appreciate it.
#******************************
# SPINDLE S
#******************************


# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout5-scalemax  [SPINDLE_9]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout5-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout5-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT

net spindle-vel-cmd  => hm2_5i25.0.7i77.0.1.analogout5
net machine-is-enabled      => hm2_5i25.0.7i77.0.1.spinena

# ---setup spindle control signals---

net spindle-vel-cmd-rps    <=  motion.spindle-speed-out-rps
net spindle-vel-cmd        <=  motion.spindle-speed-out
net spindle-on             <=  motion.spindle-on
net spindle-cw             <=  motion.spindle-forward
net spindle-ccw            <=  motion.spindle-reverse
net spindle-brake          <=  motion.spindle-brake
net spindle-revs           =>  motion.spindle-revs
net spindle-at-speed       =>  motion.spindle-at-speed
net spindle-vel-fb         =>  motion.spindle-speed-in
net spindle-index-enable  <=>  motion.spindle-index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true

#SPINDLE-CW
net spindle-cw  motion.spindle-forward  => hm2_5i25.0.7i77.0.0.output-08

#SPINDLE-CCW
net spindle-ccw  motion.spindle-reverse => hm2_5i25.0.7i77.0.0.output-09

#SPINDLE-STOP
#net spindle-on  motion.spindle-on       => hm2_5i25.0.7i84.0.2.output-13
  • Kuzma30
  • Kuzma30
04 Sep 2025 07:41
Replied by Kuzma30 on topic AMSAMOTION IO module

AMSAMOTION IO module

Category: EtherCAT

ec_generic was not loaded.
After modprobe it I can see slaves
ethercat slaves
0  0:0  PREOP  +  EC3A-IO1632

How to autoload it?
  • ChrisB_II
  • ChrisB_II's Avatar
04 Sep 2025 07:28

G3-Kurven unterschiedlich bei höheren Geschwindigkeiten

Category: General LinuxCNC Questions

 Hi, mal wieder eine Anfänger-Frage... Ich bin mit meiner gerade erst fertig gebauten Fräse bei den ersten Tests und habe mir mal einen Stift eingespannt, um erste Schritte zu machen. Als Übungsobjekt habe ich den LinuxCNC-Schriftzug aus "Axis" genommen und ein paar mal mit unterschiedlichem Vorschub geplottet - F400, F1200, F2400, F3600 und nochmal an der gleichen Position F900.



Beim untersten Schriftzug sieht man, dass unterschiedliche Kurven enstehen (aussen F3600, innen F900). Jetzt frage ich mich natürlich, ob das Schrittfehler sind, oder woher das sonst kommt und was man dagegen tun muss?

Danke im Vorraus
Chris
 
  • ziggi
  • ziggi's Avatar
04 Sep 2025 07:23

Troubles to get started with SD240 Retrofit

Category: Turning

Still struggeling a bit with the homing sequence.
In addition to the home switches I would like to use the encoder index to home. But the index is not found while homing.
So if I write "HOME_USE_INDEX = YES" in the INI, then the homing sequence does not end, even after 4 or 5 motor revolutions the index is not found. The index signal itsself is present- can see it in the oszy, it is also wired to the 7i80, so I assume it is not linked in the HAL correctly.

I hope someone can help me with this issue.

Thanks
Sigi.
  • tcbmetalworks
  • tcbmetalworks
04 Sep 2025 06:28
Replied by tcbmetalworks on topic Automatic band saw marvel v10a

Automatic band saw marvel v10a

Category: CNC Machines

 
 

Getting the control box together some is being reused from the original system such as the transformer the motor starters. 
  • unknown
  • unknown
04 Sep 2025 04:50

Races through first cycle upon first start up. Fine afterwards.

Category: Basic Configuration

The phrase "again" wasn't referring to a previously asked question, it's just a "turn of phrase".

Like the other members responding here, I am a bit confused as to "MEM" in the context of Linuxcnc, as far as I was aware gcode isn't "stored in memory for reuse" but reread from a loaded file.

Now whilst you appear to frustrated it is no use getting upset when you are not getting the answer you require.

Now if you can give some details regarding your OS, version of Linuxcnc and any configuration files, that would be great. Even better would be a short video of what is happening.

One must remember that this is a multinational forum and whilst some are fluent in English it is not their native tongue.
  • PCW
  • PCW's Avatar
04 Sep 2025 03:42

Races through first cycle upon first start up. Fine afterwards.

Category: Basic Configuration

Are you sure you are running LinuxCNC?, I've never heard of MEM mode.
Displaying 9166 - 9180 out of 17984 results.
Time to create page: 0.677 seconds
Powered by Kunena Forum