Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Lem
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 20
    • Best 0
    • Controversial 0
    • Groups 0

    Lem

    @Lem

    0
    Reputation
    4
    Profile views
    20
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Lem Unfollow Follow

    Latest posts made by Lem

    • RE: Object model subscription - sometimes fails

      @Falcounet Ok, I try to reproduce error and save snippet but probably I will post the same info like on photo above.

      Apart from this, can you tell which way of object model subscription is the best?

      Option 1:

      if __name__ == "__main__":
           subscribe_connection = SubscribeConnection(SubscriptionMode.FULL)
           subscribe_connection.connect()
      
           while True:
                time.sleep(1.0)
                object_model = subscribe_connection.get_object_model()
                [...]
                if script_end == True:
                     subscribe_connection.close()
      

      Option 2:

      if __name__ == "__main__":
           subscribe_connection = SubscribeConnection(SubscriptionMode.FULL)
      
           while True:
                time.sleep(1.0)
                subscribe_connection.connect()
                object_model = subscribe_connection.get_object_model()
                subscribe_connection.close()
                [...]
      

      Option 3:

      if __name__ == "__main__":
           while True:
                time.sleep(1.0)
                subscribe_connection = SubscribeConnection(SubscriptionMode.FULL)
                subscribe_connection.connect()
                object_model = subscribe_connection.get_object_model()
                subscribe_connection.close()
                [...]
      
      posted in DSF Development
      Lemundefined
      Lem
    • RE: Object model subscription - sometimes fails

      The problem with get_object_model() has been resolved, but I'm still stuck with connect(). Can you add an exception in this function as well?

      posted in DSF Development
      Lemundefined
      Lem
    • RE: Object model subscription - sometimes fails

      @Falcounet I think that your solution works - I can't register exception handling but I don't experience so many stucks. Did you improve something more? 😉 I will let you know if I am sure. But...
      Function again gets stuck for ~3 min and I closed it. Problem appear in connect function this time.

      DSF 3.4.6 and dsf-python-3.4.6.post4

      Error:
      unnamed (2).jpg

      posted in DSF Development
      Lemundefined
      Lem
    • RE: Object model subscription - sometimes fails

      I've just implemented checking for an exception. I will let you know about the test results!

      posted in DSF Development
      Lemundefined
      Lem
    • RE: Object model subscription - sometimes fails

      @chrishamm Ok, but it's hard to recognize when script get stuck. Function get_object_model() don't raise any error... Beside this printing works properly so I wouldn't like to reset printer.

      posted in DSF Development
      Lemundefined
      Lem
    • Object model subscription - sometimes fails

      Hello!

      I would like to save some parameters during printing. I constantly read object model and save choosed values.

          while True:
      
              subscribe_connection = SubscribeConnection(SubscriptionMode.PATCH)
              subscribe_connection.connect()
              try:
                  object_model = subscribe_connection.get_object_model()
              finally:
                  subscribe_connection.close()
      [...]
              layer_actual = object_model.job.layer
      

      But sometimes python script get stuck:

      ^CTraceback (most recent call last):
        File "print_loger.py", line 43, in <module>
          object_model = subscribe_connection.get_object_model()
        File "/home/pi/.local/lib/python3.7/site-packages/dsf/connections/subscribe_co                                  nnection.py", line 35, in get_object_model
          object_model = self.receive(ObjectModel)
        File "/home/pi/.local/lib/python3.7/site-packages/dsf/connections/base_connect                                  ion.py", line 77, in receive
          json_string = self.receive_json()
        File "/home/pi/.local/lib/python3.7/site-packages/dsf/connections/base_connect                                  ion.py", line 108, in receive_json
          part = self.socket.recv(BUFF_SIZE)
      

      Now I'm working on 3.4.6 version.

      What could be the reason of this behavior?

      posted in DSF Development
      Lemundefined
      Lem
    • RE: Real Time Position

      Can we read real position of tool in new RRF? Is it possible?

      posted in Duet Hardware and wiring
      Lemundefined
      Lem
    • RE: RRF 3.4.4 - M950 two outputs for one heater error

      @dc42 This duet behavior is now clear. I will connect heaters in parallel, current will be less than 5A. Thank you!

      posted in General Discussion
      Lemundefined
      Lem
    • RE: RRF 3.4.4 - M950 two outputs for one heater error

      @jay_s_uk
      I tried

      M950 H1 C"21.out0+out1" T1
      

      and

      M950 H1 C"21.out0+21.out1" T1
      

      And both returns error

      posted in General Discussion
      Lemundefined
      Lem
    • RRF 3.4.4 - M950 two outputs for one heater error

      Hello!

      I'm trying to configure Mosquito Magnum Dual Heater on Duet 3 6HC + Toolboard 1LC.
      When I configured two heaters for one tool as below, it works ok.

      M308 S1 P"21.temp0" Y"pt1000" A"Right A"		; configure sensor 0 as thermistor on tool board board pin temp0
      M308 S9 P"21.temp1" Y"pt1000" A"Right B"		; configure sensor 0 as thermistor on tool board board pin temp0
      M950 H1 C"21.out0" T1					; create nozzle heater output on out0 and map it to sensor 0
      M950 H9 C"21.out1" T9
      M307 H1 R1.085 K0.153:0.000 D4.55 E1.35 S1.00 B0 V23.1	; PID parameters - tuning separetly
      M307 H9 R1.085 K0.153:0.000 D4.55 E1.35 S1.00 B0 V23.1	; PID parameters - tuning separetly
      M143 H1 S455							; set temperature limit for heater 1 to 455C
      M143 H9 S455							; set temperature limit for heater 9 to 455C
      M950 F1 C"!1.out8" Q10000					; configure fan 0, F = 10 kHz, PWM range from 0.3 to 1.0
      M106 P1 S0
      M563 P1 D1 H1:9 F1                                		; define tool 1
      G10 P1 X0 Y0 Z0                                 		; set tool 1 axis offsets
      G10 P1 R0 S0                                    		; set initial tool 1 active and standby temperatures to 0C
      

      But unfortunately it's impossible to tuning it correctly. I can't tuning two heater at the same time. So I want to use two outputs for one heater as below:

      M950 H1 C"21.out0+out1" T1
      

      This line is copied from G-codes dictionary M950 examples, but returns error:

      7.11.2022, 10:32:53	Error: M950: Unknown pin name 'out0+out1'
      

      I tried:

      M950 H1 C"21.out0+21.out1" T1
      

      But result is the same.

      What is correct g code syntax to define it?

      posted in General Discussion
      Lemundefined
      Lem