Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. DDD
    3. Posts
    • Profile
    • Following 0
    • Followers 1
    • Topics 15
    • Posts 40
    • Best 5
    • Controversial 0
    • Groups 0

    Posts made by DDD

    • Where to start learning modern C++

      Hi Devs,

      I used to program in C and a bit more in C++ some 20 years ago. Some of the basics are there but my experience ended in object-oriented coding. I'm asking for your recommendations on literature/courses/tutorials on how to restart my coding skills in order to make some firmware modifications for the Duet 3 family. Any advice will be appreciated.

      posted in Firmware developers
      DDDundefined
      DDD
    • RE: Querying Z-probe value

      @dc42 After looking at my code, I was querying the wrong probe. The sensors.probe[1].value works, the problem was between the keyboard and the chair.

      However, using the Object model plugin, no probe value gets updated at sensors.probes[#].value[0]. Even when meta-commands and the status board shows the right value.

      Add: The JSON file gets updated but requires refreshing the website for the values to be updated into the Object model plugin.

      posted in Gcode meta commands
      DDDundefined
      DDD
    • RE: Querying Z-probe value

      Thanks for your answer @chrishamm. I tried the Object model plugin and sensors.probes[1].value[0] is always 0. Even when the status section displays 1000 for probe 1, this happens for any probe. I have firmware 3.4.5 installed. Everything else works but this. How can I query the Z-probe value via gcode?

      posted in Gcode meta commands
      DDDundefined
      DDD
    • Querying Z-probe value

      Dear Duet Team:

      I'm trying to read a Z-probe for tool probing. When the probe is triggered, this gets reflected in the Z-probe section of the Status. When using G38.2 and G38.4 I have no problem working with such a probe. However, when I try to query the probe value via Object Model "sensors.probes[1].value[0]" is always zero even when the Status says otherwise. I get the actual probe value by using M409 K"sensors.probes[1].value[0].value". Unexpectedly, using "sensors.probes[1].value[0].value" with metacommands I received an error.

      posted in Gcode meta commands
      DDDundefined
      DDD
    • RE: CORS policy: No 'Access-Control-Allow-Origin'

      @chrishamm @Phaedrux
      Duet Web Control 3.4.1
      DSF Version: 3.4.1
      RepRapFirmware for Duet 3 MB6HC 3.4.5
      On config.g - M586 C"*"

      Making further tests, our emergency button sends M112 M999. If I send only the M112 command, the websocket keeps working. Sending M999 creates the error. If I press the emergency button on DWC or the physical button connected to the reset pins, the websocket cannot connect back until the duet web server is reset or power cycle the machine.

      posted in Duet Web Control
      DDDundefined
      DDD
    • RE: CORS policy: No 'Access-Control-Allow-Origin'

      @dc42 the config.g has it, and I created a dsf-config.g and added to it. Also, was manually executed via DWC after reset. Same results

      posted in Duet Web Control
      DDDundefined
      DDD
    • CORS policy: No 'Access-Control-Allow-Origin'

      Hi,

      I'm working on a web controller for Duet. The web control software is hosted on the internet, and accessed via a PC. The PC is connected to the printer with Duet 3 6HC with the SBC set as an access point.

      When the printer and software start, it works like a charm. Connects, GET, and POST requests can be made. However, if reset is hit (on the DWC, M112 code or physically pushing the reset button), I receive the following error when trying to reconnect:

      Access to XMLHttpRequest at 'http://192.168.1.10/machine/connect?password=reprap' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
      

      It seems that no matter what we do on the server side, nothing works only after either, the printer has been turn off and on again, or the webserver has been restarted (sudo systemctl restart duetwebserver via SSH).

      This our httpRequest function, using AxiosRequest

      export async function httpRequest(config: IRequestConfig) {
          const fullUrl = `http://${PRINT_WEBSERVER}${config.url}`;
          console.log(`Request to ${fullUrl}`);
          const request: AxiosRequestConfig = {
              ...config,
              url: fullUrl,
          };
          try {
              const response = await axios(request);
               }
              console.log(`Success! - Request to ${fullUrl} returned`, response.data);
              return response;
          } catch (e: any) {
              console.log(`Failed! - Request to ${fullUrl} returned ${e.status} - ${e.message}`);
              throw e;
          }
      }
      

      How to connect to the printer again, after a reset or how can we reset the webserver via JS?

      posted in Duet Web Control
      DDDundefined
      DDD
    • How to check the "real-time" current of a extruder

      Re: How to check the real current of the stepper motor

      Hi Duet experts,

      I'm looking for a method to record the current of the extruder stepper during printing.

      Trinamic drivers monitor that current, is there a way to get that measurement via gcode, object model, or dsf-python?

      Thank you

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: Modify a global variable value

      @Falcounet said in Modify a global variable value:

      @DDD Actually, you can use pConn.perform_simple_code("set global.var_name=value")

      Is there a way to modify the variable value without using a gcode command?

      I'm assuming that this command gets into the buffer to be executed. I'm looking for the fastest way to make this change.

      posted in DSF Development
      DDDundefined
      DDD
    • RE: Modify a global variable value

      @Falcounet thanks for the help, will test it on Monday

      posted in DSF Development
      DDDundefined
      DDD
    • Modify a global variable value

      Hello DSF experts,

      I want to modify the value of a global variable using CommandConnection as follows:

      pConn = CommandConnection()
      pConn.connect()
      pConn.lock_object_model()
      pConn.set_object_model("global.a_MachPos", "123")
      pConn.unlock_object_model()
      

      However, the code doesn't change the value of the global variable a_MachPos. The code was based on the comments in base_command_connectioon.py file

      In the future, I want to be able to change the values of variables used inside jobs.

      Thanks for you help.

      posted in DSF Development
      DDDundefined
      DDD
    • RE: Mistery smoke on 6HC

      @dc42 I'll keep an eye on it and try my best not to definitely fry my board this time

      Really happy with how you design this board. It has been a blast playing with them.

      Kudos to you and the Duet team!

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: Mistery smoke on 6HC

      The RPi was powered externally using a 5V power supply

      There is a high chance that I made a short circuit on the IO_n port. "Duet" to my jump scare everything was unplugged as soon as the smoke appeared before made a thorough inspection. My bad

      Everything works normally. What problems should I expect if L4 fails completely?

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • Mistery smoke on 6HC

      Hello,
      Something odd happened to my Duet 6HC v1.0 WD31943 + 3HC hook up with a RPi4.

      I was trying to read a sensor connected at the 3HC.out4 using M409 command. Suddenly, a smoke came off from the L4 component on 6HC in the picture. After turning everything off and looking for errors, 6HC works fine like nothing happened.

      What function does this component have? Where should I expect an error to occur?

      I repeat, there seems to be no issues with 6HC

      20201119_164614.jpg

      20201119_164558.jpg

      20201119_170027.jpg

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: PWM Convertion

      @dc42 The input is not PWM- it's grounded with the rest of the circuit. I added a 10 Kohm pull-up resistor and was able to drive the converter, altho, doesn't go under 1V.

      The same setup but with a PWM generated with an Arduino, the converter goes under 1V without a problem.

      After measuring Duet's PWM signal by an Arduino, the duty cycle doesn't go under 10%. I don't have an oscilloscope.

      How can I make the Duet output a PWM duty cycle under 10%?

      Duet 6HC 3.1.1
      M950 F2 C"0.out4" Q1000

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: PWM Convertion

      @dc42 could a pull-up resistor work?

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: PWM Convertion

      @dc42 for this input ground is grounded and if the optocopler is isolated the converter doesn't go bellow 1V

      https://www.icstation.com/mobile/voltage-converter-module-adjustable-converter-power-module-digital-analog-signal-p-12498.html

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: PWM Convertion

      @T3P3Tony the PLC works form 0 - 10 V. The converter translate pwm duty cycle into voltage with 4 A max, more than enough for the low current input for the PLC

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • PWM Convertion

      How can I convert Duet's ground-switched PWM signal to a VIN-switched PWM?
      I'm trying to control a PLC via a PWM converter, but when the PWM out from the Duet is connected to the converter nothing happens because expects a VIN-switched PWM signal.

      I connect a PWM signal generated via Arduino and it works.

      posted in Duet Hardware and wiring
      DDDundefined
      DDD
    • RE: Connecting a tool board to Distribution board CAN_OUT

      It's fixed. Got another set of RJ11 connectors from a different vendor and everything worked out. Maybe those were defective. Old RJ11 connectors run out after a few tests, so comparing them against new ones is not possible.

      I was using a generic RJ11 crimping tool with a generic RJ11 source from a local electronics shop.

      It is worth mentioning that one time I over crimped the connector. There was conductivity from the 1LC to RJ11 but not from 1LC connected to the CAN connector on the mainboard.

      posted in Duet Hardware and wiring
      DDDundefined
      DDD