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

    can I echo a string ?

    Scheduled Pinned Locked Moved
    General Discussion
    3
    7
    233
    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.
    • Behrouz-AKTundefined
      Behrouz-AKT
      last edited by

      I am using version 3.4.6 on Mini5+ board

      I tried to echo a string but it doe not seem to work for me. However I have seen examples of its use in sample code in the online documentation. I am trying to debug the my code

      ;trigger2.g
      echo "trigger2"         ;should echo to console
      G1 V -10 F1000          ; move Middle drive 10 mm
      M581 P2 S1 T2 R0	; Set trigger2.g again
      

      I am trying to see if the file gets triggered , I know G1 gets executed but only once and it will not work the second time. I have to reset the machine either by uploading a new trigger file or config file.

      other information that might be useful is the config

      ;back sensor 1.io0.in
      M950 J1 C"!1.io0.in"  	; conveyor back sensor 
      M581 P1 S1 T1 R0		; calls trigger1.g
      ; front sensor 1.io2.in 
      M950 J2 C"!1.io2.in"  	; conveyor front sensor 
      M581 P2 S1 T2 R0		;trigger2.g
      

      any help is appreciated

      moth4017undefined 1 Reply Last reply Reply Quote 0
      • moth4017undefined
        moth4017 @Behrouz-AKT
        last edited by

        @Behrouz-AKT

        i use the same echo in my files and it works ok, but sometimes the message does not appear in the console usually due to poor wifi connection.

        <

        Behrouz-AKTundefined 1 Reply Last reply Reply Quote 0
        • Behrouz-AKTundefined
          Behrouz-AKT @moth4017
          last edited by

          @moth4017 That what I thought at first. However, I have never seen echo work - The WiFi is right next to the machine, router and the PC. eg they are all withing 1 meter of each other.

          Also does not explain why the trigger only works once. I must be missing something

          moth4017undefined 1 Reply Last reply Reply Quote 0
          • moth4017undefined
            moth4017 @Behrouz-AKT
            last edited by moth4017

            @Behrouz-AKT when do you run your trigger2.g file?
            you would trigger a macro with
            M98 P"/macros/ProbeDropOff" ; probe drop off

            or
            M98 P"0:/sys/global.g"

            <

            dc42undefined Behrouz-AKTundefined 2 Replies Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @moth4017
              last edited by

              @moth4017 if you want to control where the message appears, use M118 instead of echo.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • Behrouz-AKTundefined
                Behrouz-AKT @moth4017
                last edited by

                @moth4017 Not sure I understand . In essence pin 1.io2.in in an input from optical sensor and (digital signal). When the sensor is triggered then trigger2.g file gets called. The problem is that this only works once. Are you saying that I should not be processing in the trigger file? is the trigger2.g not a macro ?

                moth4017undefined 1 Reply Last reply Reply Quote 0
                • moth4017undefined
                  moth4017 @Behrouz-AKT
                  last edited by

                  @Behrouz-AKT
                  sorry misunder stood what you were doing , i do external triggers as below

                  ;External Buttons
                  M950 J1 C"!e3stop" ; config input pin switch NO connected to io2 and Gnd
                  M581 P1 T0 C0 ; T0 = emergency stop on trigger; T1 = pause print; T{N} = runs the macro "sys/trigger{N}.g", rising edge S1 falling edge S0
                  ;M581 P1 T4 c0 ; run a macro trigger4.g
                  M582 T0 ; Check External Trigger

                  <

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