Check tool existence

  • Hi all,

    I want to test how many tools are configured in the start.g to set their temperatures.
    I tried:

    if tools[1].state != null

    but seams to be wrong. Any ideas?

    Thanks ahead!

  • administrators


    if #tools > 1 && tools[1] != null

    The first condition tests whether the array is long enough so that tools[1] is within the bounds of the array, the second tests whether there is actually a tool in that position.

  • @TC I want to do almost exactly the same thing but I haven't had time to look at conditional gcode. May I ask you to share your "script" once you get it working please? Thanks in advance.

Log in to reply