Laser turns of during straight lines



  • Hi All

    I have a duet wifi running the latest firmware and a jtech laser https://jtechphotonics.com/?page_id=126 . The laser is attached to E1 heater one cable goes to the heater the other to the ground.

    I can get the laser to flash on for 1 second using M3 S255 comand.
    I then generate a g code file for the laser it is a straight line. the laser will fire for a split second when the straight line starts and then go off for the rest of the line.

    The unit is in laser mode using the below config g
    ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Mon Mar 12 2018 16:19:25 GMT+0000 (GMT Standard Time)

    ; General preferences
    G90 ; Sent absolute coordinates

    ; Network
    M550 PWorkBee CNC Machine ; Set machine name
    M552 S1 ; Enable network
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S0 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M584 X0 Y1:3 Z2 ; Apply custom drive mapping
    M92 X400 Y400 Z400 ; Set steps per mm
    M350 X16 Y16 Z16 I1 ; Configure microstepping with interpolation
    M566 X500 Y500 Z500 ; Set maximum instantaneous speed changes (mm/min)
    M203 X2500 Y2500 Z2500 ; Set maximum speeds (mm/min)
    M201 X150 Y150 Z150 ; Set accelerations (mm/s^2)
    M906 X2400 Y2400 Z2400 I100 ; Set motor currents (mA)

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X800 Y770 Z94 S0 ; Set axis maxima

    ; Endstops
    M574 X2 Y2 Z2 S0 ; Set active low endstops

    ; LASER SETTINGS
    M307 H2 A-1 C-1 D-1 ; disable heater 2 to make it available as a general purpose output pin
    M452 P2 R255 F200

    ; Tools

    ; Custom settings

    M564 H0 ; Enable jog commands when not homed
    M140 H-1 ; Disable heated bed
    M501 ; Load Stored Parameters
    M563 P1 S"XYZ-Probe" ; Define XYZ Touch Probe Tool

    G code added below for the straight line:
    T1
    G17
    G21
    M03 S0
    G0Z0.0010
    G0X0.0000Y0.0000
    G0X14.3143Y50.0000Z0.0010
    M3 S200
    G1X83.3143Z-0.0010F1000.0 S200
    M03 S0
    M03 S0
    M05
    G0Z0.0010M30
    G0X0.0000Y0.0000

    Can anyone help as to why this is happening.
    I have no issue with circles or shapes without straight lines.

    Thank you


  • administrators

    Which firmware version is your Duet running?



  • Version 2.02 from 24 december


  • administrators

    Please try 2.03beta2, and if it still happens with that version then I will try to reproduce that issue.



  • @dc42 hi i have now installed the latest beta firmware and i am having the same issue it will blink on at the start of the line but wont stay on until the line of g code finishes. I ran another test witht the circle and found that if i slow my travel speed down it will fire for every line of code like a pulse not a continus beam. Thanks for your help.



  • Hi should i try and increse the frequency from 200 to 2000? On the jtech controler website the max control frequency is 5 KHz? Thank you in advance.


  • administrators

    I will look into this tomorrow. Can you confirm that you have connected the laser controller + and - control signal input terminals to the heater +VIN and E1- outputs on the E1 terminal block? Does the laser run continuously if you connect those control wires to the VIN terminal block (or an always-on fan output) instead?



  • I have the + in the E1- and the - in an end stop ground. if i connect the + to the VIN on the Heater E1 the laser stays on permanently but will blink off for a second if i send an M3 S255 command. I can invert the signal from the controller as it has an invert / non invert pin.
    Should i wire it the way you have described " laser controller + and - control signal input terminals to the heater +VIN and E1- outputs on the E1 terminal block"
    It could be the way i have wired it stopping it working as it should but wont know til i am home from work at 5pm GMT


  • administrators

    @zandr said in Laser turns of during straight lines:

    Should i wire it the way you have described " laser controller + and - control signal input terminals to the heater +VIN and E1- outputs on the E1 terminal block"

    Yes. The datasheet you linked to says the control input can be anywhere between 2.8V and 36V and it is digitally isolated, so that should be safe to do. Set the inversion on the laser controller so that when the E1 heater LED is off, the laser is off too. Then set the I parameter in the M452 command to get the on/off signal right (I0 should be correct).

    That appears to be a good laser controller, better than the usual ones with TTL compatible inputs.



  • Thank you i will give it a shot what should i set the Frequency value at?



  • I am also having an issue when homing z in laser mode should i start a new help topic?


  • administrators

    @zandr said in Laser turns of during straight lines:

    Thank you i will give it a shot what should i set the Frequency value at?

    I suggest around 2kHz.

    I am also having an issue when homing z in laser mode should i start a new help topic?

    Yes.



  • hi again @dc42 i have set my laser up like you described but still have the issue where the laser blinks at the start of the line but wont stay on until the move has finished.
    I have wired it laser controller + to the VIN and the - control signal input terminalE1- outputs on the E1 terminal block.
    changed the laser settings to this:

    ; LASER SETTINGS
    M307 H2 A-1 C-1 D-1 ; disable heater 2 to make it available as a general purpose output pin
    M452 P2 I0 R255 F2000

    still running this line g code
    G21
    M03 S0
    G0Z0.0010
    G0X0.0000Y0.0000
    G0X14.3143Y50.0000Z0.0010
    M3 S200
    G1X83.3143Z-0.0010F1000.0 S200
    M05
    G0Z0.0010
    G0X0.0000Y0.0000

    I also put another m3 s200 comand before the m5 comand and the laser flashes when it reaches the end of the line move, it is as if the m3 comand is not latching on to continue to provide power until it reaches the end of the line move/ or the m5 comand.



  • I did some more tests thismorning, the only way to get a line is for me to enter g code for every 1 mm move and the laser will fire for every line of code. This is silly to do for a straight line hope u agree. I can draw a circle with the laser as there are multiple lines of code to form the circle. Hope this info helps in some way.


  • administrators

    So far I have not been able to reproduce this. Please provide your complete config.g and homing files.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.