• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Check current tool number

Scheduled Pinned Locked Moved Solved
Duet Hardware and wiring
3
5
320
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Ray11
    last edited by 2 Apr 2020, 21:52

    When using RRF 3, I want to check the current tool number using if statement. I wrote a snippet but it seemed not working, any ideas?

    if state.currentTool = 1
    M117 "Tool1"
    if state.currentTool = 0
    M117 "Tool0"
    
    1 Reply Last reply Reply Quote 0
    • undefined
      TC
      last edited by 2 Apr 2020, 22:31

      You have indent every line Inside the if Statement

      1 Reply Last reply Reply Quote 1
      • undefined
        Ray11
        last edited by 2 Apr 2020, 22:42

        Oh now it's working, thank you!

        undefined 1 Reply Last reply 3 Apr 2020, 07:31 Reply Quote 0
        • undefined
          TC @Ray11
          last edited by 3 Apr 2020, 07:31

          @Ray11 You are welcome

          1 Reply Last reply Reply Quote 0
          • undefined
            wcj97
            last edited by 12 Apr 2020, 05:28

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA