CNC G36

erkmah
2022-03-24
2022-03-25
  • erkmah - 2022-03-24

    Hello everyone,
    I use codesys runtime and I do CNC application with soft motion.
    My G Code is :
    (**)
    N9 G0 X-2474.3860 Y1918.6109
    N10 G0 Z50.0
    N11 G0 A100 F50
    N11 G0 X-2474.3860 Y1918.6109
    N12 G1 X-2474.3860 Y1918.6109 Z-5.0 F58
    N13 G1 X-2469.2687 Y1920.6741 Z-5.0 F166
    N14 G1 X-2464.1221 Y1922.6632 Z-5.0 F166
    N15 G1 X-2458.9473 Y1924.5777 Z-5.0 F166
    N16 G1 X-2453.7454 Y1926.4173 Z-5.0 F166
    N17 G1 X-2448.5174 Y1928.1816 Z-5.0 F166
    N18 G1 X-2443.2646 Y1929.8702 Z-5.0 F166
    N19 G1 X-2437.9879 Y1931.4827 Z-5.0 F166
    N20 G1 X-2432.6884 Y1933.0188 Z-5.0 F166
    N21 G1 X-2427.3673 Y1934.4783 Z-5.0 F166
    N22 G36 O$OFFSETX$ D24
    (
    ***)

    I use the G36 for changing variable value but When G Code Program start, my OFFSETX Value equals 24 instantly but I want to change OFFSETX while G Code Line Number N22.

    Did I miss something ?
    Thanks.

     
  • Fless

    Fless - 2022-03-24

    Hi,

    if you did things by the book, you have a task where you interpret the cnc code and prepare the queue.
    When this task processes line N22 the value of OFFSETX changes.

    I guess you want OFFSETX to change when the SMC_Interpolator if finished with the motion in line N21,
    therefor you need to insert a G75 between line N21 and N22.

     
  • erkmah - 2022-03-25

    Hi,
    My G Codes first lines are :
    ()
    N1 G90
    N2 G98
    N3 G75
    N4 G38 O1
    N5 G51 D0.2
    (
    )

    Are these codes suitable by the book ?
    There is a G75 in N3. Should I insert second G75 N21 and N22 ?

     

Log in to post a comment.