Another ZenXY Control Board question

Im planning on putting this sand table back out in the hallway like before. Ive been doing a lot of work on the enclosure to make it easier to access and troubleshoot- Here are the solidworks files if anyone is interested. Ill share all the progress from my work in a month or two when its hopefully all done.
https://drive.google.com/file/d/1hkJau62FkkBEcNZvXqM29UEoGW-TNFo4/view?usp=sharing

I do have another questions - this machine will be out in the hallway and the front of the system is covered with clear plexiglass so students can see the inner workings. I want to include a small display which demos the G-Code pattern. Im hopefully using SandyPi as the main controller and FluidNC as the CNC controller but is there any easy way to just output the G-code 2D positioning to a display so students could see it.
As always - cheers for all the great advice over the years.
Tim

3 Likes

I will double check I think that have added a Zen config already.

Any luck digging up a ZenXY Config File for Bart’s FluidNC boards?

1 Like

I don’t have it for fluid only the grbl32. Next Zenxy build ideas - #475 by vicious1

Im actually having fun trying to program this GRBL sender in Python. Here is a quick video of an update and code if it helps anyone.
https://youtu.be/Bs1tPpQs2-0

Open grbl serial port

s = serial.Serial(‘/dev/ttyUSB0’,115200)

Open g-code file

f = open(‘/home/timcallinan/GCODE/New’,‘r’);

Wake up grbl

s.write(“\r\n\r\n”.encode())
time.sleep(2) # Wait for grbl to initialize
s.flushInput() # Flush startup text in serial input

Stream g-code to grbl

for line in f:
l = line.strip() # Strip all EOL characters for streaming
print(‘Sending: ’ + l,)
s.write((l + ‘\n’).encode()) # Send g-code block to grbl
grbl_out = s.readline() # Wait for grbl response with carriage return
grbl_out_str=str(grbl_out)
print(’ : ’ + grbl_out_str)

Wait here until grbl is finished to close serial port and file.

#raw_input(" Press to exit and disable grbl.")

Close file and serial port

f.close()
s.close()

1 Like

@Mcunn, if you get the chance, can you share your configuration file? Slowly working through making one of my own, just making final tweaks (and troubleshooting the inevitable errors that pop up).

How do you guys actually run the gcode? I pulled some raw gcode off of sandify, but it’s only G01 movements (no feeds, etc.) and FluidNC doesn’t recognize it. Do you use sandify for the movements and just edit in feed commands?

1 Like

Just put G1 F1000 (or whatever speed you want) in the starting gcode. It will keep the speed for the rest of the file.

1 Like

I think this is the latest copy . I’ll be in the office tomorrow where the machine lives at the moment and download a fresh copy. Note that the Steps per/mm are for my polar machine which definately won’t work on a cartesian machine like the xenxy.

name: "TMC2130 XY Servo Laser"
board: "FluidNC Pen/Laser"

verbose_errors: true

start:
  must_home: false

stepping:
  engine: RMT
  idle_ms: 255
  dir_delay_us: 1
  pulse_us: 2
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: gpio.13:high
  
  x:
    steps_per_mm: 5060
    max_rate_mm_per_min: 200
    acceleration_mm_per_sec2: 1
    soft_limits: false
    homing:
      cycle: 2
      positive_direction: false
      mpos_mm: 150.000
      feed_mm_per_min: 90
      seek_mm_per_min: 90
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
    
    motor0:
      limit_neg_pin: gpio.34:low
      tmc_2130:
        direction_pin: gpio.12
        step_pin: gpio.14
        cs_pin: gpio.16
        r_sense_ohms: 0.110
        run_amps: 0.4
        hold_amps: 0.05
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: false
    motor1:
      null_motor:

  y:
    steps_per_mm: 34764.4
    max_rate_mm_per_min: 20
    acceleration_mm_per_sec2: 8
    soft_limits: false
    max_travel_mm: 1
    homing:
      cycle: 2
      positive_direction: false
      mpos_mm: 0
      feed_mm_per_min: 15
      seek_mm_per_min: 15
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.35:high
      tmc_2130:
        direction_pin: gpio.26
        step_pin: gpio.25
        cs_pin: gpio.17
        r_sense_ohms: 0.110
        run_amps: 0.3
        hold_amps: 0.05
        microsteps: 32
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        use_enable: false
        stallguard: 20
        stallguard_debug: false
        homing_mode: StealthChop
        
    motor1:
      null_motor:

        
spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN


1 Like

Here you go, not sure if its diff than above.

name: "TMC2130 XY Servo Laser"
board: "FluidNC Pen/Laser"

verbose_errors: true

start:
  must_home: false

stepping:
  engine: RMT
  idle_ms: 255
  dir_delay_us: 1
  pulse_us: 2
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: gpio.13:high
  
  x:
    steps_per_mm: 5060
    max_rate_mm_per_min: 200
    acceleration_mm_per_sec2: 1
    soft_limits: false
    homing:
      cycle: 2
      positive_direction: false
      mpos_mm: 150.000
      feed_mm_per_min: 90
      seek_mm_per_min: 90
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
    
    motor0:
      limit_neg_pin: gpio.34:low
      tmc_2130:
        direction_pin: gpio.12
        step_pin: gpio.14
        cs_pin: gpio.16
        r_sense_ohms: 0.110
        run_amps: 0.4
        hold_amps: 0.05
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: false
    motor1:
      null_motor:

  y:
    steps_per_mm: 34764.4
    max_rate_mm_per_min: 20
    acceleration_mm_per_sec2: 8
    soft_limits: false
    max_travel_mm: 1
    homing:
      cycle: 2
      positive_direction: false
      mpos_mm: 0
      feed_mm_per_min: 15
      seek_mm_per_min: 15
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.35:high
      tmc_2130:
        direction_pin: gpio.26
        step_pin: gpio.25
        cs_pin: gpio.17
        r_sense_ohms: 0.110
        run_amps: 0.3
        hold_amps: 0.05
        microsteps: 32
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        use_enable: false
        stallguard: 20
        stallguard_debug: false
        homing_mode: StealthChop
        
    motor1:
      null_motor:

        
spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN


Fairly similar to what I wound up with. Current code below. If you get a chance, can you share any gcode? Last piece of the puzzle for me.

board: FluidNC Pen/Laser 2130
name: TMC2130 ZenXY
meta:
stepping:
  engine: RMT
  idle_ms: 255
  pulse_us: 2
  dir_delay_us: 1
  disable_delay_us: 0
  segments: 6

axes:
  shared_stepper_disable_pin: gpio.13
  shared_stepper_reset_pin: NO_PIN
  x:
    steps_per_mm: 200.37
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 25.000
    max_travel_mm: 440.000
    soft_limits: true
    homing:
      cycle: 2
      allow_single_axis: true
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 3000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.39
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        step_pin: gpio.14
        direction_pin: gpio.12
        disable_pin: NO_PIN
        r_sense_ohms: 0.110
        run_amps: 0.250
        hold_amps: 0.250
        microsteps: 32
        toff_disable: 0
        toff_stealthchop: 5
        use_enable: false
        cs_pin: gpio.16
        spi_index: -1
        run_mode: StealthChop
        homing_mode: StealthChop
        stallguard: 0
        stallguard_debug: false
        toff_coolstep: 3

    motor1:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      null_motor:

  y:
    steps_per_mm: 200.37
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 25.000
    max_travel_mm: 880.000
    soft_limits: true
    homing:
      cycle: 1
      allow_single_axis: true
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 3000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.36
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        step_pin: gpio.25
        direction_pin: gpio.26
        disable_pin: NO_PIN
        r_sense_ohms: 0.110
        run_amps: 0.250
        hold_amps: 0.250
        microsteps: 32
        toff_disable: 0
        toff_stealthchop: 5
        use_enable: false
        cs_pin: gpio.17
        spi_index: -1
        run_mode: StealthChop
        homing_mode: StealthChop
        stallguard: 0
        stallguard_debug: false
        toff_coolstep: 3

    motor1:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      null_motor:

  z:
    steps_per_mm: 80.000
    max_rate_mm_per_min: 1000.000
    acceleration_mm_per_sec2: 25.000
    max_travel_mm: 1000.000
    soft_limits: false
    homing:
      cycle: 0
      allow_single_axis: true
      positive_direction: true
      mpos_mm: 0.000
      feed_mm_per_min: 50.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      null_motor:

    motor1:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      null_motor:

kinematics:
  CoreXY:

spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN

control:
  safety_door_pin: NO_PIN
  reset_pin: NO_PIN
  feed_hold_pin: NO_PIN
  cycle_start_pin: NO_PIN
  macro0_pin: NO_PIN
  macro1_pin: NO_PIN
  macro2_pin: NO_PIN
  macro3_pin: NO_PIN

coolant:
  flood_pin: NO_PIN
  mist_pin: NO_PIN
  delay_ms: 0

probe:
  pin: NO_PIN
  check_mode_start: true

macros:
  startup_line0:
  startup_line1:
  macro0:
  macro1:
  macro2:
  macro3:

start:
  must_home: true
  deactivate_parking: false
  check_limits: false

user_outputs:
  analog0_pin: NO_PIN
  analog1_pin: NO_PIN
  analog2_pin: NO_PIN
  analog3_pin: NO_PIN
  analog0_hz: 5000
  analog1_hz: 5000
  analog2_hz: 5000
  analog3_hz: 5000
  digital0_pin: NO_PIN
  digital1_pin: NO_PIN
  digital2_pin: NO_PIN
  digital3_pin: NO_PIN

arc_tolerance_mm: 0.002
junction_deviation_mm: 0.010
verbose_errors: true
report_inches: false
enable_parking_override_control: false
use_line_numbers: false
planner_blocks: 16
NoSpindle:
2 Likes

What gcode do you need? Mine is polar so is funky… just try this.

Use Sandify and generate a design. Have sandify generate a feed rate at start of file with:

G1F100

As fluid requires a feed rate and sandify doesn’t add rates in the gcode.

See if that works for you.

1 Like

@codingishard404 if you get that working, post the config and what board you have in the #software:fluidnc category. I am sure that will be helpful for others. Yours is the first corexy fluidnc config I have seen, I think.

1 Like

That was the missing piece, thank you Michael. Speaks to my inexperience, but I wasn’t sure if I could get away with a feed at the beginning or if every command needed one.

@jeffeb3 I’ll do that.

2 Likes

Yeah luckily on Cartesian you don’t need one on every line. For polar you have to calc the feedrate for every move as it runs faster at the edge than in the center which is pain.

Glad you got it working… enjoy!

1 Like

BTW, that F did is in mm/min. F100 is pretty sore for our machines. F1000 is more like it.